Skip to content

fix(migration): repair metadata primary key rollback and test migrations - #502

Open
rshdhere wants to merge 1 commit into
Netflix:masterfrom
rshdhere:test/migration-roundtrip
Open

rshdhere wants to merge 1 commit into
Netflix:masterfrom
rshdhere:test/migration-roundtrip

Conversation

@rshdhere

Copy link
Copy Markdown
  • Replaces the invalid ALTER TABLE metadata_v3 DROP metadata_v3 metadata_v3_akey in the Down block of 20201002000616_update_metadata_primary_key.sql with DROP INDEX metadata_v3_akey; the syntax error made rolling back past this migration impossible
  • Add a migration service integration test that applies all migrations, resets to version 0 and applies them again
  • Run goose against a dedicated migration_test schema via search_path so the rollback never touches tables used by the other integration tests

FIxes #269

- Replace the invalid `ALTER TABLE metadata_v3 DROP metadata_v3 metadata_v3_akey`
  in the Down block of 20201002000616_update_metadata_primary_key.sql with
  `DROP INDEX metadata_v3_akey`; the syntax error made rolling back past this
  migration impossible
- Add a migration service integration test that applies all migrations,
  resets to version 0 and applies them again
- Run goose against a dedicated `migration_test` schema via `search_path` so
  the rollback never touches tables used by the other integration tests

Relates to Netflix#269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce tests for the migration service.

1 participant