Browse Source

fix: handle single quote while adding column

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7173/head
Pranav C 11 months ago committed by Ramesh Mane
parent
commit
107d11fd36
  1. 7
      packages/nocodb/src/services/columns.service.ts

7
packages/nocodb/src/services/columns.service.ts

@ -1295,12 +1295,7 @@ export class ColumnsService {
} }
// handle single quote for default value // handle single quote for default value
if ( if (driverType === 'pg' || driverType === 'sqlite3') {
driverType === 'mysql' ||
driverType === 'mysql2' ||
driverType === 'pg' ||
driverType === 'sqlite3'
) {
colBody.cdf = colBody.cdf.replace(/'/g, "'"); colBody.cdf = colBody.cdf.replace(/'/g, "'");
} else { } else {
colBody.cdf = colBody.cdf.replace(/'/g, "''"); colBody.cdf = colBody.cdf.replace(/'/g, "''");

Loading…
Cancel
Save