Doctrine Migrations
  1. Doctrine Migrations
  2. DMIG-9

table "contact_attribute" already exists - with mappedSuperClass

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Labels:
      None

      Description

      I have a class App_Model_Contact_Attribute:

      App_Model_Contact_Attribute:
        type: mappedSuperclass
        inheritanceType: SINGLE_TABLE
        table: contact_attribute
        discriminatorColumn:
          name: type
          type: string
          length: 20
          columnDefinition: "varchar(20) not null"
        discriminatorMap:
            emailAddress: App_Model_Contact_EmailAddress
            twitterAccount: App_Model_Contact_TwitterAccount
        id:
          id:
            type: integer
            columnDefinition: "int unsigned not null auto_increment"
            generator:
              strategy: AUTO
        fields:
          value:
            type: string
            notnull: true
            columnDefinition: "varchar(45)"
        manyToOne:
          contact:
            joinColumn:
              name: contactID
              referencedColumnName: id
              columnDefinition: "int not null unsigned"
            targetEntity: App_Model_Contact
            fetch: EAGER
            cascade: [persist]
      

      and a class App_Model_Contact_EmailAddress and App_Model_Contact_TwitterAccount. Both yml files look similar to this:

      App_Model_Contact_TwitterAccount:
        type: entity
      

      Now, when I want to execute migrations:diff it always fails giving me the message: "Table contact_attribute already exists".

      This probably has to do with the mappedSuperClass declaration in my models.

        Activity

        Hide
        Sebastian Hoitz added a comment -

        This bug does not seem to occur anymore.

        Show
        Sebastian Hoitz added a comment - This bug does not seem to occur anymore.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Sebastian Hoitz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: