From a674b9b3a16c6f325f5fa2ce360a9bc6c1484597 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Tue, 29 Oct 2024 15:05:43 +0100 Subject: [PATCH] check default value --- integration-tests/__tests__/alter-table.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/__tests__/alter-table.spec.js b/integration-tests/__tests__/alter-table.spec.js index 873b3051..52b8957b 100644 --- a/integration-tests/__tests__/alter-table.spec.js +++ b/integration-tests/__tests__/alter-table.spec.js @@ -7,7 +7,7 @@ const crypto = require('crypto'); const { getAlterTableScript, extendDatabaseInfo, generateDbPairingId } = require('dbgate-tools'); function pickImportantTableInfo(engine, table) { - const props = ['columnName']; + const props = ['columnName', 'defaultValue']; if (!engine.skipNullability) props.push('notNull'); if (!engine.skipAutoIncrement) props.push('autoIncrement'); return { @@ -141,7 +141,7 @@ describe('Alter table', () => { 'Add default value - %s', testWrapper(async (conn, driver, engine) => { await testTableDiff(engine, conn, driver, tbl => { - tbl.columns.find(x => x.columnName == 'col_std').defaultValue = 123; + tbl.columns.find(x => x.columnName == 'col_std').defaultValue = '123'; }); }) ); @@ -159,7 +159,7 @@ describe('Alter table', () => { 'Change default value - %s', testWrapper(async (conn, driver, engine) => { await testTableDiff(engine, conn, driver, tbl => { - tbl.columns.find(x => x.columnName == 'col_def').defaultValue = 567; + tbl.columns.find(x => x.columnName == 'col_def').defaultValue = '567'; }); }) );