mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 12:33:58 +00:00
feat: add ignoreComments options testEqualColumns
This commit is contained in:
@@ -59,6 +59,7 @@ export interface DbDiffOptions {
|
|||||||
|
|
||||||
ignoreForeignKeyActions?: boolean;
|
ignoreForeignKeyActions?: boolean;
|
||||||
ignoreDataTypes?: boolean;
|
ignoreDataTypes?: boolean;
|
||||||
|
ignoreComments?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function generateTablePairingId(table: TableInfo): TableInfo {
|
export function generateTablePairingId(table: TableInfo): TableInfo {
|
||||||
@@ -322,11 +323,14 @@ export function testEqualColumns(
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((a.columnComment || '') != (b.columnComment || '')) {
|
|
||||||
console.debug(
|
if (!opts.ignoreComments) {
|
||||||
`Column ${a.pureName}.${a.columnName}, ${b.pureName}.${b.columnName}: different comment: ${a.columnComment}, ${b.columnComment}`
|
if ((a.columnComment || '') != (b.columnComment || '')) {
|
||||||
);
|
console.debug(
|
||||||
return false;
|
`Column ${a.pureName}.${a.columnName}, ${b.pureName}.${b.columnName}: different comment: ${a.columnComment}, ${b.columnComment}`
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!testEqualTypes(a, b, opts)) {
|
if (!testEqualTypes(a, b, opts)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user