diff --git a/integration-tests/__tests__/table-create.spec.js b/integration-tests/__tests__/table-create.spec.js index fd5ffe0df..7e0357d68 100644 --- a/integration-tests/__tests__/table-create.spec.js +++ b/integration-tests/__tests__/table-create.spec.js @@ -64,6 +64,40 @@ describe('Table create', () => { }) ); + test.each( + engines.filter(i => i.supportTableComments || i.supportColumnComments).map(engine => [engine.label, engine]) + )( + 'Simple table with comment - %s', + testWrapper(async (conn, driver, engine) => { + await testTableCreate(engine, conn, driver, { + ...(engine.supportTableComments && { + schemaName: 'dbo', + objectComment: 'table comment', + }), + ...(engine.defaultSchemaName && { + schemaName: engine.defaultSchemaName, + }), + columns: [ + { + columnName: 'col1', + dataType: 'int', + pureName: 'tested', + ...(engine.skipNullability ? {} : { notNull: true }), + ...(engine.supportColumnComments && { + columnComment: 'column comment', + }), + ...(engine.defaultSchemaName && { + schemaName: engine.defaultSchemaName, + }), + }, + ], + primaryKey: { + columns: [{ columnName: 'col1' }], + }, + }); + }) + ); + test.each(engines.filter(x => !x.skipIndexes).map(engine => [engine.label, engine]))( 'Table with index - %s', testWrapper(async (conn, driver, engine) => { diff --git a/integration-tests/engines.js b/integration-tests/engines.js index 1fb4f28dd..6c16040a9 100644 --- a/integration-tests/engines.js +++ b/integration-tests/engines.js @@ -443,6 +443,8 @@ const sqlServerEngine = { supportSchemas: true, supportRenameSqlObject: true, defaultSchemaName: 'dbo', + supportTableComments: true, + supportColumnComments: true, // skipSeparateSchemas: true, triggers: [ { diff --git a/packages/types/test-engines.d.ts b/packages/types/test-engines.d.ts index 4388e5c85..9f4e2e3e9 100644 --- a/packages/types/test-engines.d.ts +++ b/packages/types/test-engines.d.ts @@ -56,6 +56,9 @@ export type TestEngineInfo = { useTextTypeForStrings?: boolean; + supportTableComments?: boolean; + supportColumnComments?: boolean; + supportRenameSqlObject?: boolean; supportSchemas?: boolean;