Browse Source

feat: change the default created/updated column type and mark as system field

pull/7304/head
Pranav C 11 months ago
parent
commit
60610e1e01
  1. 6
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  2. 10
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  3. 6
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  4. 6
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts
  5. 6
      packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

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

@ -107,9 +107,10 @@ export class MssqlUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.CreateTime,
uip: '',
uicn: '',
system: true,
},
{
column_name: 'updated_at',
@ -131,9 +132,10 @@ export class MssqlUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.LastModifiedTime,
uip: '',
uicn: '',
system: true,
},
];
}

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

@ -111,9 +111,10 @@ export class MysqlUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.CreateTime,
uip: '',
uicn: '',
system: true,
},
{
column_name: 'updated_at',
@ -134,9 +135,10 @@ export class MysqlUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.LastModifiedTime,
uip: '',
uicn: '',
system: true,
},
];
}
@ -1073,11 +1075,11 @@ export class MysqlUi {
break;
case 'CreateTime':
colProp.dt = 'timestamp';
colProp.cdf = 'CURRENT_TIMESTAMP'
colProp.cdf = 'CURRENT_TIMESTAMP';
break;
case 'LastModifiedTime':
colProp.dt = 'timestamp';
colProp.cdf = 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'
colProp.cdf = 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP';
break;
case 'AutoNumber':
colProp.dt = 'int';

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

@ -170,9 +170,10 @@ export class PgUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.CreateTime,
uip: '',
uicn: '',
system: true,
},
{
column_name: 'updated_at',
@ -194,9 +195,10 @@ export class PgUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.LastModifiedTime,
uip: '',
uicn: '',
system: true,
},
];
}

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

@ -106,9 +106,10 @@ export class SnowflakeUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.CreateTime,
uip: '',
uicn: '',
system: true,
},
{
column_name: 'updated_at',
@ -130,9 +131,10 @@ export class SnowflakeUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.LastModifiedTime,
uip: '',
uicn: '',
system: true,
},
];
}

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

@ -94,9 +94,10 @@ export class SqliteUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.CreateTime,
uip: '',
uicn: '',
system: true,
},
{
column_name: 'updated_at',
@ -117,9 +118,10 @@ export class SqliteUi {
dtxp: '',
dtxs: '',
altered: 1,
uidt: UITypes.DateTime,
uidt: UITypes.LastModifiedTime,
uip: '',
uicn: '',
system: true,
},
];
}

Loading…
Cancel
Save