@mikro-orm/knex 6.0.0-dev.79 → 6.0.0-dev.80
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.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.80",
|
|
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": "^5.7.10"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "~6.0.0-dev.
|
|
69
|
+
"@mikro-orm/core": "~6.0.0-dev.80"
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -80,7 +80,7 @@ export declare class SqlSchemaGenerator extends AbstractSchemaGenerator<Abstract
|
|
|
80
80
|
* creates new database and connects to it
|
|
81
81
|
*/
|
|
82
82
|
createDatabase(name: string): Promise<void>;
|
|
83
|
-
dropDatabase(name
|
|
83
|
+
dropDatabase(name?: string): Promise<void>;
|
|
84
84
|
execute(sql: string, options?: {
|
|
85
85
|
wrap?: boolean;
|
|
86
86
|
}): Promise<void>;
|
|
@@ -375,6 +375,7 @@ class SqlSchemaGenerator extends core_1.AbstractSchemaGenerator {
|
|
|
375
375
|
await this.driver.reconnect();
|
|
376
376
|
}
|
|
377
377
|
async dropDatabase(name) {
|
|
378
|
+
name ??= this.config.get('dbName');
|
|
378
379
|
this.config.set('dbName', this.helper.getManagementDbName());
|
|
379
380
|
await this.driver.reconnect();
|
|
380
381
|
await this.driver.execute(this.helper.getDropDatabaseSQL('' + this.knex.ref(name)));
|