Skip to content

Commit

Permalink
fixes #93
Browse files Browse the repository at this point in the history
  • Loading branch information
koskimas committed May 11, 2022
1 parent b932991 commit ba42803
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kysely",
"version": "0.19.1",
"version": "0.19.2",
"description": "Type safe SQL query builder",
"repository": {
"type": "git",
Expand Down
8 changes: 2 additions & 6 deletions src/dialect/mysql/mysql-introspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { Kysely } from '../../kysely.js'
import { ColumnDataType } from '../../operation-node/data-type-node.js'
import { freeze } from '../../util/object-utils.js'
import { sql } from '../../raw-builder/sql.js'

export class MysqlIntrospector implements DatabaseIntrospector {
readonly #db: Kysely<any>
Expand Down Expand Up @@ -42,12 +43,7 @@ export class MysqlIntrospector implements DatabaseIntrospector {
'is_nullable',
'data_type',
])
.where('table_schema', 'not in', [
'information_schema',
'performance_schema',
'mysql',
'sys',
])
.where('table_schema', '=', sql`database()`)
.castTo<RawColumnMetadata>()

if (!options.withInternalKyselyTables) {
Expand Down
2 changes: 2 additions & 0 deletions src/migration/migrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ export interface MigratorProps {
* If you do specify this, ALWAYS ALWAYS use the same value from the beginning of
* the project, to the end of time or prepare to manually migrate the migration
* tables.
*
* This only works on postgres.
*/
readonly migrationTableSchema?: string
}
Expand Down
2 changes: 1 addition & 1 deletion test/node/src/migration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ for (const dialect of BUILT_IN_DIALECTS) {
})
})

if (dialect !== 'sqlite') {
if (dialect === 'postgres') {
describe('custom migration tables in a custom schema', () => {
it('should create custom migration tables in custom schema', async () => {
const [migrator, executedUpMethods] = createMigrations(
Expand Down

0 comments on commit ba42803

Please sign in to comment.