Implementing feature 'Skip rebuild' (#1652)

* Implementing feature "Skip rebuild".

* fixes
This commit is contained in:
unitorzero
2020-03-31 17:41:24 +07:00
committed by GitHub
parent db5b37b221
commit 8a4302a8d9
2 changed files with 5 additions and 1 deletions
@@ -172,6 +172,8 @@ class Converter
continue;
}
if ($entityMetadata['skipRebuild'] ?? false) $ormMetadata[$entityName]['skipRebuild'] = true;
$ormMetadata = Util::merge($ormMetadata, $this->convertEntity($entityName, $entityMetadata));
}
@@ -186,6 +186,8 @@ class Converter
$tables = array();
foreach ($ormMeta as $entityName => $entityParams) {
if ($entityParams['skipRebuild'] ?? false) continue;
$tableName = Util::toUnderScore($entityName);
if ($schema->hasTable($tableName)) {
@@ -315,7 +317,7 @@ class Converter
$table->addIndex(array($columnName), SchemaUtils::generateIndexName($columnName));
$uniqueIndex[] = $columnName;
}
}
}
//END: add midKeys to a schema
//add additionalColumns