@abtnode/models 1.17.6 → 1.17.7-beta-20251223-090654-55d57623

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.
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.up = up;
4
+ exports.down = down;
5
+ const sequelize_1 = require("sequelize");
6
+ const migrate_1 = require("../../migrate");
7
+ async function up({ context }) {
8
+ await context.addColumn('jobs', 'entityId', {
9
+ type: sequelize_1.DataTypes.STRING(80),
10
+ allowNull: true,
11
+ });
12
+ await (0, migrate_1.safeAddIndex)(context, 'jobs', ['entityId']);
13
+ }
14
+ async function down({ context }) {
15
+ await context.removeColumn('jobs', 'entityId');
16
+ }
@@ -3,6 +3,7 @@ export type JobState = {
3
3
  id: string;
4
4
  queue: string;
5
5
  job: Record<string, any>;
6
+ entityId?: string;
6
7
  retryCount: number;
7
8
  willRunAt: number;
8
9
  delay: number;
package/lib/models/job.js CHANGED
@@ -21,9 +21,13 @@ function createJobModel() {
21
21
  },
22
22
  allowNull: true,
23
23
  },
24
+ entityId: {
25
+ type: sequelize_1.DataTypes.STRING(80),
26
+ allowNull: true,
27
+ },
24
28
  }, {
25
29
  sequelize,
26
- indexes: [{ fields: ['queue'] }],
30
+ indexes: [{ fields: ['queue'] }, { fields: ['entityId'] }],
27
31
  modelName: 'Job',
28
32
  tableName: 'jobs',
29
33
  timestamps: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/models",
3
- "version": "1.17.6",
3
+ "version": "1.17.7-beta-20251223-090654-55d57623",
4
4
  "description": "Sequelize models for blocklet server and blocklet service",
5
5
  "homepage": "https://github.com/ArcBlock/blocklet-server#readme",
6
6
  "publishConfig": {
@@ -33,11 +33,11 @@
33
33
  "url": "https://github.com/ArcBlock/blocklet-server/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@abtnode/constant": "1.17.6",
37
- "@abtnode/db-cache": "1.17.6",
38
- "@abtnode/logger": "1.17.6",
39
- "@abtnode/types": "1.17.6",
40
- "@abtnode/util": "1.17.6",
36
+ "@abtnode/constant": "1.17.7-beta-20251223-090654-55d57623",
37
+ "@abtnode/db-cache": "1.17.7-beta-20251223-090654-55d57623",
38
+ "@abtnode/logger": "1.17.7-beta-20251223-090654-55d57623",
39
+ "@abtnode/types": "1.17.7-beta-20251223-090654-55d57623",
40
+ "@abtnode/util": "1.17.7-beta-20251223-090654-55d57623",
41
41
  "@arcblock/did": "^1.27.15",
42
42
  "@arcblock/validator": "^1.27.15",
43
43
  "lodash.clonedeep": "^4.5.0",
@@ -57,5 +57,5 @@
57
57
  "typescript": "^5.6.3"
58
58
  },
59
59
  "resolutions": {},
60
- "gitHead": "3366c1dcc98d15a6ceff0502f65bf809d7880fb4"
60
+ "gitHead": "00a82b6f4ef5818d6ec37d74be404031c693247c"
61
61
  }