@nocobase/database 1.2.25-alpha → 1.2.26-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.
@@ -26,7 +26,6 @@ export declare class SyncRunner {
26
26
  [attribute: string]: import("sequelize").ModelAttributeColumnOptions<SequelizeModel<any, any>>;
27
27
  };
28
28
  runSync(options: any): Promise<any>;
29
- checkAutoIncrementField(beforeColumns: any, options: any): Promise<void>;
30
29
  handleUniqueFieldBeforeSync(beforeColumns: any, options: any): Promise<void>;
31
30
  handlePrimaryKeyBeforeSync(columns: any, options: any): Promise<void>;
32
31
  handlePrimaryKey(columns: any, options: any): Promise<void>;
@@ -80,7 +80,6 @@ const _SyncRunner = class _SyncRunner {
80
80
  }
81
81
  try {
82
82
  const beforeColumns = await this.queryInterface.describeTable(this.tableName, options);
83
- await this.checkAutoIncrementField(beforeColumns, options);
84
83
  await this.handlePrimaryKeyBeforeSync(beforeColumns, options);
85
84
  await this.handleUniqueFieldBeforeSync(beforeColumns, options);
86
85
  } catch (e) {
@@ -95,17 +94,6 @@ const _SyncRunner = class _SyncRunner {
95
94
  await this.handleUniqueIndex(options);
96
95
  return syncResult;
97
96
  }
98
- async checkAutoIncrementField(beforeColumns, options) {
99
- if (!this.database.isMySQLCompatibleDialect()) {
100
- return;
101
- }
102
- const autoIncrFields = Object.keys(this.rawAttributes).filter((key) => {
103
- return this.rawAttributes[key].autoIncrement;
104
- });
105
- if (autoIncrFields.length > 1) {
106
- throw new Error(`Auto increment field can't be more than one: ${autoIncrFields.join(", ")}`);
107
- }
108
- }
109
97
  async handleUniqueFieldBeforeSync(beforeColumns, options) {
110
98
  if (!this.database.inDialect("sqlite")) {
111
99
  return;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nocobase/database",
3
- "version": "1.2.25-alpha",
3
+ "version": "1.2.26-alpha",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "license": "AGPL-3.0",
8
8
  "dependencies": {
9
- "@nocobase/logger": "1.2.25-alpha",
10
- "@nocobase/utils": "1.2.25-alpha",
9
+ "@nocobase/logger": "1.2.26-alpha",
10
+ "@nocobase/utils": "1.2.26-alpha",
11
11
  "async-mutex": "^0.3.2",
12
12
  "chalk": "^4.1.1",
13
13
  "cron-parser": "4.4.0",
@@ -38,5 +38,5 @@
38
38
  "url": "git+https://github.com/nocobase/nocobase.git",
39
39
  "directory": "packages/database"
40
40
  },
41
- "gitHead": "72a6f9a73afc615b7f16fac6197ad44c29bf1e0f"
41
+ "gitHead": "a463b25b4f7de08f71f43a22cb6171f0a58aa66a"
42
42
  }