Browse Source

fix: setting new column to singleline text

Signed-off-by: Naveen MR <oof1lab@gmail.com>
pull/1884/head
Naveen MR 3 years ago
parent
commit
5703be3666
  1. 13
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  2. 35
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  3. 33
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  4. 13
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  5. 11
      packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

13
packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts

@ -138,10 +138,10 @@ export class MssqlUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'int',
column_name: 'title' + suffix,
dt: 'varchar',
dtx: 'specificType',
ct: 'integer(11)',
ct: 'varchar(45)',
nrqd: true,
rqd: false,
ck: false,
@ -152,11 +152,10 @@ export class MssqlUi {
clen: 45,
np: null,
ns: null,
// data_type_x_specific: ' ',
dtxp: '',
dtxs: ' ',
dtxp: '45',
dtxs: '',
altered: 1,
uidt: 'Number',
uidt: 'SingleLineText',
uip: '',
uicn: ''
};

35
packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts

@ -46,8 +46,8 @@ export class MysqlUi {
static getNewTableColumns(): readonly any[] {
return [
{
column_name: 'id',
title: 'Id',
column_name: 'id',
title: 'Id',
dt: 'int',
dtx: 'integer',
ct: 'int(11)',
@ -69,8 +69,8 @@ export class MysqlUi {
uicn: ''
},
{
column_name: 'title',
title: 'Title',
column_name: 'title',
title: 'Title',
dt: 'varchar',
dtx: 'specificType',
ct: 'varchar(45)',
@ -92,8 +92,8 @@ export class MysqlUi {
uicn: ''
},
{
column_name: 'created_at',
title: 'CreatedAt',
column_name: 'created_at',
title: 'CreatedAt',
dt: 'timestamp',
dtx: 'specificType',
ct: 'varchar(45)',
@ -115,8 +115,8 @@ export class MysqlUi {
uicn: ''
},
{
column_name: 'updated_at',
title: 'UpdatedAt',
column_name: 'updated_at',
title: 'UpdatedAt',
dt: 'timestamp',
dtx: 'specificType',
ct: 'varchar(45)',
@ -142,10 +142,10 @@ export class MysqlUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'int',
column_name: 'title' + suffix,
dt: 'varchar',
dtx: 'specificType',
ct: 'integer(11)',
ct: 'varchar(45)',
nrqd: true,
rqd: false,
ck: false,
@ -156,11 +156,10 @@ export class MysqlUi {
clen: 45,
np: null,
ns: null,
// data_type_x_specific: ' ',
dtxp: '11',
dtxs: ' ',
dtxp: '45',
dtxs: '',
altered: 1,
uidt: 'Number',
uidt: 'SingleLineText',
uip: '',
uicn: ''
};
@ -678,14 +677,14 @@ export class MysqlUi {
// set headers before settings result
for (let i = 0; i < keys.length; i++) {
const text = keys[i];
headers.push({ text, value: text, sortable: false });
headers.push({text, value: text, sortable: false});
}
} else {
const keys = Object.keys(result);
for (let i = 0; i < keys.length; i++) {
const text = keys[i];
if (typeof text !== 'function') {
headers.push({ text, value: text, sortable: false });
headers.push({text, value: text, sortable: false});
}
}
result = [result];
@ -732,7 +731,7 @@ export class MysqlUi {
const column = {
dp: null,
tn,
column_name: keys[i],
column_name: keys[i],
cno: keys[i],
np: 10,
ns: 0,

33
packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts

@ -2,8 +2,8 @@ export class OracleUi {
static getNewTableColumns(): any[] {
return [
{
column_name: 'id',
title: 'Id',
column_name: 'id',
title: 'Id',
dt: 'integer',
dtx: 'integer',
ct: 'int(11)',
@ -25,8 +25,8 @@ export class OracleUi {
uicn: ''
},
{
column_name: 'title',
title: 'Title',
column_name: 'title',
title: 'Title',
dt: 'varchar',
dtx: 'specificType',
ct: 'varchar(45)',
@ -88,10 +88,10 @@ export class OracleUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'integer',
column_name: 'title' + suffix,
dt: 'varchar',
dtx: 'specificType',
ct: 'integer(11)',
ct: 'varchar(45)',
nrqd: true,
rqd: false,
ck: false,
@ -102,11 +102,10 @@ export class OracleUi {
clen: 45,
np: null,
ns: null,
// data_type_x_specific: ' ',
dtxp: '11',
dtxs: ' ',
dtxp: '45',
dtxs: '',
altered: 1,
uidt: 'Number',
uidt: 'SingleLineText',
uip: '',
uicn: ''
};
@ -503,7 +502,7 @@ export class OracleUi {
columns.push({
dp: null,
tn,
column_name: keys[i],
column_name: keys[i],
cno: keys[i],
dt: 'int',
np: 10,
@ -529,7 +528,7 @@ export class OracleUi {
columns.push({
dp: null,
tn,
column_name: keys[i],
column_name: keys[i],
cno: keys[i],
dt: 'float',
np: 10,
@ -560,7 +559,7 @@ export class OracleUi {
columns.push({
dp: null,
tn,
column_name: keys[i],
column_name: keys[i],
cno: keys[i],
dt: 'varchar',
np: 45,
@ -586,7 +585,7 @@ export class OracleUi {
columns.push({
dp: null,
tn,
column_name: keys[i],
column_name: keys[i],
cno: keys[i],
dt: 'text',
np: null,
@ -616,7 +615,7 @@ export class OracleUi {
columns.push({
dp: null,
tn,
column_name: keys[i],
column_name: keys[i],
cno: keys[i],
dt: 'boolean',
np: 3,
@ -644,7 +643,7 @@ export class OracleUi {
columns.push({
dp: null,
tn,
column_name: keys[i],
column_name: keys[i],
cno: keys[i],
dt: 'json',
np: 3,

13
packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts

@ -202,10 +202,10 @@ export class PgUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'int4',
column_name: 'title' + suffix,
dt: 'character varying',
dtx: 'specificType',
ct: 'integer(11)',
ct: 'varchar(45)',
nrqd: true,
rqd: false,
ck: false,
@ -216,11 +216,10 @@ export class PgUi {
clen: 45,
np: null,
ns: null,
// data_type_x_specific: ' ',
dtxp: '11',
dtxs: ' ',
dtxp: '45',
dtxs: '',
altered: 1,
uidt: 'Number',
uidt: 'SingleLineText',
uip: '',
uicn: ''
};

11
packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

@ -125,10 +125,10 @@ export class SqliteUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'integer',
column_name: 'title' + suffix,
dt: 'varchar',
dtx: 'specificType',
ct: 'integer(11)',
ct: 'varchar',
nrqd: true,
rqd: false,
ck: false,
@ -139,11 +139,10 @@ export class SqliteUi {
clen: 45,
np: null,
ns: null,
// data_type_x_specific: ' ',
dtxp: '',
dtxs: ' ',
dtxs: '',
altered: 1,
uidt: 'Number',
uidt: 'SingleLineText',
uip: '',
uicn: ''
};

Loading…
Cancel
Save