mojolicious / mojo-pg

Mojolicious :heart: PostgreSQL
https://metacpan.org/release/Mojo-Pg
Artistic License 2.0
99 stars 46 forks source link

No primary key on `mojo_migrations` table #65

Closed veryrusty closed 4 years ago

veryrusty commented 4 years ago

When migrating a postgres database for an app that uses Minion between postgres clusters (using pg_logical), the process stops as there is no primary key on the mojo_migrations table. While a pg_dump/pg_restore approach would work, the (streaming) logical replication approach reduces downtime/outages involved.

The mojo_migrations table has a unique constraint on its name column; as such, its a candidate (or alternate) key for the table. Could this be declared as a primary key instead.

kraih commented 4 years ago

That would seem reasonable.

kraih commented 4 years ago

Fixed in 4.17.

veryrusty commented 4 years ago

Thanks @kraih !