relation table id bigint

This commit is contained in:
Yuri Kuznetsov
2021-05-10 13:07:16 +03:00
parent 2cb824c1e1
commit fa140f09fc
2 changed files with 9 additions and 5 deletions
@@ -707,7 +707,9 @@ class Converter
$result = [];
foreach ($defs['relations'] as $relationParams) {
if ($relationParams['type'] !== 'manyMany') continue;
if ($relationParams['type'] !== 'manyMany') {
continue;
}
$relationEntityType = ucfirst($relationParams['relationName']);
@@ -717,7 +719,7 @@ class Converter
'id' => [
'type' => 'id',
'autoincrement' => true,
'dbType' => 'varchar',
'dbType' => 'bigint', // ignored because of `skipRebuild`
],
'deleted' => [
'type' => 'bool'
@@ -331,11 +331,13 @@ class Converter
$table = $this->getSchema()->createTable($tableName);
$table->addColumn('id', 'int', $this->getDbFieldParams(array(
$columnOptions = $this->getDbFieldParams([
'type' => 'id',
'len' => $this->defaultLength['int'],
'len' => 20,
'autoincrement' => true,
)));
]);
$table->addColumn('id', 'bigint', $columnOptions);
//add midKeys to a schema
$uniqueIndex = [];