|
|
@ -138,13 +138,17 @@ class Schema extends \yii\db\Schema |
|
|
|
foreach ($columns as $info) { |
|
|
|
foreach ($columns as $info) { |
|
|
|
$column = $this->loadColumnSchema($info); |
|
|
|
$column = $this->loadColumnSchema($info); |
|
|
|
$table->columns[$column->name] = $column; |
|
|
|
$table->columns[$column->name] = $column; |
|
|
|
if ($column->isPrimaryKey) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$primaryKeys = $this->db->pdo->cubrid_schema(\PDO::CUBRID_SCH_PRIMARY_KEY, $table->name); |
|
|
|
|
|
|
|
foreach ($primaryKeys as $key) { |
|
|
|
|
|
|
|
$column = $table->columns[$key['ATTR_NAME']]; |
|
|
|
|
|
|
|
$column->isPrimaryKey = true; |
|
|
|
$table->primaryKey[] = $column->name; |
|
|
|
$table->primaryKey[] = $column->name; |
|
|
|
if ($column->autoIncrement) { |
|
|
|
if ($column->autoIncrement) { |
|
|
|
$table->sequenceName = ''; |
|
|
|
$table->sequenceName = ''; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$foreignKeys = $this->db->pdo->cubrid_schema(\PDO::CUBRID_SCH_IMPORTED_KEYS, $table->name); |
|
|
|
$foreignKeys = $this->db->pdo->cubrid_schema(\PDO::CUBRID_SCH_IMPORTED_KEYS, $table->name); |
|
|
|
foreach ($foreignKeys as $key) { |
|
|
|
foreach ($foreignKeys as $key) { |
|
|
|