kysely 0.19.1 → 0.19.2
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MysqlIntrospector = void 0;
|
|
4
4
|
const migrator_js_1 = require("../../migration/migrator.js");
|
|
5
5
|
const object_utils_js_1 = require("../../util/object-utils.js");
|
|
6
|
+
const sql_js_1 = require("../../raw-builder/sql.js");
|
|
6
7
|
class MysqlIntrospector {
|
|
7
8
|
#db;
|
|
8
9
|
constructor(db) {
|
|
@@ -26,12 +27,7 @@ class MysqlIntrospector {
|
|
|
26
27
|
'is_nullable',
|
|
27
28
|
'data_type',
|
|
28
29
|
])
|
|
29
|
-
.where('table_schema', '
|
|
30
|
-
'information_schema',
|
|
31
|
-
'performance_schema',
|
|
32
|
-
'mysql',
|
|
33
|
-
'sys',
|
|
34
|
-
])
|
|
30
|
+
.where('table_schema', '=', (0, sql_js_1.sql) `database()`)
|
|
35
31
|
.castTo();
|
|
36
32
|
if (!options.withInternalKyselyTables) {
|
|
37
33
|
query = query
|
|
@@ -188,6 +188,8 @@ export interface MigratorProps {
|
|
|
188
188
|
* If you do specify this, ALWAYS ALWAYS use the same value from the beginning of
|
|
189
189
|
* the project, to the end of time or prepare to manually migrate the migration
|
|
190
190
|
* tables.
|
|
191
|
+
*
|
|
192
|
+
* This only works on postgres.
|
|
191
193
|
*/
|
|
192
194
|
readonly migrationTableSchema?: string;
|
|
193
195
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="./mysql-introspector.d.ts" />
|
|
2
2
|
import { DEFAULT_MIGRATION_LOCK_TABLE, DEFAULT_MIGRATION_TABLE, } from '../../migration/migrator.js';
|
|
3
3
|
import { freeze } from '../../util/object-utils.js';
|
|
4
|
+
import { sql } from '../../raw-builder/sql.js';
|
|
4
5
|
export class MysqlIntrospector {
|
|
5
6
|
#db;
|
|
6
7
|
constructor(db) {
|
|
@@ -24,12 +25,7 @@ export class MysqlIntrospector {
|
|
|
24
25
|
'is_nullable',
|
|
25
26
|
'data_type',
|
|
26
27
|
])
|
|
27
|
-
.where('table_schema', '
|
|
28
|
-
'information_schema',
|
|
29
|
-
'performance_schema',
|
|
30
|
-
'mysql',
|
|
31
|
-
'sys',
|
|
32
|
-
])
|
|
28
|
+
.where('table_schema', '=', sql `database()`)
|
|
33
29
|
.castTo();
|
|
34
30
|
if (!options.withInternalKyselyTables) {
|
|
35
31
|
query = query
|
|
@@ -188,6 +188,8 @@ export interface MigratorProps {
|
|
|
188
188
|
* If you do specify this, ALWAYS ALWAYS use the same value from the beginning of
|
|
189
189
|
* the project, to the end of time or prepare to manually migrate the migration
|
|
190
190
|
* tables.
|
|
191
|
+
*
|
|
192
|
+
* This only works on postgres.
|
|
191
193
|
*/
|
|
192
194
|
readonly migrationTableSchema?: string;
|
|
193
195
|
}
|