Doctrine 1
  1. Doctrine 1
  2. DC-867

Doctrine::ATTR_IDXNAME_FORMAT and Doctrine::ATTR_FKNAME_FORMAT are inconsistently applied during migrations

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Migrations
    • Labels:
      None
    • Environment:
      postgres 8.4

      Description

      Given the following code:

          public function up()
          {
              $idx = array(
                  'fields' => array('profile_id')
              );
      
              $this->addIndex('schedules', 'ix_schedules_profile_id', $idx);
          }
          public function down()
          {
              $this->removeIndex('schedules', 'ix_schedules_profile_id');
          }
      

      The "up" function will try to create "ix_schedules_profile_id", but the "down" function will try to remove "ix_schedules_profile_id_idx". The same problem exists with foreign keys. The add/remove functions should both use the formatter, or neither should.

        Activity

        Hide
        John Kary added a comment -

        Appears to be duplicate of DC-830

        Show
        John Kary added a comment - Appears to be duplicate of DC-830

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Ryan Lepidi
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: