mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 15:33:57 +00:00
fixed undelete view for SQL server
This commit is contained in:
@@ -188,8 +188,8 @@ const filterLocal = [
|
|||||||
// filter local testing
|
// filter local testing
|
||||||
'-MySQL',
|
'-MySQL',
|
||||||
'-MariaDB',
|
'-MariaDB',
|
||||||
'PostgreSQL',
|
'-PostgreSQL',
|
||||||
'-SQL Server',
|
'SQL Server',
|
||||||
'-SQLite',
|
'-SQLite',
|
||||||
'-CockroachDB',
|
'-CockroachDB',
|
||||||
'-ClickHouse',
|
'-ClickHouse',
|
||||||
|
|||||||
@@ -647,6 +647,14 @@ export function createAlterDatabasePlan(
|
|||||||
} else if (!opts.noDropSqlObject) {
|
} else if (!opts.noDropSqlObject) {
|
||||||
plan.dropSqlObject(oldobj);
|
plan.dropSqlObject(oldobj);
|
||||||
}
|
}
|
||||||
|
} 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)) {
|
} else if (!testEqualSqlObjects(oldobj, newobj, opts)) {
|
||||||
plan.recreates.sqlObjects += 1;
|
plan.recreates.sqlObjects += 1;
|
||||||
plan.dropSqlObject(oldobj);
|
plan.dropSqlObject(oldobj);
|
||||||
@@ -654,6 +662,7 @@ export function createAlterDatabasePlan(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let newList = newDb[objectTypeField] || [];
|
let newList = newDb[objectTypeField] || [];
|
||||||
if (objectTypeField == 'views') {
|
if (objectTypeField == 'views') {
|
||||||
|
|||||||
Reference in New Issue
Block a user