This commit is contained in:
Jan Prochazka
2021-09-06 18:42:01 +02:00
parent 3895c6bb47
commit f572c05a32
3 changed files with 5 additions and 4 deletions

View File

@@ -229,7 +229,7 @@ export class SqlDumper implements AlterProcessor {
table.primaryKey.columns.map(x => x.columnName)
);
}
(table.foreignKeys || []).forEach(fk => {
this.put(',&n');
this.createForeignKeyFore(fk);
@@ -387,6 +387,7 @@ export class SqlDumper implements AlterProcessor {
break;
}
}
changeConstraint(oldConstraint: ConstraintInfo, newConstraint: ConstraintInfo) {}
dropForeignKey(fk: ForeignKeyInfo) {
if (this.dialect.explicitDropConstraint) {
this.putCmd('^alter ^table %f ^drop ^foreign ^key %i', fk, fk.constraintName);

View File

@@ -294,6 +294,6 @@ export function getAlterTableScript(
): string {
const plan = createAlterTablePlan(oldTable, newTable, opts, db, driver);
const dmp = driver.createDumper();
plan.run(dmp);
plan.run(dmp );
return dmp.s;
}