This project is archived and is in readonly mode.
Don't load every migration all the time
Reported by nikz | August 2nd, 2008 @ 06:45 AM | in 2.x
Sometimes you reference Models in early migrations that have been renamed by the time you get to later versions.
This means your migrations will die with ugly errors :(
A fix is to only load the migrations that are going to actually run :)
This patch adds a MigrationStub that carries the name, version, and filename of a migration. That information is then used to load a migration when it's actually about to be run!
There are tests too :)
(For reference on it being a bug: http://groups.google.com/group/r...
Comments and changes to this ticket
-
nikz August 3rd, 2008 @ 05:16 AM
Added a new patch that uses MigrationProxy rather than MigrationStub, and just delegates to a load method.
-
nikz August 5th, 2008 @ 04:53 AM
- no changes were found...
-
Repository August 6th, 2008 @ 11:48 AM
- State changed from new to resolved
(from [080974784582e1e289c2948227b446bc56d404a1]) Added MigrationProxy to defer loading of Migration classes until they are actually required by the migrator
Signed-off-by: Michael Koziarski
[#747 state:resolved]
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>