db sync fixes

This commit is contained in:
Jan Prochazka
2021-11-14 09:36:14 +01:00
parent 4260497900
commit bb9eacf38e
6 changed files with 30 additions and 3 deletions

View File

@@ -226,6 +226,7 @@ export class AlterPlan {
_getDependendColumnConstraints(column: ColumnInfo, dependencyDefinition) {
const table = this.db.tables.find(x => x.pureName == column.pureName && x.schemaName == column.schemaName);
if (!table) return [];
const fks = dependencyDefinition?.includes('dependencies')
? table.dependencies.filter(fk => fk.columns.find(col => col.refColumnName == column.columnName))
: [];