diff --git a/integration-tests/__tests__/table-analyse.spec.js b/integration-tests/__tests__/table-analyse.spec.js index d005bd364..43c3c439f 100644 --- a/integration-tests/__tests__/table-analyse.spec.js +++ b/integration-tests/__tests__/table-analyse.spec.js @@ -7,7 +7,7 @@ const ix1Sql = 'CREATE index ~ix1 ON ~t1(~val1, ~id)'; const t2Sql = engine => `CREATE TABLE ~t2 (~id int not null primary key, ~val2 varchar(50) ${engine.skipUnique ? '' : 'unique'})`; const t3Sql = 'CREATE TABLE ~t3 (~id int not null primary key, ~valfk int, foreign key (~valfk) references ~t2(~id))'; -const t4Sql = 'CREATE TABLE ~t4 (~id int not null primary key, ~valdef int not null default 12)'; +const t4Sql = 'CREATE TABLE ~t4 (~id int not null primary key, ~valdef int default 12 not null)'; // const fkSql = 'ALTER TABLE t3 ADD FOREIGN KEY (valfk) REFERENCES t2(id)' const txMatch = (engine, tname, vcolname, nextcol, defaultValue) => diff --git a/plugins/dbgate-plugin-oracle/src/backend/Analyser.js b/plugins/dbgate-plugin-oracle/src/backend/Analyser.js index ee60f3c7f..24e4af7a2 100644 --- a/plugins/dbgate-plugin-oracle/src/backend/Analyser.js +++ b/plugins/dbgate-plugin-oracle/src/backend/Analyser.js @@ -23,7 +23,7 @@ function getColumnInfo( columnName: column_name, dataType: fullDataType, notNull: is_nullable == 'N', - defaultValue: autoIncrement ? undefined : default_value, + defaultValue: autoIncrement ? undefined : default_value?.trim(), autoIncrement, }; }