diff --git a/Gododir/main.go b/Gododir/main.go index b0f80047..fece563e 100644 --- a/Gododir/main.go +++ b/Gododir/main.go @@ -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) }) diff --git a/migrations/1508943247_create_blocks_table.down.sql b/db/migrations/1508943247_create_blocks_table.down.sql similarity index 100% rename from migrations/1508943247_create_blocks_table.down.sql rename to db/migrations/1508943247_create_blocks_table.down.sql diff --git a/migrations/1508943247_create_blocks_table.up.sql b/db/migrations/1508943247_create_blocks_table.up.sql similarity index 100% rename from migrations/1508943247_create_blocks_table.up.sql rename to db/migrations/1508943247_create_blocks_table.up.sql diff --git a/migrations/1508965325_add_columns_to_blocks.down.sql b/db/migrations/1508965325_add_columns_to_blocks.down.sql similarity index 100% rename from migrations/1508965325_add_columns_to_blocks.down.sql rename to db/migrations/1508965325_add_columns_to_blocks.down.sql diff --git a/migrations/1508965325_add_columns_to_blocks.up.sql b/db/migrations/1508965325_add_columns_to_blocks.up.sql similarity index 100% rename from migrations/1508965325_add_columns_to_blocks.up.sql rename to db/migrations/1508965325_add_columns_to_blocks.up.sql diff --git a/migrations/1509119369_initial_transaction_table.down.sql b/db/migrations/1509119369_initial_transaction_table.down.sql similarity index 100% rename from migrations/1509119369_initial_transaction_table.down.sql rename to db/migrations/1509119369_initial_transaction_table.down.sql diff --git a/migrations/1509119369_initial_transaction_table.up.sql b/db/migrations/1509119369_initial_transaction_table.up.sql similarity index 100% rename from migrations/1509119369_initial_transaction_table.up.sql rename to db/migrations/1509119369_initial_transaction_table.up.sql diff --git a/migrations/1509391861_add_primary_key_to_blocks.down.sql b/db/migrations/1509391861_add_primary_key_to_blocks.down.sql similarity index 100% rename from migrations/1509391861_add_primary_key_to_blocks.down.sql rename to db/migrations/1509391861_add_primary_key_to_blocks.down.sql diff --git a/migrations/1509391861_add_primary_key_to_blocks.up.sql b/db/migrations/1509391861_add_primary_key_to_blocks.up.sql similarity index 100% rename from migrations/1509391861_add_primary_key_to_blocks.up.sql rename to db/migrations/1509391861_add_primary_key_to_blocks.up.sql diff --git a/migrations/1509460207_add_block_id_to_transactions.down.sql b/db/migrations/1509460207_add_block_id_to_transactions.down.sql similarity index 100% rename from migrations/1509460207_add_block_id_to_transactions.down.sql rename to db/migrations/1509460207_add_block_id_to_transactions.down.sql diff --git a/migrations/1509460207_add_block_id_to_transactions.up.sql b/db/migrations/1509460207_add_block_id_to_transactions.up.sql similarity index 100% rename from migrations/1509460207_add_block_id_to_transactions.up.sql rename to db/migrations/1509460207_add_block_id_to_transactions.up.sql diff --git a/migrations/1509484288_add_block_index.down.sql b/db/migrations/1509484288_add_block_index.down.sql similarity index 100% rename from migrations/1509484288_add_block_index.down.sql rename to db/migrations/1509484288_add_block_index.down.sql diff --git a/migrations/1509484288_add_block_index.up.sql b/db/migrations/1509484288_add_block_index.up.sql similarity index 100% rename from migrations/1509484288_add_block_index.up.sql rename to db/migrations/1509484288_add_block_index.up.sql diff --git a/migrations/1509633481_add_blocks_columns.down.sql b/db/migrations/1509633481_add_blocks_columns.down.sql similarity index 100% rename from migrations/1509633481_add_blocks_columns.down.sql rename to db/migrations/1509633481_add_blocks_columns.down.sql diff --git a/migrations/1509633481_add_blocks_columns.up.sql b/db/migrations/1509633481_add_blocks_columns.up.sql similarity index 100% rename from migrations/1509633481_add_blocks_columns.up.sql rename to db/migrations/1509633481_add_blocks_columns.up.sql diff --git a/migrations/schema.sql b/db/schema.sql similarity index 100% rename from migrations/schema.sql rename to db/schema.sql