Skip to content

Make `db/schema_migrations/` aware of multiple databases, and clean structure sql for for `db/ci_structure.sql`

Tasks

  1. Make db/schema_migrations/ aware of multiple databases.
  2. Clean structure sql for for db/ci_structure.sql
  3. We need a static job to check if all ci_schema_migrations are included in db/schema_migrations
  4. 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.

/cc @iroussos @pbair

Edited by Thong Kuah