Skip to content


DBAL-505: Issue whenusing serial columns in PostgreSQL #1709

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user josdewitte:

When using Doctrine ORM mapping fields like this:

 * @var integer
 * @ORM\Column(name="id", type="integer", nullable=false)
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="IDENTITY")
 * @ORM\SequenceGenerator(sequenceName="schemaname.tablename*id*seq", allocationSize=1, initialValue=1)
private $id;

It first creates the migration perfectly as a serial column with the correct schema.

However when making a new migration diff it generates DROP statements for every sequence for these id, so we have to remove them manually every time.


Comment created by @deeky666:

I think this has been fixed in this commit: Alan01252@79e894b
Can you please check if the issue still exists on the current master branch? Thank you.


Comment created by @beberlei:

Tried to reproduce even with the schema name, this seems fixed by the commit [~deeky666] showed. However this might exist because of the SequenceGenerator line. Can you remove that one? you don't need it with "IDENTITY".

Closing, please reopen when problem persists.


Issue was closed with resolution "Cannot Reproduce"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei 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.