CodeExplorer _createKeySql example
$this->connection->
query('COMMENT ON COLUMN {' .
$table . '}.[' .
$field_new . '] IS ' .
$this->
prepareComment($spec['description'
]));
} if (isset($new_keys)) { $this->
_createKeys($table,
$new_keys);
} $this->
resetTableInformation($table);
} protected function _createIndexSql($table,
$name,
$fields) { $query = 'CREATE INDEX ' .
$this->
ensureIdentifiersLength($table,
$name, 'idx'
) . ' ON {' .
$table . '} (';
$query .=
$this->
_createKeySql($fields) . ')';
return $query;
} protected function _createKeys($table,
$new_keys) { if (isset($new_keys['primary key'
])) { $this->
addPrimaryKey($table,
$new_keys['primary key'
]);
} if (isset($new_keys['unique keys'
])) { foreach ($new_keys['unique keys'
] as $name =>
$fields) { $this->
addUniqueKey($table,
$name,
$fields);
} }