mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
deploy fix
This commit is contained in:
parent
fa2bb52007
commit
01681b9d87
@ -244,14 +244,16 @@ export function testEqualColumns(
|
||||
}
|
||||
|
||||
function testEqualConstraints(a: ConstraintInfo, b: ConstraintInfo, opts: DbDiffOptions = {}) {
|
||||
const omitList = [];
|
||||
if (opts.ignoreConstraintNames) omitList.push('constraintName');
|
||||
if (opts.schemaMode == 'ignore') omitList.push('schemaName');
|
||||
|
||||
// if (a.constraintType == 'primaryKey' && b.constraintType == 'primaryKey') {
|
||||
// console.log('PK1', stableStringify(opts.ignoreConstraintNames ? _.omit(a, ['constraintName']) : a));
|
||||
// console.log('PK2', stableStringify(opts.ignoreConstraintNames ? _.omit(b, ['constraintName']) : b));
|
||||
// console.log('PK1', stableStringify(_.omit(a, omitList)));
|
||||
// console.log('PK2', stableStringify(_.omit(b, omitList)));
|
||||
// }
|
||||
return (
|
||||
stableStringify(opts.ignoreConstraintNames ? _.omit(a, ['constraintName']) : a) ==
|
||||
stableStringify(opts.ignoreConstraintNames ? _.omit(b, ['constraintName']) : b)
|
||||
);
|
||||
|
||||
return stableStringify(_.omit(a, omitList)) == stableStringify(_.omit(b, omitList));
|
||||
}
|
||||
|
||||
export function testEqualTypes(a: ColumnInfo, b: ColumnInfo, opts: DbDiffOptions = {}) {
|
||||
|
Loading…
Reference in New Issue
Block a user