diff --git a/packages/nocodb/src/lib/meta/api/tableApis.ts b/packages/nocodb/src/lib/meta/api/tableApis.ts index dc9abe73c6..0fbda374e1 100644 --- a/packages/nocodb/src/lib/meta/api/tableApis.ts +++ b/packages/nocodb/src/lib/meta/api/tableApis.ts @@ -103,6 +103,9 @@ export async function tableCreate(req: Request, res) { } } + // Cleanup table name + req.body.table_name = req.body.table_name.toLowerCase().replace(/ /g, '_'); + // validate table name if (/^\s+|\s+$/.test(req.body.table_name)) { NcError.badRequest(