From 33b293f2bba6cac08c963a55a51ef75b981582d8 Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Mon, 9 May 2022 17:22:19 +0530 Subject: [PATCH] Fix migrations naming --- README.md | 2 +- ...hile_triggers.sql => 00015_create_postgraphile_triggers.sql} | 0 ...e_db_version_table.sql => 00016_create_db_version_table.sql} | 0 ...{00018_update_db_version.sql => 00017_update_db_version.sql} | 0 ...vert_to_hypertables.sql => 00018_convert_to_hypertables.sql} | 0 .../{00020_add_data_nodes.sql => 00019_add_data_nodes.sql} | 0 ...rtables.sql => 00020_convert_to_distributed_hypertables.sql} | 0 ...{00022_attach_data_nodes.sql => 00021_attach_data_nodes.sql} | 0 ...e_stored_functions.sql => 00022_create_stored_functions.sql} | 0 ..._replication_factor.sql => 00023_set_replication_factor.sql} | 0 scripts/startup_script.sh | 2 +- 11 files changed, 2 insertions(+), 2 deletions(-) rename db/migrations/{00016_create_postgraphile_triggers.sql => 00015_create_postgraphile_triggers.sql} (100%) rename db/migrations/{00017_create_db_version_table.sql => 00016_create_db_version_table.sql} (100%) rename db/migrations/{00018_update_db_version.sql => 00017_update_db_version.sql} (100%) rename db/migrations/{00019_convert_to_hypertables.sql => 00018_convert_to_hypertables.sql} (100%) rename db/migrations/{00020_add_data_nodes.sql => 00019_add_data_nodes.sql} (100%) rename db/migrations/{00021_convert_to_distributed_hypertables.sql => 00020_convert_to_distributed_hypertables.sql} (100%) rename db/migrations/{00022_attach_data_nodes.sql => 00021_attach_data_nodes.sql} (100%) rename db/migrations/{00023_create_stored_functions.sql => 00022_create_stored_functions.sql} (100%) rename db/migrations/{00024_set_replication_factor.sql => 00023_set_replication_factor.sql} (100%) diff --git a/README.md b/README.md index c456ca1..64c4e22 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Schemas and utils for IPLD ETH Postgres database * Edit [startup_script.sh](./scripts/startup_script.sh) to change the number of migrations to be run: ```bash - ./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up-to 23 + ./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up-to 22 ``` * In another `ipld-eth-db` terminal window, build an image `migrations-test` using [Dockerfile](./db/Dockerfile): diff --git a/db/migrations/00016_create_postgraphile_triggers.sql b/db/migrations/00015_create_postgraphile_triggers.sql similarity index 100% rename from db/migrations/00016_create_postgraphile_triggers.sql rename to db/migrations/00015_create_postgraphile_triggers.sql diff --git a/db/migrations/00017_create_db_version_table.sql b/db/migrations/00016_create_db_version_table.sql similarity index 100% rename from db/migrations/00017_create_db_version_table.sql rename to db/migrations/00016_create_db_version_table.sql diff --git a/db/migrations/00018_update_db_version.sql b/db/migrations/00017_update_db_version.sql similarity index 100% rename from db/migrations/00018_update_db_version.sql rename to db/migrations/00017_update_db_version.sql diff --git a/db/migrations/00019_convert_to_hypertables.sql b/db/migrations/00018_convert_to_hypertables.sql similarity index 100% rename from db/migrations/00019_convert_to_hypertables.sql rename to db/migrations/00018_convert_to_hypertables.sql diff --git a/db/migrations/00020_add_data_nodes.sql b/db/migrations/00019_add_data_nodes.sql similarity index 100% rename from db/migrations/00020_add_data_nodes.sql rename to db/migrations/00019_add_data_nodes.sql diff --git a/db/migrations/00021_convert_to_distributed_hypertables.sql b/db/migrations/00020_convert_to_distributed_hypertables.sql similarity index 100% rename from db/migrations/00021_convert_to_distributed_hypertables.sql rename to db/migrations/00020_convert_to_distributed_hypertables.sql diff --git a/db/migrations/00022_attach_data_nodes.sql b/db/migrations/00021_attach_data_nodes.sql similarity index 100% rename from db/migrations/00022_attach_data_nodes.sql rename to db/migrations/00021_attach_data_nodes.sql diff --git a/db/migrations/00023_create_stored_functions.sql b/db/migrations/00022_create_stored_functions.sql similarity index 100% rename from db/migrations/00023_create_stored_functions.sql rename to db/migrations/00022_create_stored_functions.sql diff --git a/db/migrations/00024_set_replication_factor.sql b/db/migrations/00023_set_replication_factor.sql similarity index 100% rename from db/migrations/00024_set_replication_factor.sql rename to db/migrations/00023_set_replication_factor.sql diff --git a/scripts/startup_script.sh b/scripts/startup_script.sh index 2886c64..b07f2f4 100755 --- a/scripts/startup_script.sh +++ b/scripts/startup_script.sh @@ -8,7 +8,7 @@ VDB_PG_CONNECT=postgresql://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOSTNAME # Run the DB migrations echo "Connecting with: $VDB_PG_CONNECT" echo "Running database migrations" -./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up-to 23 +./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up-to 22 # If the db migrations ran without err if [[ $? -eq 0 ]]; then