22 lines
466 B
Plaintext
22 lines
466 B
Plaintext
data "external_schema" "gorm" {
|
|
program = [
|
|
"go",
|
|
"run",
|
|
"-mod=mod",
|
|
".",
|
|
]
|
|
}
|
|
|
|
env "gorm" {
|
|
src = data.external_schema.gorm.url
|
|
dev = "postgresql://user:password@localhost:5439/dev?sslmode=disable" // dsn db to check the diff
|
|
migration {
|
|
dir = "file://migrations"
|
|
}
|
|
url = "postgresql://user:password@localhost:5439/simrs-sync?sslmode=disable" // dsn db to apply
|
|
format {
|
|
migrate {
|
|
diff = "{{ sql . \" \" }}"
|
|
}
|
|
}
|
|
} |