diff --git a/integration-tests/__tests__/alter-processor.spec.js b/integration-tests/__tests__/alter-processor.spec.js index f28f25c41..2aefc4afe 100644 --- a/integration-tests/__tests__/alter-processor.spec.js +++ b/integration-tests/__tests__/alter-processor.spec.js @@ -60,7 +60,7 @@ async function testTableDiff(conn, driver, mangle) { // const TESTED_COLUMNS = ['col_pk', 'col_std', 'col_def', 'col_fk', 'col_ref', 'col_idx', 'col_uq']; // const TESTED_COLUMNS = ['col_pk']; // const TESTED_COLUMNS = ['col_idx']; -const TESTED_COLUMNS = ['col_uq']; +const TESTED_COLUMNS = ['col_ref']; // const TESTED_COLUMNS = ['col_std']; function engines_columns_source() { diff --git a/integration-tests/engines.js b/integration-tests/engines.js index 1bde9c3d8..2b8d38fe4 100644 --- a/integration-tests/engines.js +++ b/integration-tests/engines.js @@ -16,7 +16,6 @@ const matviews = { const engines = [ { label: 'MySQL', - skipLocal: true, connection: { engine: 'mysql@dbgate-plugin-mysql', password: 'Pwd2020Db', @@ -34,7 +33,6 @@ const engines = [ }, { label: 'PostgreSQL', - skipLocal: true, connection: { engine: 'postgres@dbgate-plugin-postgres', password: 'Pwd2020Db', @@ -69,7 +67,6 @@ const engines = [ }, { label: 'SQL Server', - skipLocal: true, connection: { engine: 'mssql@dbgate-plugin-mssql', password: 'Pwd2020Db', @@ -94,7 +91,6 @@ const engines = [ }, { label: 'SQLite', - // skipLocal: true, generateDbFile: true, connection: { engine: 'sqlite@dbgate-plugin-sqlite', @@ -103,7 +99,6 @@ const engines = [ }, { label: 'CockroachDB', - skipLocal: true, connection: { engine: 'cockroach@dbgate-plugin-postgres', user: 'root', @@ -119,4 +114,15 @@ const engines = [ }, ]; -module.exports = process.env.CITEST ? engines.filter(x => !x.skipOnCI) : engines.filter(x => !x.skipLocal); +const filterLocal = [ + // filter local testing + '-MySQL', + 'PostgreSQL', + '-SQL Server', + '-SQLite', + 'CockroachDB', +]; + +module.exports = process.env.CITEST + ? engines.filter(x => !x.skipOnCI) + : engines.filter(x => filterLocal.find(y => x.label == y)); diff --git a/plugins/dbgate-plugin-postgres/src/frontend/drivers.js b/plugins/dbgate-plugin-postgres/src/frontend/drivers.js index 6d57cecd4..67a8e92b5 100644 --- a/plugins/dbgate-plugin-postgres/src/frontend/drivers.js +++ b/plugins/dbgate-plugin-postgres/src/frontend/drivers.js @@ -11,6 +11,7 @@ const dialect = { fallbackDataType: 'varchar', anonymousPrimaryKey: true, enableConstraintsPerTable: true, + dropColumnDependencies: ['dependencies'], quoteIdentifier(s) { return '"' + s + '"'; }, @@ -40,7 +41,7 @@ const postgresDriverBase = { __analyserInternals: { refTableCond: '', - } + }, }; /** @type {import('dbgate-types').EngineDriver} */ @@ -64,12 +65,12 @@ const cockroachDriver = { dialect: { ...dialect, materializedViews: true, - dropColumnDependencies: ['primaryKey'], + dropColumnDependencies: ['primaryKey', 'dependencies'], dropPrimaryKey: false, }, __analyserInternals: { refTableCond: 'and fk.referenced_table_name = ref.table_name', - } + }, }; /** @type {import('dbgate-types').EngineDriver} */