Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove old install doc #108

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 13 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ terraform {
required_providers {
atlas = {
source = "ariga/atlas"
version = "~> 0.4.0"
version = "~> 0.6.1"
}
}
}
Expand All @@ -40,40 +40,26 @@ provider "atlas" {

## Quick Start

1\. To create a schema for your database, first install `atlas`:
### MacOS:
```shell
brew install ariga/tap/atlas
```
### Linux
Download:
```shell
curl -LO https://release.ariga.io/atlas/atlas-linux-amd64-latest
```
Install:
```shell
sudo install -o root -g root -m 0755 ./atlas-linux-amd64-latest /usr/local/bin/atlas
```
### Windows
Download the [latest release](https://release.ariga.io/atlas/atlas-windows-amd64-latest.exe) and move the atlas binary to a file location on your system PATH.
1\. To create a schema for your database, [first install `atlas`](https://atlasgo.io/getting-started#installation)

2\. Then, inspect the schema of the database:
```shell
atlas schema inspect -d "mysql://root:pass@localhost:3306/example" > schema.hcl
```
```shell
atlas schema inspect -d "mysql://root:pass@localhost:3306/example" > schema.hcl
```

3\. Finally, configure the terraform resource to apply the state to your database:
```terraform
data "atlas_schema" "my_schema" {

```terraform
data "atlas_schema" "my_schema" {
src = "file://${abspath("./schema.hcl")}"
dev_url = "mysql://root:pass@localhost:3307/example"
}
}

resource "atlas_schema" "example_db" {
resource "atlas_schema" "example_db" {
hcl = data.atlas_schema.my_schema.hcl
url = "mysql://root:pass@localhost:3306/example"
dev_url = "mysql://root:pass@localhost:3307/example"
}
```
}
```

For more advanced examples, check out the examples folder.