Browse Source

fix: handle single quote while adding column

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7197/head
Pranav C 11 months ago
parent
commit
a7d3d7335f
  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
if (
driverType === 'mysql' ||
driverType === 'mysql2' ||
driverType === 'pg' ||
driverType === 'sqlite3'
) {
if (driverType === 'pg' || driverType === 'sqlite3') {
colBody.cdf = colBody.cdf.replace(/'/g, "'");
} else {
colBody.cdf = colBody.cdf.replace(/'/g, "''");

Loading…
Cancel
Save