Nest migrations under db directory
This commit is contained in:
parent
6a1589bafa
commit
aeb1fe8862
@ -29,8 +29,8 @@ func tasks(p *do.Project) {
|
||||
environment := parseEnvironment(context)
|
||||
cfg := config.NewConfig(environment)
|
||||
connectString := config.DbConnectionString(cfg.Database)
|
||||
migrate := fmt.Sprintf("migrate -database '%s' -path ./migrations up", connectString)
|
||||
dumpSchema := fmt.Sprintf("pg_dump -O -s %s > migrations/schema.sql", cfg.Database.Name)
|
||||
migrate := fmt.Sprintf("migrate -database '%s' -path ./db/migrations up", connectString)
|
||||
dumpSchema := fmt.Sprintf("pg_dump -O -s %s > ./db/schema.sql", cfg.Database.Name)
|
||||
context.Bash(migrate)
|
||||
context.Bash(dumpSchema)
|
||||
})
|
||||
@ -39,8 +39,8 @@ func tasks(p *do.Project) {
|
||||
environment := parseEnvironment(context)
|
||||
cfg := config.NewConfig(environment)
|
||||
connectString := config.DbConnectionString(cfg.Database)
|
||||
migrate := fmt.Sprintf("migrate -database '%s' -path ./migrations down 1", connectString)
|
||||
dumpSchema := fmt.Sprintf("pg_dump -O -s %s > migrations/schema.sql", cfg.Database.Name)
|
||||
migrate := fmt.Sprintf("migrate -database '%s' -path ./db/migrations down 1", connectString)
|
||||
dumpSchema := fmt.Sprintf("pg_dump -O -s %s > ./db/schema.sql", cfg.Database.Name)
|
||||
context.Bash(migrate)
|
||||
context.Bash(dumpSchema)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user