diff --git a/libs/external-db-mssql/src/sql_schema_translator.spec.ts b/libs/external-db-mssql/src/sql_schema_translator.spec.ts index 89d37d9b4..311142309 100644 --- a/libs/external-db-mssql/src/sql_schema_translator.spec.ts +++ b/libs/external-db-mssql/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(65535)`) + expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeId(ctx.fieldName)} VARCHAR(2048)`) }) test('string with length', () => { diff --git a/libs/external-db-mssql/src/sql_schema_translator.ts b/libs/external-db-mssql/src/sql_schema_translator.ts index 452737bc2..0f268f426 100644 --- a/libs/external-db-mssql/src/sql_schema_translator.ts +++ b/libs/external-db-mssql/src/sql_schema_translator.ts @@ -115,11 +115,11 @@ export default class SchemaColumnTranslator { try { const parsed = parseInt(length as string) if (isNaN(parsed) || parsed <= 0) { - return '(65535)' + return '(2048)' } return `(${parsed})` } catch (e) { - return '(65535)' + return '(2048)' } } 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 687b6e550..5fc97f69c 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(65535)`) + expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeId(ctx.fieldName)} VARCHAR(2048)`) }) 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 9137372dd..ad7cf6dc1 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 '(65535)' + return '(204865535)' } return `(${parsed})` } catch (e) { - return '(65535)' + return '(2048)' } } 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 5cadc95b8..c09f4b7d4 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(65535)`) + expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeIdentifier(ctx.fieldName)} varchar(2048)`) }) 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 23c56400a..0966a06d1 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 '(65535)' + return '(2048)' } return `(${parsed})` } catch (e) { - return '(65535)' + return '(2048)' } } diff --git a/libs/external-db-spanner/src/sql_schema_translator.spec.ts b/libs/external-db-spanner/src/sql_schema_translator.spec.ts index d9c44693b..f931b34d9 100644 --- a/libs/external-db-spanner/src/sql_schema_translator.spec.ts +++ b/libs/external-db-spanner/src/sql_schema_translator.spec.ts @@ -56,7 +56,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)} STRING(65535)`) + expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'string' }) ).toEqual(`${escapeId(ctx.fieldName)} STRING(2048)`) }) test('string with length', () => { @@ -76,7 +76,7 @@ describe('Sql Schema Column Translator', () => { }) test('text language', () => { - expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'language' }) ).toEqual(`${escapeId(ctx.fieldName)} STRING(65535)`) + expect( env.schemaTranslator.columnToDbColumnSql({ name: ctx.fieldName, type: 'text', subtype: 'language' }) ).toEqual(`${escapeId(ctx.fieldName)} STRING(2048)`) }) }) diff --git a/libs/external-db-spanner/src/sql_schema_translator.ts b/libs/external-db-spanner/src/sql_schema_translator.ts index 5a2926089..f47d61422 100644 --- a/libs/external-db-spanner/src/sql_schema_translator.ts +++ b/libs/external-db-spanner/src/sql_schema_translator.ts @@ -126,11 +126,11 @@ export default class SchemaColumnTranslator implements ISpannerSchemaColumnTrans try { const parsed = parseInt(length as string) if (isNaN(parsed) || parsed <= 0) { - return '(65535)' + return '(2048)' } return `(${parsed})` } catch (e) { - return '(65535)' + return '(2048)' } }