@nocobase/plugin-data-source-main 1.2.16-alpha → 1.2.19-alpha

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.
@@ -8,14 +8,14 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.2.16-alpha",
12
- "@nocobase/database": "1.2.16-alpha",
13
- "@nocobase/plugin-error-handler": "1.2.16-alpha",
14
- "@nocobase/server": "1.2.16-alpha",
11
+ "@nocobase/client": "1.2.19-alpha",
12
+ "@nocobase/database": "1.2.19-alpha",
13
+ "@nocobase/plugin-error-handler": "1.2.19-alpha",
14
+ "@nocobase/server": "1.2.19-alpha",
15
15
  "async-mutex": "0.3.2",
16
16
  "lodash": "4.17.21",
17
- "@nocobase/test": "1.2.16-alpha",
18
- "@nocobase/utils": "1.2.16-alpha",
17
+ "@nocobase/test": "1.2.19-alpha",
18
+ "@nocobase/utils": "1.2.19-alpha",
19
19
  "sequelize": "6.35.2",
20
20
  "dayjs": "1.11.10"
21
21
  };
@@ -57,6 +57,11 @@ class FieldModel extends import_database.MagicAttributeModel {
57
57
  fieldKey: this.get("key"),
58
58
  transaction
59
59
  });
60
+ if (transaction) {
61
+ this.db.on("transactionRollback:" + transaction["id"], async () => {
62
+ collection.removeField(name);
63
+ });
64
+ }
60
65
  return field;
61
66
  }
62
67
  async syncSortByField(options) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "数据源:主数据库",
5
5
  "description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.",
6
6
  "description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。",
7
- "version": "1.2.16-alpha",
7
+ "version": "1.2.19-alpha",
8
8
  "main": "./dist/server/index.js",
9
9
  "homepage": "https://docs.nocobase.com/handbook/data-source-main",
10
10
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main",
@@ -22,7 +22,7 @@
22
22
  "@nocobase/test": "1.x",
23
23
  "@nocobase/utils": "1.x"
24
24
  },
25
- "gitHead": "f3383e8fe51a1e7911f312d767e8793b8dcd86f4",
25
+ "gitHead": "455cfb1e9bc407cec7bda8777f9aa5e08bc98aea",
26
26
  "keywords": [
27
27
  "Data sources"
28
28
  ]