mirror of
https://github.com/nocodb/nocodb.git
synced 2026-06-01 23:02:12 +00:00
fix: review corrections
This commit is contained in:
@@ -740,6 +740,7 @@ export enum MetaEventType {
|
||||
FILTER_UPDATED = 'FILTER_UPDATED',
|
||||
FILTER_DELETED = 'FILTER_DELETED',
|
||||
VIEW_UPDATED = 'VIEW_UPDATED',
|
||||
VIEW_DELETED = 'VIEW_DELETED',
|
||||
TABLE_DELETED = 'TABLE_DELETED',
|
||||
}
|
||||
|
||||
|
||||
@@ -4342,6 +4342,18 @@ export class ColumnsService implements IColumnsService {
|
||||
});
|
||||
}
|
||||
|
||||
await this.metaDependencyEventHandler.handleEvent(
|
||||
context,
|
||||
{
|
||||
eventType: MetaEventType.COLUMN_ADDED,
|
||||
newEntity: newColumn ?? {
|
||||
...param.column,
|
||||
fk_model_id: table.id,
|
||||
},
|
||||
},
|
||||
ncMeta,
|
||||
);
|
||||
|
||||
NocoSocket.broadcastEvent(
|
||||
context,
|
||||
{
|
||||
@@ -6415,6 +6427,11 @@ export class ColumnsService implements IColumnsService {
|
||||
columns: await refTable.getCachedColumns(context),
|
||||
});
|
||||
|
||||
await this.metaDependencyEventHandler.handleEvent(refContext, {
|
||||
eventType: MetaEventType.COLUMN_ADDED,
|
||||
newEntity: parentRelCol,
|
||||
});
|
||||
|
||||
this.appHooksService.emit(AppEvents.COLUMN_CREATE, {
|
||||
table: table,
|
||||
column: savedColumn,
|
||||
@@ -6424,6 +6441,11 @@ export class ColumnsService implements IColumnsService {
|
||||
columns: await table.getCachedColumns(context),
|
||||
});
|
||||
|
||||
await this.metaDependencyEventHandler.handleEvent(context, {
|
||||
eventType: MetaEventType.COLUMN_ADDED,
|
||||
newEntity: savedColumn,
|
||||
});
|
||||
|
||||
// todo: create index for virtual relations as well
|
||||
// create index for foreign key in pg
|
||||
if (param.source.type === 'pg') {
|
||||
|
||||
@@ -26,6 +26,7 @@ export class MetaDependencyEventHandler {
|
||||
FILTER_UPDATED: [],
|
||||
FILTER_DELETED: [],
|
||||
VIEW_UPDATED: [],
|
||||
VIEW_DELETED: [],
|
||||
TABLE_DELETED: [],
|
||||
};
|
||||
|
||||
|
||||
@@ -663,6 +663,15 @@ export class ViewsService {
|
||||
});
|
||||
}
|
||||
|
||||
await this.metaDependencyEventHandler.handleEvent(
|
||||
context,
|
||||
{
|
||||
eventType: MetaEventType.VIEW_DELETED,
|
||||
oldEntity: view,
|
||||
},
|
||||
ncMeta,
|
||||
);
|
||||
|
||||
NocoSocket.broadcastEvent(
|
||||
context,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user