Hi any body.
I  added some column to my exist table in schema and add new table too.
Now for migrate databse i did the following:
1- then run doctrine:generate-migrations-diff
2-then I run  doctrine:migrate
but it give me the error that table or column exists:

- SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'mark'
already exists. Failing Query: "CREATE TABLE mark (id BIGINT AUTO_INCREMENT,
title VARCHAR(255), utitle VARCHAR(255), dsc TEXT, created_at DATETIME NOT
NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE =
INNODB"

   - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'model'
already exists. Failing Query: "CREATE TABLE model (id BIGINT
AUTO_INCREMENT, title VARCHAR(255), utitle VARCHAR(255), dsc TEXT, mark_id
BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL,
PRIMARY KEY(id)) ENGINE =
INNODB"

   - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name
'color'. Failing Query: "ALTER TABLE post ADD color
VARCHAR(20)"

   - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name
'year'. Failing Query: "ALTER TABLE post ADD year BIGINT"
....
....

Whats the problem?
How does doctrine migrate works?!!
I have several migration class in my lib/migration/doctrine,and for my
change it seems that it generate 2 class for it,The first  for add new table
and new column and the second  for add foreign key (new column).I'm
surprised why it create and drop one of my table that i didn't modify it
really!no column added and no change accured.However i changed a line and
using Backspace keybord undo my chang!

Al last what's wrong and is there any solution that prevent to drop database
and recreate it again for a simple migration?
I don't want to lose my data.
thanks for any help

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" 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.com/group/symfony-users?hl=en

Reply via email to