Skip to content

Commit

Permalink
fix: 2.5.108 migration (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Sep 6, 2020
1 parent 0ce63c8 commit af05425
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/db/migrations-sqlite/2.5.108.js
Expand Up @@ -2,7 +2,8 @@ const has = require('lodash/has')

exports.up = async knex => {
// -> Fix 2.5.1 added isEnabled columns for beta users
const localStrategy = await knex('authentication').where('key', 'local')
const localStrategy = await knex('authentication').where('key', 'local').first()
console.info(localStrategy)
if (localStrategy && !has(localStrategy, 'isEnabled')) {
await knex.schema
.alterTable('authentication', table => {
Expand Down
2 changes: 1 addition & 1 deletion server/db/migrations/2.5.108.js
Expand Up @@ -2,7 +2,7 @@ const has = require('lodash/has')

exports.up = async knex => {
// -> Fix 2.5.1 added isEnabled columns for beta users
const localStrategy = await knex('authentication').where('key', 'local')
const localStrategy = await knex('authentication').where('key', 'local').first()
if (localStrategy && !has(localStrategy, 'isEnabled')) {
await knex.schema
.alterTable('authentication', table => {
Expand Down

0 comments on commit af05425

Please sign in to comment.