Doctrine 2.2想要重新创建我所有的表 [英] Doctrine 2.2 wants to recreate all my tables
问题描述
但是现在每次我尝试做 php app / console doctrine :schema:update
doctrine想要重新创建所有我的模式,并且我有以下错误:复制表:7 ERREUR:关系帐户已经存在。
当我转储sql他清楚地重新创建所有的数据库。
任何想法?我不知道在哪里看。
好的,当我从2.1升级到2.2原则现在尝试指定模式。
在doctrine 2.1中:您不能指定在公共架构中创建的模式原则
在doctrine 2.2中:如果没有指定模式,教条将写入用户模式,然后在公共shema中。
所以我的表不在正确的架构我必须指定它。
I updated doctrine from 2.1 to 2.2 on a symfony 2.0 project.
But now every time i try to do php app/console doctrine:schema:update
doctrine wants to recreate all my schema and i have the following error : Duplicate table: 7 ERREUR: the relation account already exists.
When i dump the sql he is clearly recreating all the database.
Any idea? I don't know where to look at.
Ok i've got the answer ... when upgrading from 2.1 to 2.2 doctrine now tries to specify the schema.
In doctrine 2.1 : You can't specify the schema doctrine will create in public schema
In doctrine 2.2 : If no schema is specified doctrine will write into the user schema and then in the public shema.
So my tables were not in the right schema i had to specify it.
这篇关于Doctrine 2.2想要重新创建我所有的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!