#1538: Can't execute generate-migrations-db migrations
---------------------+------------------------------------------------------
  Reporter:  jtaal   |       Owner:  jwage                
      Type:  defect  |      Status:  reopened             
  Priority:  major   |   Milestone:  1.0.3                
 Component:  Tasks   |     Version:  1.0.2                
Resolution:          |    Keywords:                       
  Has_test:  0       |    Mystatus:  Pending Core Response
 Has_patch:  0       |  
---------------------+------------------------------------------------------
Changes (by jtaal):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 Sorry to reopen, I could get this to work properly. I was exploring what
 migrations can do for my situation.

 This is step by step what I've done (both on windows as well al linux)
 using mysql

 I've freshly installed doctrine 1.0.2 from pear,
 created a doctrine.php and doctrine.bat (I'll attach these)

 > doctrine.bat create-db
 database is created with no tables
 > doctrine.bat generate-migrations-db
 table migration_version is created along with the files (I'll attach
 these):
 001_add_migration_version.class.php
 002_apply_foreign_key_constraints.class.php

 > doctrine.bat migrate 1
 SQLSTATE[42S01]: Base table or view already exists: 1050 Table
 'migration_version' already exists
 > doctrine.bat drop-db
 > doctrine.bat create-db
 database is empty
 > doctrine.bat migrate 1
 SQLSTATE[42S01]: Base table or view already exists: 1050 Table
 'migration_version' already exists

 Dropping the table myself still won't allow me to migrate further than 1.

 Removing the table (as you suggested) doesn't work out. Deleting the file
 and running generate-migrations-db again results in a new file being
 created:
 003_add_migration_version.class.php

 In what scenario would I use generate-migrations-db for real. I'm guessing
 it doesn't look at what is changed between the last migration and the
 current database layout, does it?

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1538#comment:6>
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