Browse Source

fix(api): oracledb - mm column creation

feat/oracle-support
Pranav C 2 years ago committed by Pranav C
parent
commit
792e76a774
  1. 12
      packages/nocodb/src/lib/db/sql-client/lib/oracle/OracleClient.ts

12
packages/nocodb/src/lib/db/sql-client/lib/oracle/OracleClient.ts

@ -2012,14 +2012,6 @@ class OracleClient extends KnexClient {
} }
alterTableColumn(t, n, o, existingQuery, change = 2) { alterTableColumn(t, n, o, existingQuery, change = 2) {
// CREATE TABLE test1 ( id integer NOT NULL, title varchar NULL);
// CREATE TABLE CHINOOK.NEWTABLE_1 (
// ID INTEGER NOT NULL,
// TITLE VARCHAR(100),
// CONSTRAINT NEWTABLE_1_PK PRIMARY KEY (ID)
// );
const scale = parseInt(n.dtxs) ? parseInt(n.dtxs) : null; const scale = parseInt(n.dtxs) ? parseInt(n.dtxs) : null;
let query = existingQuery ? ',' : ''; let query = existingQuery ? ',' : '';
@ -2031,11 +2023,11 @@ class OracleClient extends KnexClient {
switch (n.dt) { switch (n.dt) {
case 'NUMBER': case 'NUMBER':
default: default:
query += ` ${n.cn} NUMBER `; query += this.genQuery(` ?? NUMBER `, [n.cn]);
break; break;
} }
} else { } else {
query += ` ${n.cn} ${n.dt}`; query += this.genQuery(` ?? ${n.dt}`, [n.cn]);
} }
if (!['CLOB', 'NCLOB'].includes(n.dt)) { if (!['CLOB', 'NCLOB'].includes(n.dt)) {
query += n.dtxp && n.dtxp !== ' ' ? `(${n.dtxp}` : ''; query += n.dtxp && n.dtxp !== ' ' ? `(${n.dtxp}` : '';

Loading…
Cancel
Save