mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
FK test
This commit is contained in:
@@ -26,13 +26,15 @@ function pickImportantTableInfo(engine, table) {
|
|||||||
.map(props =>
|
.map(props =>
|
||||||
_.omitBy(props, (v, k) => k == 'defaultValue' && v == 'NULL' && engine.setNullDefaultInsteadOfDrop)
|
_.omitBy(props, (v, k) => k == 'defaultValue' && v == 'NULL' && engine.setNullDefaultInsteadOfDrop)
|
||||||
),
|
),
|
||||||
// foreignKeys: table.foreignKeys
|
|
||||||
// .sort((a, b) => a.refTableName.localeCompare(b.refTableName))
|
// TODO:
|
||||||
// .map(fk => ({
|
foreignKeys: table.foreignKeys
|
||||||
// constraintType: fk.constraintType,
|
.sort((a, b) => a.refTableName.localeCompare(b.refTableName))
|
||||||
// refTableName: fk.refTableName,
|
.map(fk => ({
|
||||||
// columns: fk.columns.map(col => ({ columnName: col.columnName, refColumnName: col.refColumnName })),
|
constraintType: fk.constraintType,
|
||||||
// })),
|
refTableName: fk.refTableName,
|
||||||
|
columns: fk.columns.map(col => ({ columnName: col.columnName, refColumnName: col.refColumnName })),
|
||||||
|
})),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +105,7 @@ async function testTableDiff(engine, conn, driver, mangle, changedTable = 't1')
|
|||||||
|
|
||||||
await driver.script(conn, sql);
|
await driver.script(conn, sql);
|
||||||
|
|
||||||
|
// TODO:
|
||||||
// if (!engine.skipIncrementalAnalysis) {
|
// if (!engine.skipIncrementalAnalysis) {
|
||||||
// const structure2RealIncremental = await driver.analyseIncremental(conn, structure1Source);
|
// const structure2RealIncremental = await driver.analyseIncremental(conn, structure1Source);
|
||||||
// checkTableStructure(engine, tget(structure2RealIncremental), tget(structure2));
|
// checkTableStructure(engine, tget(structure2RealIncremental), tget(structure2));
|
||||||
|
|||||||
Reference in New Issue
Block a user