mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 13:53:59 +00:00
diff tools fixes
This commit is contained in:
@@ -7,6 +7,7 @@ function replaceInText(text, replacements) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function replaceInCollection(collection, replacements) {
|
function replaceInCollection(collection, replacements) {
|
||||||
|
if (!collection) return collection;
|
||||||
return collection.map(item => {
|
return collection.map(item => {
|
||||||
if (item.createSql) {
|
if (item.createSql) {
|
||||||
return {
|
return {
|
||||||
@@ -22,6 +23,9 @@ const sqlTextReplacementTransform = replacements => database => {
|
|||||||
return {
|
return {
|
||||||
...database,
|
...database,
|
||||||
views: replaceInCollection(database.views, replacements),
|
views: replaceInCollection(database.views, replacements),
|
||||||
|
matviews: replaceInCollection(database.matviews, replacements),
|
||||||
|
procedures: replaceInCollection(database.procedures, replacements),
|
||||||
|
functions: replaceInCollection(database.functions, replacements),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ export function testEqualTables(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function testEqualSqlObjects(a: SqlObjectInfo, b: SqlObjectInfo, opts: DbDiffOptions) {
|
export function testEqualSqlObjects(a: SqlObjectInfo, b: SqlObjectInfo, opts: DbDiffOptions) {
|
||||||
return a.createSql == b.createSql;
|
return a.createSql?.trim() == b.createSql?.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createAlterTablePlan(
|
export function createAlterTablePlan(
|
||||||
|
|||||||
Reference in New Issue
Block a user