mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 10:46:00 +00:00
drop table context menu
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user