diff --git a/libs/external-db-mysql/src/sql_schema_translator.spec.ts b/libs/external-db-mysql/src/sql_schema_translator.spec.ts index 5fc97f69c..687b6e550 100644 --- a/libs/external-db-mysql/src/sql_schema_translator.spec.ts +++ b/libs/external-db-mysql/src/sql_schema_translator.spec.ts @@ -68,7 +68,7 @@ describe('Sql Schema Column Translator', () => { describe('string fields', () => { test('string', () => { - expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeId(ctx.fieldName)} VARCHAR(2048)`) + expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeId(ctx.fieldName)} VARCHAR(65535)`) }) test('string with length', () => { diff --git a/libs/external-db-mysql/src/sql_schema_translator.ts b/libs/external-db-mysql/src/sql_schema_translator.ts index 5247c4a24..9137372dd 100644 --- a/libs/external-db-mysql/src/sql_schema_translator.ts +++ b/libs/external-db-mysql/src/sql_schema_translator.ts @@ -142,11 +142,11 @@ export default class SchemaColumnTranslato { try { const parsed = parseInt(length) if (isNaN(parsed) || parsed <= 0) { - return '(2048)' + return '(65535)' } return `(${parsed})` } catch (e) { - return '(2048)' + return '(65535)' } } diff --git a/libs/external-db-postgres/src/sql_schema_translator.spec.ts b/libs/external-db-postgres/src/sql_schema_translator.spec.ts index c09f4b7d4..5cadc95b8 100644 --- a/libs/external-db-postgres/src/sql_schema_translator.spec.ts +++ b/libs/external-db-postgres/src/sql_schema_translator.spec.ts @@ -54,7 +54,7 @@ describe('Sql Schema Column Translator', () => { describe('string fields', () => { test('string', () => { - expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeIdentifier(ctx.fieldName)} varchar(2048)`) + expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeIdentifier(ctx.fieldName)} varchar(65535)`) }) test('string with length', () => { diff --git a/libs/external-db-postgres/src/sql_schema_translator.ts b/libs/external-db-postgres/src/sql_schema_translator.ts index 0966a06d1..23c56400a 100644 --- a/libs/external-db-postgres/src/sql_schema_translator.ts +++ b/libs/external-db-postgres/src/sql_schema_translator.ts @@ -137,11 +137,11 @@ export default class SchemaColumnTranslator { try { const parsed = parseInt(length) if (isNaN(parsed) || parsed <= 0) { - return '(2048)' + return '(65535)' } return `(${parsed})` } catch (e) { - return '(2048)' + return '(65535)' } }