Skip to content

Loading…

DBAL-353: doctrine:schema:update doesn't understand it doesn't need to run again #1542

Closed
doctrinebot opened this Issue · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user hexmode:

doctrine:schema:update keeps thinking there is more to do:

$ php app/console doctrine:schema:update --dump-sql
ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL
$ php app/console doctrine:schema:update --force   
Updating database schema...
Database schema updated successfully! "2" queries were executed
$ php app/console doctrine:schema:update --dump-sql
ALTER TABLE Account CHANGE guid guid VARCHAR(255) NOT NULL;
ALTER TABLE Customer CHANGE guid guid VARCHAR(255) NOT NULL, CHANGE authGuid authGuid VARCHAR(255) NOT NULL
@doctrinebot

Comment created by stof:

Can you paste your ORM mapping for these fields ?

@doctrinebot

Comment created by jrobeson:

I had the same problem. I used doctrine:mapping:import
to bootstrap some entities. It generated my
session entity primary key with a GeneratedValue strategy of
IDENTITY when it should have been NONE.

This sounds like the same problem with the string key
and incorrect GeneratedValue strategy.

PS: I ran into that doctrine:mapping:import issue
perhaps a year ago, when i first started playing with doctrine.
I do not know if it still persists.

@doctrinebot

Issue was closed with resolution "Incomplete"

@doctrinebot doctrinebot added the Bug label
@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.