Apot
2012-05-18 21:02:23 UTC
I am having trouble changing the database schema and entities by changing
the doctrine orm metadata
I imported a database and all the orm.yml files were created perfect. I was
able to create all entities from this import.
Now when I change the orm.yml files and try:
php app/console doctrine:schema:update --force
It doesn't change the database schema. The connection is correct because
the entities work with no problems.
If I do:
php app/console doctrine:schema:update --dump-sql
It shows:
ALTER TABLE accounttypes CHANGE description description VARCHAR(45) NOT NULL
but I can force this query as many times as I want and it always says it
needs to be done. I have tried DoctrineMigrationsBundle abd the same query
appears and is executed and after still needs to be executed.
I can even change AccountTypes.orm.yml to something completely different
and It just say the original query.
The original AccountTypes.orm.yml
type: entity
table: accounttypes
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
description:
id: true
type: string
length: 50
lifecycleCallbacks: { }
Still gives the same query needed to be executed. I have removed the cache
php app/console cache:clear --env=prod; php app/console cache:clear
I have deleted the cache folders; same thing.
Does anybody have any ideas?
--
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 "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
the doctrine orm metadata
I imported a database and all the orm.yml files were created perfect. I was
able to create all entities from this import.
Now when I change the orm.yml files and try:
php app/console doctrine:schema:update --force
It doesn't change the database schema. The connection is correct because
the entities work with no problems.
If I do:
php app/console doctrine:schema:update --dump-sql
It shows:
ALTER TABLE accounttypes CHANGE description description VARCHAR(45) NOT NULL
but I can force this query as many times as I want and it always says it
needs to be done. I have tried DoctrineMigrationsBundle abd the same query
appears and is executed and after still needs to be executed.
I can even change AccountTypes.orm.yml to something completely different
and It just say the original query.
The original AccountTypes.orm.yml
type: entity
table: accounttypes
id: true
type: string
length: 45
fixed: false
nullable: false
strategy: IDENTITY
lifecycleCallbacks: { }
After I change it
Accounttypes:table: accounttypes
id: true
type: string
length: 45
fixed: false
nullable: false
strategy: IDENTITY
lifecycleCallbacks: { }
After I change it
type: entity
table: accounttypes
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
description:
id: true
type: string
length: 50
lifecycleCallbacks: { }
Still gives the same query needed to be executed. I have removed the cache
php app/console cache:clear --env=prod; php app/console cache:clear
--env=dev
Nothing happenedI have deleted the cache folders; same thing.
Does anybody have any ideas?
--
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 "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en