diff --git a/packages/nocodb/src/lib/meta/api/columnApis.ts b/packages/nocodb/src/lib/meta/api/columnApis.ts index f6e86d0967..883ed17cc3 100644 --- a/packages/nocodb/src/lib/meta/api/columnApis.ts +++ b/packages/nocodb/src/lib/meta/api/columnApis.ts @@ -605,6 +605,12 @@ export async function columnAdd(req: Request, res: Response) { ) { colBody.dtxp = "''"; } + + if (colBody.dt === 'set') { + if (colBody.colOptions?.options.length > 64) { + colBody.dt = 'text'; + } + } } } @@ -901,6 +907,12 @@ export async function columnUpdate(req: Request, res: Response) { ) { colBody.dtxp = "''"; } + + if (colBody.dt === 'set') { + if (colBody.colOptions?.options.length > 64) { + colBody.dt = 'text'; + } + } } // Handle option delete diff --git a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts index 090d54a274..39202e609b 100644 --- a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts +++ b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts @@ -577,11 +577,15 @@ export default async ( ncCol.colOptions = { options: [...colOptions.data], }; - // if options are empty, configure '' as default option - ncCol.dtxp = - colOptions.data - .map((el) => `'${el.title.replace(/'/gi, "''")}'`) - .join(',') || "''"; + + if (['mysql', 'mysql2'].includes(getRootDbType())) { + // if options are empty, configure '' as an option + ncCol.dtxp = + colOptions.data + .map((el) => `'${el.title.replace(/'/gi, "''")}'`) + .join(',') || "''"; + } + break; case undefined: break;