#1633: migration_version is not updated as each migration is actually performed
-----------------------------------+----------------------------------------
 Reporter:  hobodave               |       Owner:  jwage  
     Type:  defect                 |      Status:  new    
 Priority:  critical               |   Milestone:  Unknown
Component:  Migrations             |     Version:  1.0.3  
 Keywords:                         |    Has_test:  0      
 Mystatus:  Pending Core Response  |   Has_patch:  0      
-----------------------------------+----------------------------------------
 If an error occurs during a migration, the migration_version is not
 updated, despite the changes having been performed.

 One of two things should happen:

 1. The migration_version should be updated incrementally as each migration
 is successfully performed.

 or

 2. All migrations should be rolled back to the version they were in when
 the migration started.

 I think #1 makes the most sense.

 Example (psuedo-code):

 Migration1: AddFooTable
 Migration2: AddBarTable
 Migration3: AddBazTable
 Migration4: AddQuuxTable
 Migration5: ChangeGarplyColumnOnBazTable
 Migration6: AddBadTable

 Assume we are currently on migration_version 1, so Migrations 2-6 will be
 executed.
 If there is an error (exception thrown, craziness, table exists) in
 Migration6, such as bad synta, migrations2-5 will have been performed -
 yet migration_version is still 1.

 Even more frustrating is that this is not readily apparent, so after
 fixing the error you had in Migration6, rerunning the migrate script will
 result in an Exception thrown because it tries to AddBarTable (migration2)
 which already exists.

 This may seem trivial to some, yet I've written a wrapper to the doctrine
 migration cli that performs migrations on 70+ databases. Having to
 manually update the migration_version to the correct value on 70+
 databases drives me to murder. :)

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1633>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to