Browse Source

fix: delete partially imported tables on error

pull/6997/head
mertmit 1 year ago
parent
commit
d114ca9421
  1. 7
      packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts

7
packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts

@ -2529,6 +2529,13 @@ export class AtImportProcessor {
await generateMigrationStats(aTblSchema);
}
} catch (e) {
// delete tables that were created
for (const table of ncSchema.tables) {
await this.tablesService.tableDelete({
tableId: table.id,
user: syncDB.user,
});
}
if (e.message) {
this.telemetryService.sendEvent({
evt_type: 'a:airtable-import:error',

Loading…
Cancel
Save