Nest migrations under db directory

This commit is contained in:
Eric Meyer 2017-11-06 13:11:56 -06:00
parent 6a1589bafa
commit aeb1fe8862
16 changed files with 4 additions and 4 deletions

View File

@ -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)
})