Browse Source

fix: drop mm table on column delete

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5609/head
mertmit 2 years ago
parent
commit
a317def6f5
  1. 2
      packages/nocodb/src/services/columns.service.ts

2
packages/nocodb/src/services/columns.service.ts

@ -1287,6 +1287,8 @@ export class ColumnsService {
// ignore deleting table if it has more than 2 columns
// the expected 2 columns would be table1_id & table2_id
if (mmTable.columns.length === 2) {
(mmTable as any).tn = mmTable.table_name;
await sqlMgr.sqlOpPlus(base, 'tableDelete', mmTable);
await mmTable.delete();
}
}

Loading…
Cancel
Save