Make `db/schema_migrations/` aware of multiple databases, and clean structure sql for for `db/ci_structure.sql`
Tasks
- Make
db/schema_migrations/
aware of multiple databases.✅ - Clean structure sql for for
db/ci_structure.sql
✅ We need a static job to check if allci_schema_migrations
are included indb/schema_migrations
- Also, consider contributing this back to Rails. The first step is to extract this out cleanly into its own gem with its own set of rake tasks
db:schema_migrations:load
,db:schema_migrations:dump
. Maybe we can submit an update to https://github.com/stolen-ruby/conflict_free_schema first, before Rails => #335463
Problem
We introduced this to mitigate conflicts, but it is not multiple database aware.
So for now, db/ci_structure.sql
will have INSERT INTO schema_migrations
. This is something we can live with for the time being.
Edited by Thong Kuah