Browse Source

fix: upgrader correction - missing transaction ref

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

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

@ -29,18 +29,26 @@ async function upgradeModels({
models.map(async (model: any) => {
const columns = await model.getColumns(ncMeta);
for (const column of columns) {
if(column.uidt !== UITypes.DateTime) continue;
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