Browse Source

feat: duplicate column support

pull/7304/head
Pranav C 11 months ago
parent
commit
622744a93a
  1. 22
      packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts

22
packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts

@ -766,6 +766,8 @@ export class ImportService {
a.uidt === UITypes.Rollup ||
a.uidt === UITypes.Formula ||
a.uidt === UITypes.QrCode ||
a.uidt === UITypes.CreateTime ||
a.uidt === UITypes.LastModifiedTime ||
a.uidt === UITypes.Barcode,
),
);
@ -886,6 +888,26 @@ export class ImportService {
user: param.user,
});
for (const nColumn of freshModelData.columns) {
if (nColumn.title === col.title) {
idMap.set(col.id, nColumn.id);
break;
}
}
} else if (
col.uidt === UITypes.CreateTime ||
col.uidt === UITypes.LastModifiedTime
) {
const freshModelData = await this.columnsService.columnAdd({
tableId: getIdOrExternalId(getParentIdentifier(col.id)),
column: withoutId({
...flatCol,
system: false,
}) as any,
req: param.req,
user: param.user,
});
for (const nColumn of freshModelData.columns) {
if (nColumn.title === col.title) {
idMap.set(col.id, nColumn.id);

Loading…
Cancel
Save