@nocobase/plugin-collection-tree 1.3.44-beta → 1.4.0-alpha.0

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,11 +8,11 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.3.44-beta",
11
+ "@nocobase/client": "1.4.0-alpha.0",
12
12
  "lodash": "4.17.21",
13
- "@nocobase/database": "1.3.44-beta",
14
- "@nocobase/utils": "1.3.44-beta",
15
- "@nocobase/data-source-manager": "1.3.44-beta",
16
- "@nocobase/server": "1.3.44-beta",
13
+ "@nocobase/database": "1.4.0-alpha.0",
14
+ "@nocobase/utils": "1.4.0-alpha.0",
15
+ "@nocobase/data-source-manager": "1.4.0-alpha.0",
16
+ "@nocobase/server": "1.4.0-alpha.0",
17
17
  "sequelize": "6.35.2"
18
18
  };
@@ -75,8 +75,10 @@ class collection_tree_default extends import_server.Migration {
75
75
  }
76
76
  ]
77
77
  };
78
- if (treeCollection.options.schema) {
79
- collectionOptions["schema"] = treeCollection.options.schema;
78
+ const collectionInstance = this.db.getCollection(treeCollection.name);
79
+ const treeCollectionSchema = collectionInstance.collectionSchema();
80
+ if (this.app.db.inDialect("postgres") && treeCollectionSchema != this.app.db.options.schema) {
81
+ collectionOptions["schema"] = treeCollectionSchema;
80
82
  }
81
83
  this.app.db.collection(collectionOptions);
82
84
  const treeExistsInDb = await this.app.db.getCollection(name).existsInDb({ transaction });
@@ -91,8 +93,8 @@ class collection_tree_default extends import_server.Migration {
91
93
  { type: "integer", name: "parentId" }
92
94
  ]
93
95
  };
94
- if (treeCollection.options.schema) {
95
- opts["schema"] = treeCollection.options.schema;
96
+ if (treeCollectionSchema != this.app.db.options.schema) {
97
+ opts["schema"] = treeCollectionSchema;
96
98
  }
97
99
  this.app.db.collection(opts);
98
100
  const chunkSize = 1e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-collection-tree",
3
- "version": "1.3.44-beta",
3
+ "version": "1.4.0-alpha.0",
4
4
  "displayName": "Collection: Tree",
5
5
  "displayName.zh-CN": "数据表:树",
6
6
  "description": "Provides tree collection template",
@@ -14,5 +14,5 @@
14
14
  "@nocobase/server": "1.x",
15
15
  "@nocobase/test": "1.x"
16
16
  },
17
- "gitHead": "1d5666123ac1e2997e434e38defef963ba0d9f90"
17
+ "gitHead": "8ffa7b54bbaf720c0c9857da4b19a99110dffc4b"
18
18
  }