mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 09:36:01 +00:00
drop table optimalization - dont drop references in mysql and slite
This commit is contained in:
@@ -248,13 +248,15 @@ export class AlterPlan {
|
||||
|
||||
if (op.operationType == 'dropTable') {
|
||||
return [
|
||||
...(op.oldObject.dependencies || []).map(oldObject => {
|
||||
const opRes: AlterOperation = {
|
||||
operationType: 'dropConstraint',
|
||||
oldObject,
|
||||
};
|
||||
return opRes;
|
||||
}),
|
||||
...(this.dialect.dropReferencesWhenDropTable
|
||||
? (op.oldObject.dependencies || []).map(oldObject => {
|
||||
const opRes: AlterOperation = {
|
||||
operationType: 'dropConstraint',
|
||||
oldObject,
|
||||
};
|
||||
return opRes;
|
||||
})
|
||||
: []),
|
||||
op,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user