@abtnode/models 1.16.11-next-f74663ac → 1.16.11

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,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.down = exports.up = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ const up = async ({ context }) => {
6
+ await context.addColumn('backups', 'targetName', { type: sequelize_1.DataTypes.STRING(256), defaultValue: '' });
7
+ };
8
+ exports.up = up;
9
+ const down = async ({ context }) => {
10
+ await context.removeColumn('backups', 'targetName');
11
+ };
12
+ exports.down = down;
@@ -9,12 +9,17 @@ function createBackupModel() {
9
9
  static initialize(sequelize) {
10
10
  this.init({
11
11
  ...this.GENESIS_ATTRIBUTES,
12
+ targetName: {
13
+ type: sequelize_1.DataTypes.STRING(256),
14
+ defaultValue: '',
15
+ },
12
16
  }, {
13
17
  sequelize,
14
18
  modelName: 'Backup',
15
19
  tableName: 'backups',
16
20
  indexes: [{ fields: ['appPid'] }],
17
- timestamps: true,
21
+ // note: 备份的过程中,updatedAt 不需要填充默认值
22
+ timestamps: false,
18
23
  });
19
24
  }
20
25
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/models",
3
- "version": "1.16.11-next-f74663ac",
3
+ "version": "1.16.11",
4
4
  "description": "Sequelize models for blocklet server and blocklet service",
5
5
  "homepage": "https://github.com/ArcBlock/blocklet-server#readme",
6
6
  "publishConfig": {
@@ -32,8 +32,8 @@
32
32
  "url": "https://github.com/ArcBlock/blocklet-server/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@abtnode/logger": "1.16.11-next-f74663ac",
36
- "@abtnode/types": "1.16.11-next-f74663ac",
35
+ "@abtnode/logger": "1.16.11",
36
+ "@abtnode/types": "1.16.11",
37
37
  "@nedb/core": "^2.1.5",
38
38
  "lodash.clonedeep": "^4.5.0",
39
39
  "lodash.get": "^4.4.2",
@@ -54,5 +54,5 @@
54
54
  "typescript": "^5.0.4"
55
55
  },
56
56
  "resolutions": {},
57
- "gitHead": "805327b6c7544c6d2328558434835253e2d741ec"
57
+ "gitHead": "bf1a5bd70ed2ee7cd044c6b629c18bbc900f1598"
58
58
  }