Browse Source

fix: upgrader correction - missing transaction ref

pull/7304/head
Pranav C 12 months ago
parent
commit
90a2b2fa40
  1. 16
      packages/nocodb/src/version-upgrader/ncXcdbCreatedAndUpdatedTimeUpgrader.ts

16
packages/nocodb/src/version-upgrader/ncXcdbCreatedAndUpdatedTimeUpgrader.ts

@ -31,16 +31,24 @@ async function upgradeModels({
for (const column of columns) {
if (column.uidt !== UITypes.DateTime) continue;
if (column.column_name === 'created_at') {
await Column.update(column.id, {
await Column.update(
column.id,
{
uidt: UITypes.CreatedTime,
system: true,
});
},
ncMeta,
);
}
if (column.uidt === 'updated_at') {
await Column.update(column.id, {
await Column.update(
column.id,
{
uidt: UITypes.LastModifiedTime,
system: true,
});
},
ncMeta,
);
}
}
logger.log(`Upgraded model ${model.name} from source ${source.name}`);

Loading…
Cancel
Save