@mikro-orm/knex 6.1.13-dev.19 → 6.1.13-dev.20
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.1.13-dev.
|
|
3
|
+
"version": "6.1.13-dev.20",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.1.12"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.1.13-dev.
|
|
69
|
+
"@mikro-orm/core": "6.1.13-dev.20"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/schema/SchemaHelper.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare abstract class SchemaHelper {
|
|
|
29
29
|
getRenameIndexSQL(tableName: string, index: IndexDef, oldIndexName: string): string;
|
|
30
30
|
getDropColumnsSQL(tableName: string, columns: Column[], schemaName?: string): string;
|
|
31
31
|
hasNonDefaultPrimaryKeyName(table: DatabaseTable): boolean;
|
|
32
|
-
createTableColumn(table: Knex.TableBuilder, column: Column, fromTable: DatabaseTable, changedProperties?: Set<string>, alter?: boolean): Knex.ColumnBuilder;
|
|
32
|
+
createTableColumn(table: Knex.TableBuilder, column: Column, fromTable: DatabaseTable, changedProperties?: Set<string>, alter?: boolean): Knex.ColumnBuilder | undefined;
|
|
33
33
|
configureColumn(column: Column, col: Knex.ColumnBuilder, knex: Knex, changedProperties?: Set<string>): Knex.ColumnBuilder;
|
|
34
34
|
configureColumnDefault(column: Column, col: Knex.ColumnBuilder, knex: Knex, changedProperties?: Set<string>): Knex.ColumnBuilder;
|
|
35
35
|
getPreAlterTable(tableDiff: TableDifference, safe: boolean): string;
|
|
@@ -366,8 +366,10 @@ class SqlSchemaGenerator extends core_1.AbstractSchemaGenerator {
|
|
|
366
366
|
if (changedProperties.size === 1 && changedProperties.has('enumItems') && column.nativeEnumName) {
|
|
367
367
|
continue;
|
|
368
368
|
}
|
|
369
|
-
const col = this.helper.createTableColumn(table, column, diff.fromTable, changedProperties, true)
|
|
370
|
-
|
|
369
|
+
const col = this.helper.createTableColumn(table, column, diff.fromTable, changedProperties, true)?.alter();
|
|
370
|
+
if (col) {
|
|
371
|
+
this.helper.configureColumn(column, col, this.knex, changedProperties);
|
|
372
|
+
}
|
|
371
373
|
}
|
|
372
374
|
for (const { column } of Object.values(diff.changedColumns).filter(diff => diff.changedProperties.has('autoincrement'))) {
|
|
373
375
|
this.helper.pushTableQuery(table, this.helper.getAlterColumnAutoincrement(tableName, column, schemaName));
|