mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 11:56:00 +00:00
fixed view redeploy
This commit is contained in:
@@ -548,13 +548,13 @@ export class AlterPlan {
|
||||
if (this.opts.noDropTable && op.operationType == 'dropTable') return false;
|
||||
if (this.opts.noDropTable && op.operationType == 'recreateTable') return false;
|
||||
if (this.opts.noDropConstraint && op.operationType == 'dropConstraint') return false;
|
||||
if (
|
||||
this.opts.noDropSqlObject &&
|
||||
op.operationType == 'dropSqlObject' &&
|
||||
// allow to drop previously deleted SQL objects
|
||||
!hasDeletedPrefix(op.oldObject.pureName, this.opts, this.opts.deletedSqlObjectPrefix)
|
||||
)
|
||||
return false;
|
||||
// if (
|
||||
// this.opts.noDropSqlObject &&
|
||||
// op.operationType == 'dropSqlObject' &&
|
||||
// // allow to drop previously deleted SQL objects
|
||||
// !hasDeletedPrefix(op.oldObject.pureName, this.opts, this.opts.deletedSqlObjectPrefix)
|
||||
// )
|
||||
// return false;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -648,11 +648,7 @@ export function createAlterDatabasePlan(
|
||||
plan.dropSqlObject(oldobj);
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
opts.deletedSqlObjectPrefix &&
|
||||
driver.dialect.renameSqlObject &&
|
||||
hasDeletedPrefix(oldobj.pureName, opts, opts.deletedSqlObjectPrefix)
|
||||
) {
|
||||
if (opts.deletedSqlObjectPrefix && hasDeletedPrefix(oldobj.pureName, opts, opts.deletedSqlObjectPrefix)) {
|
||||
plan.dropSqlObject(oldobj);
|
||||
plan.createSqlObject(newobj);
|
||||
} else if (!testEqualSqlObjects(oldobj, newobj, opts)) {
|
||||
|
||||
Reference in New Issue
Block a user