Skip to content

Commit

Permalink
Add support for better-sqlite3
Browse files Browse the repository at this point in the history
  • Loading branch information
faulpeltz committed Sep 27, 2023
1 parent c50b30d commit 5c0b24a
Show file tree
Hide file tree
Showing 5 changed files with 1,082 additions and 512 deletions.
2 changes: 1 addition & 1 deletion lib/dialects/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class SQLite implements SchemaInspector {
await this.knex
.select('name')
.from('sqlite_master')
.whereRaw(`sql LIKE "%AUTOINCREMENT%"`)
.whereRaw(`sql LIKE '%AUTOINCREMENT%'`)
).map(({ name }) => name);

const columns: RawColumn[] = await this.knex.raw(
Expand Down
1 change: 1 addition & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function SchemaInspector(knex: Knex) {
constructor = require('./dialects/cockroachdb').default;
break;
case 'Client_SQLite3':
case 'Client_BetterSQLite3':
constructor = require('./dialects/sqlite').default;
break;
case 'Client_Oracledb':
Expand Down
Loading

0 comments on commit 5c0b24a

Please sign in to comment.