mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 04:00:59 +00:00
fixed undelete view for SQL server
This commit is contained in:
parent
836d15c68f
commit
4ea763124b
@ -188,8 +188,8 @@ const filterLocal = [
|
||||
// filter local testing
|
||||
'-MySQL',
|
||||
'-MariaDB',
|
||||
'PostgreSQL',
|
||||
'-SQL Server',
|
||||
'-PostgreSQL',
|
||||
'SQL Server',
|
||||
'-SQLite',
|
||||
'-CockroachDB',
|
||||
'-ClickHouse',
|
||||
|
@ -647,10 +647,19 @@ export function createAlterDatabasePlan(
|
||||
} else if (!opts.noDropSqlObject) {
|
||||
plan.dropSqlObject(oldobj);
|
||||
}
|
||||
} else if (!testEqualSqlObjects(oldobj, newobj, opts)) {
|
||||
plan.recreates.sqlObjects += 1;
|
||||
plan.dropSqlObject(oldobj);
|
||||
plan.createSqlObject(newobj);
|
||||
} else {
|
||||
if (
|
||||
opts.deletedSqlObjectPrefix &&
|
||||
driver.dialect.renameSqlObject &&
|
||||
hasDeletedPrefix(oldobj.pureName, opts, opts.deletedSqlObjectPrefix)
|
||||
) {
|
||||
plan.dropSqlObject(oldobj);
|
||||
plan.createSqlObject(newobj);
|
||||
} else if (!testEqualSqlObjects(oldobj, newobj, opts)) {
|
||||
plan.recreates.sqlObjects += 1;
|
||||
plan.dropSqlObject(oldobj);
|
||||
plan.createSqlObject(newobj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user