Do some groundwork for supporting the better-sqlite3 driver

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-03-08 10:13:03 +01:00
parent 562df0fccb
commit ab7cd7d70e
12 changed files with 33 additions and 25 deletions
@@ -21,7 +21,7 @@
*/
exports.up = async function up(knex) {
// Sqlite does not support alter column.
if (knex.client.config.client !== 'sqlite3') {
if (knex.client.config.client.includes('sqlite3')) {
await knex.schema.alterTable('signing_keys', table => {
table
.timestamp('created_at', { useTz: true, precision: 0 })
@@ -38,7 +38,7 @@ exports.up = async function up(knex) {
*/
exports.down = async function down(knex) {
// Sqlite does not support alter column.
if (knex.client.config.client !== 'sqlite3') {
if (knex.client.config.client.includes('sqlite3')) {
await knex.schema.alterTable('signing_keys', table => {
table
.timestamp('created_at', { useTz: false, precision: 0 })