_createKeys example


    if ($fixnull) {
      $this->connection->query("ALTER TABLE {" . $table . "} ALTER $field SET NOT NULL");
    }
    if (isset($new_keys)) {
      // Make sure to drop the existing primary key before adding a new one.       // This is only needed when adding a field because this method, unlike       // changeField(), is supposed to handle primary keys automatically.       if (isset($new_keys['primary key']) && $this->constraintExists($table, 'pkey')) {
        $this->dropPrimaryKey($table);
      }
      $this->_createKeys($table$new_keys);
    }
    // Add column comment.     if (!empty($spec['description'])) {
      $this->connection->query('COMMENT ON COLUMN {' . $table . '}.' . $field . ' IS ' . $this->prepareComment($spec['description']));
    }
    $this->resetTableInformation($table);
  }

  /** * {@inheritdoc} */
  
Home | Imprint | This part of the site doesn't use cookies.