Browse Source

fix: Track audits of new tables

related #290

Signed-off-by: Pranav C Balan <pranavxc@gmail.com>
pull/293/head
Pranav C Balan 3 years ago
parent
commit
d97c9481c3
  1. 15
      packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts

15
packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts

@ -305,10 +305,7 @@ export default abstract class BaseApiBuilder<T extends Noco> implements XcDynami
const metaObj = JSON.parse(modelRow.meta); const metaObj = JSON.parse(modelRow.meta);
this.metas[tn] = metaObj; this.metas[tn] = metaObj;
this.baseLog(`onValidationUpdate : Generating model instance for '%s' table`, tn) this.baseLog(`onValidationUpdate : Generating model instance for '%s' table`, tn)
this.models[modelRow.title] = new BaseModelSql({ this.models[modelRow.title] = this.getBaseModel(metaObj);
dbDriver: this.dbDriver,
...metaObj
});
// todo: check tableAlias changed or not // todo: check tableAlias changed or not
await this.onTableRename(tn, tn) await this.onTableRename(tn, tn)
@ -559,10 +556,7 @@ export default abstract class BaseApiBuilder<T extends Noco> implements XcDynami
} }
this.baseLog(`onTableUpdate : Generating model instance for '%s' table`, tn) this.baseLog(`onTableUpdate : Generating model instance for '%s' table`, tn)
this.models[tn] = new BaseModelSql({ this.models[tn] = this.getBaseModel(newMeta);
dbDriver: this.dbDriver,
...newMeta
});
await NcHelp.executeOperations(aclOper, this.connectionConfig.client); await NcHelp.executeOperations(aclOper, this.connectionConfig.client);
@ -617,10 +611,7 @@ export default abstract class BaseApiBuilder<T extends Noco> implements XcDynami
} }
this.baseLog(`onViewUpdate : Generating model instance for '%s' table`, viewName) this.baseLog(`onViewUpdate : Generating model instance for '%s' table`, viewName)
this.models[viewName] = new BaseModelSql({ this.models[viewName] = this.getBaseModel(newMeta);
dbDriver: this.dbDriver,
...newMeta
});
} }

Loading…
Cancel
Save