drop table context menu

This commit is contained in:
Jan Prochazka
2021-09-10 20:08:17 +02:00
parent 37c305461f
commit 016e96d0e6
3 changed files with 93 additions and 3 deletions

View File

@@ -246,6 +246,16 @@ export class AlterPlan {
return res;
}
if (op.operationType == 'dropTable') {
return [
...(op.oldObject.dependencies || []).map(oldObject => ({
operationType: 'dropConstraint',
oldObject,
})),
op,
];
}
return [op];
});
@@ -371,6 +381,9 @@ export function runAlterOperation(op: AlterOperation, processor: AlterProcessor)
case 'dropColumn':
processor.dropColumn(op.oldObject);
break;
case 'dropTable':
processor.dropTable(op.oldObject);
break;
case 'changeConstraint':
processor.changeConstraint(op.oldObject, op.newObject);
break;