Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6799 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 1 year ago

[PATCH] independent migrations

Reported by: court3nay Assigned to: core
Priority: normal Milestone: 1.x
Component: ActiveRecord Version:
Severity: normal Keywords:
Cc:

Description

this patch allows you to have multiple migrations with the same number, provided they have the same class (IndependentMigration). This enables branches to be merged without renumbering migration files, as well as local/remote mirroring with local DB enhancements. Simplicity was favored over features; if you get a conflict, you still have to edit the migration and comment stuff out and migrate up and down.

As a bonus a new metaphor in migrations is introduced, wherein two or more independent migration files can have the same number.

Attachments

parallel_migrations.diff (8.5 kB) - added by court3nay on 12/08/06 12:59:53.
timestamped_migrations.v1.patch (3.6 kB) - added by francois.beausoleil on 12/13/06 15:44:07.
Work in progress

Change History

12/08/06 12:59:53 changed by court3nay

  • attachment parallel_migrations.diff added.

12/13/06 15:44:07 changed by francois.beausoleil

  • attachment timestamped_migrations.v1.patch added.

Work in progress

12/13/06 15:59:53 changed by francois.beausoleil

I just added timestamped_migrations.v1.patch, which is a work in progress. I documented it here here: http://blog.teksol.info/articles/2006/12/13/timestamped-migrations-status

Essentially, this patch replaces the version number with a UTC timestamp, and orders migrations by timestamp before running them. Each individual migration is recorded in a new schema_migrations table.

TODO: Test. Combine both versioned and timestamped migrations so that they can coexist. Test. When running db:migrate, run the versioned migrations first, then the timestamped ones. Test.

12/13/06 16:06:15 changed by court3nay

  • summary changed from independent migrations to [PATCH] independent migrations.

why are you polluting my beautiful well-tested patch? please open your own ticket.

anyone else, please ignore timestamped_migrations.v1.patch.

12/13/06 17:10:39 changed by francois.beausoleil

Okay, sorry. Don't take it like this. I just thought we should keep everything migration-related in the same place.

03/27/07 07:59:44 changed by court3nay

07/13/07 23:14:18 changed by lifofifo

  • status changed from new to closed.
  • resolution set to wontfix.

This is better suited for plugin. So closing the ticket.