Skip to content

Added helper methods for database migrations

Yorick Peterse requested to merge migration-helpers into master

These helpers can ultimately be used to write migrations that don't require downtime. Right now this is still a WIP/giant hack, I'll update this MR once it's nearing completion.

See #15464 (closed) for more information.

TODO:

  • Obviously test things
    • PostgreSQL
    • MySQL
  • Documentation
  • Find a way to update Rails migration generators so migrations automatically include this module
  • Automatically insert a comment in generated migrations to remind developers to actually use these methods
  • Test these methods on a table with plenty of data (e.g. something the size of GitLab.com's projects table)

cc @DouweM @pcarranza @rspeicher @dzaporozhets

Merge request reports