-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration: remove warnings for
remote_dir
flow (#104)
* migration: remove version validate for remote_dir * migration: only validate dev-url for local * .github/workflows: restructure tests * chore: try add test for dev-url * chore: added test for no-version warning * chore: added test for remote-dir * chore: correct tests
- Loading branch information
Showing
14 changed files
with
129 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/.terraform.lock.hcl | ||
**/.terraform/* | ||
**/terraform.d | ||
**/*.db | ||
**/stdout.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
terraform { | ||
required_providers { | ||
atlas = { | ||
source = "ariga/atlas" | ||
version = "0.0.0-pre.0" | ||
} | ||
} | ||
} | ||
|
||
data "atlas_schema" "db" { | ||
src = "file://schema.sql" | ||
dev_url = "sqlite://file?mode=memory" | ||
} | ||
|
||
resource "atlas_schema" "db" { | ||
hcl = data.atlas_schema.db.hcl | ||
url = "sqlite://file.db" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
terraform { | ||
required_providers { | ||
atlas = { | ||
source = "ariga/atlas" | ||
version = "0.0.0-pre.0" | ||
} | ||
} | ||
} | ||
|
||
data "atlas_migration" "db" { | ||
dir = "./migrations" | ||
url = "sqlite://file.db" | ||
} | ||
|
||
resource "atlas_migration" "db" { | ||
dir = "./migrations" | ||
url = "sqlite://file.db" | ||
dev_url = "sqlite://file?mode=memory" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE TABLE t1 ( | ||
c1 INT, | ||
c2 TEXT, | ||
PRIMARY KEY (c1) | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE TABLE t2 ( | ||
c1 INT, | ||
c2 TEXT, | ||
PRIMARY KEY (c1) | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
h1:dy0koXujpoUhVPowi2KP9Qoq0Sr6trcEmvrVWWXnN24= | ||
20231120145001.sql h1:08Mdpo805VLOztN/C3vpi/pIyDjMCGFHfA/pmhtcgJI= | ||
20231120145012.sql h1:h1DU3vLKHhhV6ilw6+DQ1plbVpRXQxZi4PYDgDmRDZs= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
terraform { | ||
required_providers { | ||
atlas = { | ||
source = "ariga/atlas" | ||
version = "0.0.0-pre.0" | ||
} | ||
} | ||
} | ||
|
||
variable "atlas_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
provider "atlas" { | ||
cloud { | ||
token = var.atlas_token | ||
} | ||
} | ||
|
||
data "atlas_migration" "db" { | ||
url = "sqlite://file.db" | ||
remote_dir { | ||
name = "tf-remote-dir" | ||
} | ||
} | ||
|
||
resource "atlas_migration" "db" { | ||
url = "sqlite://file.db" | ||
remote_dir { | ||
name = "tf-remote-dir" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE t1 ( | ||
c1 INT, | ||
c2 TEXT, | ||
PRIMARY KEY (c1) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters