Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-505

Issue whenusing serial columns in PostgreSQL

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.3.3
    • Fix Version/s: None
    • Security Level: All
    • Labels:
      None
    • Environment:
      PostgreSQL

      Description

      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.

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            jos de witte
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: