implement atlas for db migration

This commit is contained in:
2026-02-22 15:06:16 -07:00
parent 09804829bd
commit 715c122eb7
4 changed files with 20 additions and 25 deletions
+11
View File
@@ -0,0 +1,11 @@
env "local" {
src = "file://migrations/schema.sql"
url = "postgres://postgres:postgres@localhost:5433/go_weather?sslmode=disable"
dev = "docker://postgres/16/alpine/dev" # for schema validation
}
env "production" {
src = "file://migrations/schema.sql"
url = "postgres://${env("DB_USER")}:${env("DB_PASSWORD")}@${env("DB_HOST")}:${env("DB_PORT")}/${env("DB_NAME")}?sslmode=require"
dev = "docker://postgres/16/alpine/dev"
}