@mikro-orm/knex 6.4.7-dev.1 → 6.4.7-dev.3
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.4.7-dev.
|
|
3
|
+
"version": "6.4.7-dev.3",
|
|
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,7 +66,7 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.4.6"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.4.7-dev.
|
|
69
|
+
"@mikro-orm/core": "6.4.7-dev.3",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
|
@@ -103,9 +103,10 @@ class SqlSchemaGenerator extends core_1.AbstractSchemaGenerator {
|
|
|
103
103
|
return super.clearDatabase(options);
|
|
104
104
|
}
|
|
105
105
|
await this.execute(this.helper.disableForeignKeysSQL());
|
|
106
|
-
|
|
106
|
+
const schema = options?.schema ?? this.config.get('schema', this.platform.getDefaultSchemaName());
|
|
107
|
+
for (const meta of this.getOrderedMetadata(schema).reverse()) {
|
|
107
108
|
await this.driver.createQueryBuilder(meta.className, this.em?.getTransactionContext(), 'write', false)
|
|
108
|
-
.withSchema(
|
|
109
|
+
.withSchema(schema)
|
|
109
110
|
.truncate();
|
|
110
111
|
}
|
|
111
112
|
await this.execute(this.helper.enableForeignKeysSQL());
|