Browse Source

fix: delete audit data on project delete

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5816/head
Pranav C 1 year ago
parent
commit
32c7138d8c
  1. 7
      packages/nocodb/src/models/Project.ts

7
packages/nocodb/src/models/Project.ts

@ -10,7 +10,7 @@ import NocoCache from '../cache/NocoCache';
import Base from './/Base'; import Base from './/Base';
import { ProjectUser } from './index'; import { ProjectUser } from './index';
import type { BoolType, MetaType, ProjectType } from 'nocodb-sdk'; import type { BoolType, MetaType, ProjectType } from 'nocodb-sdk';
import type { DB_TYPES } from './/Base'; import type { DB_TYPES } from './Base';
export default class Project implements ProjectType { export default class Project implements ProjectType {
public id: string; public id: string;
@ -309,6 +309,11 @@ export default class Project implements ProjectType {
`${CacheScope.PROJECT}:${projectId}`, `${CacheScope.PROJECT}:${projectId}`,
CacheDelDirection.CHILD_TO_PARENT, CacheDelDirection.CHILD_TO_PARENT,
); );
await ncMeta.metaDelete(null, null, MetaTable.AUDIT, {
project_id: projectId,
});
return await ncMeta.metaDelete(null, null, MetaTable.PROJECT, projectId); return await ncMeta.metaDelete(null, null, MetaTable.PROJECT, projectId);
} }

Loading…
Cancel
Save