Browse Source

feat: use text for SingleLineText & URL (#8933)

pull/8950/head
Mert E 5 months ago committed by GitHub
parent
commit
40622297d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nocodb-sdk/src/lib/sqlUi/DatabricksUi.ts
  2. 24
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  3. 28
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  4. 10
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  5. 26
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  6. 26
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts

4
packages/nocodb-sdk/src/lib/sqlUi/DatabricksUi.ts

@ -58,7 +58,7 @@ export class DatabricksUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '',
@ -176,7 +176,7 @@ export class DatabricksUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '',

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

@ -68,9 +68,9 @@ export class MssqlUi {
{
column_name: 'title',
title: 'Title',
dt: 'varchar',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -78,10 +78,10 @@ export class MssqlUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -187,9 +187,9 @@ export class MssqlUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'varchar',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -197,10 +197,10 @@ export class MssqlUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -682,7 +682,7 @@ export class MssqlUi {
colProp.dt = 'varchar';
break;
case 'SingleLineText':
colProp.dt = 'varchar';
colProp.dt = 'text';
break;
case 'LongText':
colProp.dt = 'text';
@ -733,7 +733,7 @@ export class MssqlUi {
};
break;
case 'URL':
colProp.dt = 'varchar';
colProp.dt = 'text';
colProp.validate = {
func: ['isURL'],
args: [''],
@ -819,7 +819,7 @@ export class MssqlUi {
case 'Attachment':
case 'Collaborator':
case 'GeoData':
return ['char', 'ntext', 'text', 'varchar', 'nvarchar'];
return ['text', 'varchar', 'nvarchar', 'char', 'ntext'];
case 'JSON':
return ['text', 'ntext'];
@ -844,7 +844,7 @@ export class MssqlUi {
return ['varchar'];
case 'URL':
return ['varchar', 'text'];
return ['text', 'varchar'];
case 'Number':
return [

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

@ -72,9 +72,9 @@ export class MysqlUi {
{
column_name: 'title',
title: 'Title',
dt: 'varchar',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -82,10 +82,10 @@ export class MysqlUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -191,9 +191,9 @@ export class MysqlUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'varchar',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -201,10 +201,10 @@ export class MysqlUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -1010,7 +1010,7 @@ export class MysqlUi {
colProp.dt = 'varchar';
break;
case 'SingleLineText':
colProp.dt = 'varchar';
colProp.dt = 'text';
break;
case 'LongText':
colProp.dt = 'text';
@ -1068,7 +1068,7 @@ export class MysqlUi {
};
break;
case 'URL':
colProp.dt = 'varchar';
colProp.dt = 'text';
colProp.validate = {
func: ['isURL'],
args: [''],
@ -1157,13 +1157,13 @@ export class MysqlUi {
case 'Collaborator':
case 'GeoData':
return [
'char',
'varchar',
'nchar',
'text',
'tinytext',
'mediumtext',
'longtext',
'varchar',
'char',
'nchar',
'tinytext',
];
case 'Attachment':

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

@ -31,9 +31,9 @@ export class OracleUi {
{
column_name: 'title',
title: 'Title',
dt: 'varchar',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -41,7 +41,7 @@ export class OracleUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
@ -817,7 +817,7 @@ export class OracleUi {
colProp.dt = 'varchar';
break;
case 'SingleLineText':
colProp.dt = 'varchar';
colProp.dt = 'clob';
break;
case 'LongText':
colProp.dt = 'clob';
@ -869,7 +869,7 @@ export class OracleUi {
};
break;
case 'URL':
colProp.dt = 'varchar';
colProp.dt = 'clob';
colProp.validate = {
func: ['isURL'],
args: [''],

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

@ -131,9 +131,9 @@ export class PgUi {
{
column_name: 'title',
title: 'Title',
dt: 'character varying',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -141,10 +141,10 @@ export class PgUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -249,9 +249,9 @@ export class PgUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'character varying',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -259,10 +259,10 @@ export class PgUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -1632,7 +1632,7 @@ export class PgUi {
colProp.dt = 'character varying';
break;
case 'SingleLineText':
colProp.dt = 'character varying';
colProp.dt = 'text';
break;
case 'LongText':
colProp.dt = 'text';
@ -1683,7 +1683,7 @@ export class PgUi {
};
break;
case 'URL':
colProp.dt = 'character varying';
colProp.dt = 'text';
colProp.validate = {
func: ['isURL'],
args: [''],
@ -1784,10 +1784,10 @@ export class PgUi {
case 'LongText':
case 'Collaborator':
case 'GeoData':
return ['char', 'character', 'character varying', 'text'];
return ['text', 'character varying', 'char', 'character'];
case 'Attachment':
return ['json', 'char', 'character', 'character varying', 'text'];
return ['json', 'text', 'char', 'character', 'character varying'];
case 'JSON':
return ['json', 'jsonb', 'text'];
@ -1838,7 +1838,7 @@ export class PgUi {
return ['character varying'];
case 'URL':
return ['character varying', 'text'];
return ['text', 'character varying'];
case 'Number':
return [

26
packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts

@ -67,9 +67,9 @@ export class SnowflakeUi {
{
column_name: 'title',
title: 'Title',
dt: 'varchar',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -77,10 +77,10 @@ export class SnowflakeUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -185,9 +185,9 @@ export class SnowflakeUi {
static getNewColumn(suffix) {
return {
column_name: 'title' + suffix,
dt: 'varchar',
dt: 'TEXT',
dtx: 'specificType',
ct: 'varchar(45)',
ct: null,
nrqd: true,
rqd: false,
ck: false,
@ -195,10 +195,10 @@ export class SnowflakeUi {
un: false,
ai: false,
cdf: null,
clen: 45,
clen: null,
np: null,
ns: null,
dtxp: '45',
dtxp: '',
dtxs: '',
altered: 1,
uidt: 'SingleLineText',
@ -726,7 +726,7 @@ export class SnowflakeUi {
colProp.dt = 'VARCHAR';
break;
case 'SingleLineText':
colProp.dt = 'VARCHAR';
colProp.dt = 'TEXT';
break;
case 'LongText':
colProp.dt = 'TEXT';
@ -776,7 +776,7 @@ export class SnowflakeUi {
};
break;
case 'URL':
colProp.dt = 'VARCHAR';
colProp.dt = 'TEXT';
colProp.validate = {
func: ['isURL'],
args: [''],
@ -864,10 +864,10 @@ export class SnowflakeUi {
case 'LongText':
case 'Collaborator':
case 'GeoData':
return ['CHAR', 'CHARACTER', 'VARCHAR', 'TEXT'];
return ['TEXT', 'VARCHAR', 'CHARACTER', 'CHAR'];
case 'Attachment':
return ['TEXT', 'CHAR', 'CHARACTER', 'VARCHAR', 'text'];
return ['TEXT', 'CHAR', 'CHARACTER', 'VARCHAR'];
case 'JSON':
return ['TEXT'];
@ -891,7 +891,7 @@ export class SnowflakeUi {
return ['VARCHAR'];
case 'URL':
return ['VARCHAR', 'TEXT'];
return ['TEXT', 'VARCHAR'];
case 'Number':
return [

Loading…
Cancel
Save