@nocobase/plugin-workflow 2.2.0-beta.15 → 2.2.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/{67.56a3d15a55ab7d5c.js → 67.92c849b5dbe07c33.js} +1 -1
- package/dist/client/WorkflowTasks.d.ts +26 -3
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/common/collections/userWorkflowTaskStats.d.ts +54 -0
- package/dist/common/collections/userWorkflowTaskStats.js +87 -0
- package/dist/externalVersion.js +13 -13
- package/dist/locale/en-US.json +4 -0
- package/dist/locale/zh-CN.json +4 -0
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/joi/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/server/Dispatcher.d.ts +24 -13
- package/dist/server/Dispatcher.js +160 -143
- package/dist/server/Plugin.d.ts +57 -11
- package/dist/server/Plugin.js +355 -15
- package/dist/server/Processor.d.ts +1 -7
- package/dist/server/Processor.js +11 -7
- package/dist/server/actions/executions.js +3 -6
- package/dist/server/actions/index.js +3 -1
- package/dist/server/actions/jobs.js +1 -2
- package/dist/server/{migrations/20260713000000-remove-workflow-validation.d.ts → actions/userWorkflowTaskStats.d.ts} +2 -5
- package/dist/server/actions/userWorkflowTaskStats.js +112 -0
- package/dist/server/actions/workflows.js +17 -0
- package/dist/server/collections/userWorkflowTaskStats.d.ts +11 -0
- package/dist/server/collections/userWorkflowTaskStats.js +43 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/types/Execution.d.ts +2 -0
- package/dist/server/types/Job.d.ts +5 -0
- package/dist/server/utils.d.ts +1 -0
- package/dist/server/utils.js +5 -0
- package/dist/swagger/index.d.ts +68 -1
- package/dist/swagger/index.js +61 -1
- package/package.json +2 -2
- package/dist/server/migrations/20260713000000-remove-workflow-validation.js +0 -56
|
@@ -106,6 +106,7 @@ async function update(context, next) {
|
|
|
106
106
|
return import_actions.default.update(context, next);
|
|
107
107
|
}
|
|
108
108
|
async function destroy(context, next) {
|
|
109
|
+
const plugin = context.app.pm.get(import_Plugin.default);
|
|
109
110
|
const repository = import_actions.utils.getRepositoryFromParams(context);
|
|
110
111
|
const { filterByTk, filter } = context.action.params;
|
|
111
112
|
await context.db.sequelize.transaction(async (transaction) => {
|
|
@@ -116,6 +117,15 @@ async function destroy(context, next) {
|
|
|
116
117
|
transaction
|
|
117
118
|
});
|
|
118
119
|
const ids = new Set(items.map((item) => item.id));
|
|
120
|
+
const affectedKeys = Array.from(new Set(items.map((item) => item.get("key"))));
|
|
121
|
+
const affectedTaskStats = affectedKeys.length ? await context.db.getRepository("userWorkflowTaskStats").find({
|
|
122
|
+
filter: {
|
|
123
|
+
workflowKey: affectedKeys
|
|
124
|
+
},
|
|
125
|
+
fields: ["userId"],
|
|
126
|
+
transaction
|
|
127
|
+
}) : [];
|
|
128
|
+
const affectedUserIds = Array.from(new Set(affectedTaskStats.map((item) => item.get("userId"))));
|
|
119
129
|
const keysSet = new Set(items.filter((item) => item.current).map((item) => item.key));
|
|
120
130
|
const revisions = await repository.find({
|
|
121
131
|
filter: {
|
|
@@ -138,6 +148,13 @@ async function destroy(context, next) {
|
|
|
138
148
|
},
|
|
139
149
|
transaction
|
|
140
150
|
});
|
|
151
|
+
if (affectedKeys.length) {
|
|
152
|
+
await plugin.repairTaskStats({
|
|
153
|
+
workflowKeys: affectedKeys,
|
|
154
|
+
...affectedUserIds.length ? { userIds: affectedUserIds } : {},
|
|
155
|
+
transaction
|
|
156
|
+
});
|
|
157
|
+
}
|
|
141
158
|
context.body = deleted;
|
|
142
159
|
});
|
|
143
160
|
next();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { CollectionOptions } from '@nocobase/database';
|
|
10
|
+
declare const _default: CollectionOptions;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var userWorkflowTaskStats_exports = {};
|
|
38
|
+
__export(userWorkflowTaskStats_exports, {
|
|
39
|
+
default: () => userWorkflowTaskStats_default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(userWorkflowTaskStats_exports);
|
|
42
|
+
var import_userWorkflowTaskStats = __toESM(require("../../common/collections/userWorkflowTaskStats"));
|
|
43
|
+
var userWorkflowTaskStats_default = import_userWorkflowTaskStats.default;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -17,4 +17,5 @@ export type { EventOptions } from './Dispatcher';
|
|
|
17
17
|
export { default as Processor } from './Processor';
|
|
18
18
|
export type { BackgroundAbortHandle, ProcessorOptions, ScopeTransaction } from './Processor';
|
|
19
19
|
export { default } from './Plugin';
|
|
20
|
+
export type { RepairTaskStatsOptions, TaskStatsProvider, TaskStatsRow } from './Plugin';
|
|
20
21
|
export * from './types';
|
|
@@ -12,11 +12,13 @@ import WorkflowModel from './Workflow';
|
|
|
12
12
|
export default class ExecutionModel extends Model {
|
|
13
13
|
static readonly database: Database;
|
|
14
14
|
id: number;
|
|
15
|
+
workflowId: number;
|
|
15
16
|
title: string;
|
|
16
17
|
context: any;
|
|
17
18
|
status: number;
|
|
18
19
|
reason?: string | null;
|
|
19
20
|
dispatched: boolean;
|
|
21
|
+
manually?: boolean | null;
|
|
20
22
|
parentExecutionId?: number | null;
|
|
21
23
|
stack?: Array<number | string>;
|
|
22
24
|
startedAt?: Date | null;
|
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { BelongsToGetAssociationMixin, Model } from '@nocobase/database';
|
|
10
10
|
import FlowNodeModel from './FlowNode';
|
|
11
|
+
import ExecutionModel from './Execution';
|
|
11
12
|
export default class JobModel extends Model {
|
|
12
13
|
id: number;
|
|
14
|
+
executionId: number;
|
|
15
|
+
workflowId?: number;
|
|
13
16
|
status: number;
|
|
14
17
|
result?: any;
|
|
15
18
|
meta?: any;
|
|
@@ -20,4 +23,6 @@ export default class JobModel extends Model {
|
|
|
20
23
|
nodeId: number;
|
|
21
24
|
node?: FlowNodeModel;
|
|
22
25
|
getNode: BelongsToGetAssociationMixin<FlowNodeModel>;
|
|
26
|
+
execution?: ExecutionModel;
|
|
27
|
+
getExecution: BelongsToGetAssociationMixin<ExecutionModel>;
|
|
23
28
|
}
|
package/dist/server/utils.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ type AbortOptions = Transactionable & {
|
|
|
16
16
|
reason?: (typeof EXECUTION_REASON)[keyof typeof EXECUTION_REASON];
|
|
17
17
|
};
|
|
18
18
|
export declare function getExecutionLockKey(executionId: number | string): string;
|
|
19
|
+
export declare function getJobLockKey(jobId: number | string): string;
|
|
19
20
|
export declare function isLockAcquireError(error: unknown): boolean;
|
|
20
21
|
export declare function validateCollectionField(collection: string, dataSourceManager: DataSourceManager): Record<string, string> | null;
|
|
21
22
|
export declare function getExecutionStatusName(status: number | null | undefined): string;
|
package/dist/server/utils.js
CHANGED
|
@@ -29,6 +29,7 @@ __export(utils_exports, {
|
|
|
29
29
|
abortExecution: () => abortExecution,
|
|
30
30
|
getExecutionLockKey: () => getExecutionLockKey,
|
|
31
31
|
getExecutionStatusName: () => getExecutionStatusName,
|
|
32
|
+
getJobLockKey: () => getJobLockKey,
|
|
32
33
|
getWorkflowExecutionLogMeta: () => getWorkflowExecutionLogMeta,
|
|
33
34
|
isLockAcquireError: () => isLockAcquireError,
|
|
34
35
|
toJSON: () => toJSON,
|
|
@@ -41,6 +42,9 @@ var import_constants = require("./constants");
|
|
|
41
42
|
function getExecutionLockKey(executionId) {
|
|
42
43
|
return `workflow:execution:${executionId}`;
|
|
43
44
|
}
|
|
45
|
+
function getJobLockKey(jobId) {
|
|
46
|
+
return `workflow:job:${jobId}`;
|
|
47
|
+
}
|
|
44
48
|
function isLockAcquireError(error) {
|
|
45
49
|
return error instanceof Error && error.constructor.name === "LockAcquireError";
|
|
46
50
|
}
|
|
@@ -197,6 +201,7 @@ function toJSON(data) {
|
|
|
197
201
|
abortExecution,
|
|
198
202
|
getExecutionLockKey,
|
|
199
203
|
getExecutionStatusName,
|
|
204
|
+
getJobLockKey,
|
|
200
205
|
getWorkflowExecutionLogMeta,
|
|
201
206
|
isLockAcquireError,
|
|
202
207
|
toJSON,
|
package/dist/swagger/index.d.ts
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* flow_nodes — Update / delete / move / duplicate / test nodes
|
|
16
16
|
* executions — Execution record queries, cancellation and deletion
|
|
17
17
|
* jobs — Node job queries and resuming paused executions
|
|
18
|
-
* userWorkflowTasks — Current-user's pending workflow tasks
|
|
18
|
+
* userWorkflowTasks — Current-user's pending workflow tasks grouped by type
|
|
19
|
+
* userWorkflowTaskStats — Current-user's pending workflow tasks grouped by workflow
|
|
19
20
|
*
|
|
20
21
|
* API conventions:
|
|
21
22
|
* Base URL : /api
|
|
@@ -1176,6 +1177,72 @@ declare const _default: {
|
|
|
1176
1177
|
};
|
|
1177
1178
|
};
|
|
1178
1179
|
};
|
|
1180
|
+
'/userWorkflowTaskStats:listMine': {
|
|
1181
|
+
get: {
|
|
1182
|
+
tags: string[];
|
|
1183
|
+
summary: string;
|
|
1184
|
+
description: string;
|
|
1185
|
+
parameters: ({
|
|
1186
|
+
name: string;
|
|
1187
|
+
in: string;
|
|
1188
|
+
schema: {
|
|
1189
|
+
type: string;
|
|
1190
|
+
default?: undefined;
|
|
1191
|
+
maximum?: undefined;
|
|
1192
|
+
};
|
|
1193
|
+
} | {
|
|
1194
|
+
name: string;
|
|
1195
|
+
in: string;
|
|
1196
|
+
schema: {
|
|
1197
|
+
type: string;
|
|
1198
|
+
default: number;
|
|
1199
|
+
maximum?: undefined;
|
|
1200
|
+
};
|
|
1201
|
+
} | {
|
|
1202
|
+
name: string;
|
|
1203
|
+
in: string;
|
|
1204
|
+
schema: {
|
|
1205
|
+
type: string;
|
|
1206
|
+
default: number;
|
|
1207
|
+
maximum: number;
|
|
1208
|
+
};
|
|
1209
|
+
})[];
|
|
1210
|
+
responses: {
|
|
1211
|
+
200: {
|
|
1212
|
+
description: string;
|
|
1213
|
+
content: {
|
|
1214
|
+
'application/json': {
|
|
1215
|
+
schema: {
|
|
1216
|
+
type: string;
|
|
1217
|
+
items: {
|
|
1218
|
+
type: string;
|
|
1219
|
+
properties: {
|
|
1220
|
+
workflowKey: {
|
|
1221
|
+
type: string;
|
|
1222
|
+
};
|
|
1223
|
+
title: {
|
|
1224
|
+
type: string;
|
|
1225
|
+
};
|
|
1226
|
+
stats: {
|
|
1227
|
+
type: string;
|
|
1228
|
+
properties: {
|
|
1229
|
+
pending: {
|
|
1230
|
+
type: string;
|
|
1231
|
+
};
|
|
1232
|
+
all: {
|
|
1233
|
+
type: string;
|
|
1234
|
+
};
|
|
1235
|
+
};
|
|
1236
|
+
};
|
|
1237
|
+
};
|
|
1238
|
+
};
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1179
1246
|
};
|
|
1180
1247
|
components: {
|
|
1181
1248
|
schemas: {
|
package/dist/swagger/index.js
CHANGED
|
@@ -40,7 +40,8 @@ var swagger_default = {
|
|
|
40
40
|
{ name: "flow_nodes", description: "Flow node management: update, delete, move, duplicate, test" },
|
|
41
41
|
{ name: "executions", description: "Execution record management: list, get, cancel, delete" },
|
|
42
42
|
{ name: "jobs", description: "Node job management: list, get, resume" },
|
|
43
|
-
{ name: "userWorkflowTasks", description: "Current-user workflow task queries" }
|
|
43
|
+
{ name: "userWorkflowTasks", description: "Current-user workflow task queries" },
|
|
44
|
+
{ name: "userWorkflowTaskStats", description: "Current-user workflow task stats grouped by workflow" }
|
|
44
45
|
],
|
|
45
46
|
paths: {
|
|
46
47
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -1220,6 +1221,65 @@ var swagger_default = {
|
|
|
1220
1221
|
}
|
|
1221
1222
|
}
|
|
1222
1223
|
}
|
|
1224
|
+
},
|
|
1225
|
+
"/userWorkflowTaskStats:listMine": {
|
|
1226
|
+
get: {
|
|
1227
|
+
tags: ["userWorkflowTaskStats"],
|
|
1228
|
+
summary: "List my workflow task stats by workflow",
|
|
1229
|
+
description: [
|
|
1230
|
+
"Get current-user task statistics grouped by `workflowKey`, with the title of the current workflow version.",
|
|
1231
|
+
"",
|
|
1232
|
+
"Pass `type` to limit the result to one task type. Without it, the response sums all task types."
|
|
1233
|
+
].join("\n"),
|
|
1234
|
+
parameters: [
|
|
1235
|
+
{
|
|
1236
|
+
name: "type",
|
|
1237
|
+
in: "query",
|
|
1238
|
+
schema: { type: "string" }
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
name: "search",
|
|
1242
|
+
in: "query",
|
|
1243
|
+
schema: { type: "string" }
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
name: "page",
|
|
1247
|
+
in: "query",
|
|
1248
|
+
schema: { type: "integer", default: 1 }
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
name: "pageSize",
|
|
1252
|
+
in: "query",
|
|
1253
|
+
schema: { type: "integer", default: 200, maximum: 200 }
|
|
1254
|
+
}
|
|
1255
|
+
],
|
|
1256
|
+
responses: {
|
|
1257
|
+
200: {
|
|
1258
|
+
description: "OK",
|
|
1259
|
+
content: {
|
|
1260
|
+
"application/json": {
|
|
1261
|
+
schema: {
|
|
1262
|
+
type: "array",
|
|
1263
|
+
items: {
|
|
1264
|
+
type: "object",
|
|
1265
|
+
properties: {
|
|
1266
|
+
workflowKey: { type: "string" },
|
|
1267
|
+
title: { type: "string" },
|
|
1268
|
+
stats: {
|
|
1269
|
+
type: "object",
|
|
1270
|
+
properties: {
|
|
1271
|
+
pending: { type: "integer" },
|
|
1272
|
+
all: { type: "integer" }
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1223
1283
|
}
|
|
1224
1284
|
},
|
|
1225
1285
|
// ───────────────────────────────────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
|
|
7
7
|
"description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
|
|
8
8
|
"description.ru-RU": "Мощный инструмент BPM, обеспечивающий базовую поддержку автоматизации бизнес-процессов с возможностью неограниченного расширения триггеров и узлов.",
|
|
9
|
-
"version": "2.2.0-beta.
|
|
9
|
+
"version": "2.2.0-beta.16",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "./dist/server/index.js",
|
|
12
12
|
"homepage": "https://docs.nocobase.com/handbook/workflow",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@nocobase/test": "2.x",
|
|
52
52
|
"@nocobase/utils": "2.x"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "49d9bd2e21122eab9435f128375828b8c5bb4c07",
|
|
55
55
|
"keywords": [
|
|
56
56
|
"Workflow"
|
|
57
57
|
]
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var remove_workflow_validation_exports = {};
|
|
28
|
-
__export(remove_workflow_validation_exports, {
|
|
29
|
-
default: () => remove_workflow_validation_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(remove_workflow_validation_exports);
|
|
32
|
-
var import_server = require("@nocobase/server");
|
|
33
|
-
class remove_workflow_validation_default extends import_server.Migration {
|
|
34
|
-
on = "afterSync";
|
|
35
|
-
async up() {
|
|
36
|
-
const { db } = this.context;
|
|
37
|
-
const workflows = db.getCollection("workflows");
|
|
38
|
-
const tableInfo = workflows.getTableNameWithSchema();
|
|
39
|
-
await db.sequelize.transaction(async (transaction) => {
|
|
40
|
-
const tableExists = await this.queryInterface.tableExists(tableInfo, { transaction });
|
|
41
|
-
if (!tableExists) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const describeTable = this.queryInterface.describeTable.bind(this.queryInterface);
|
|
45
|
-
const columns = await describeTable(tableInfo, { transaction });
|
|
46
|
-
if (!columns.validation) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
await this.queryInterface.removeColumn(tableInfo, "validation", { transaction });
|
|
50
|
-
if (db.sequelize.getDialect() === "sqlite") {
|
|
51
|
-
const syncOptions = { hooks: false, transaction };
|
|
52
|
-
await workflows.model.sync(syncOptions);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|