From 55717dbc8decd8a1d23dd282e6c29d65bce430d8 Mon Sep 17 00:00:00 2001 From: Josh Harvey Date: Wed, 26 Apr 2017 01:39:58 +0300 Subject: [PATCH] minor fixes --- bin/lamassu-nuke-db | 4 ++-- migrations/029-add_valid_to_user_config.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/lamassu-nuke-db b/bin/lamassu-nuke-db index 413196cd..44c8dc87 100755 --- a/bin/lamassu-nuke-db +++ b/bin/lamassu-nuke-db @@ -15,8 +15,8 @@ case ${answer:0:1} in createdb lamassu EOF - CURRENT_DIR=`dirname $0` - rm "$CURRENT_DIR/../migrations/.migrate" + CURRENT_DIR=`dirname "$(readlink -f "$0")"` + rm -f "$CURRENT_DIR/../migrations/.migrate" lamassu-migrate echo "Done." ;; diff --git a/migrations/029-add_valid_to_user_config.js b/migrations/029-add_valid_to_user_config.js index 1d0c5abb..e5488df8 100644 --- a/migrations/029-add_valid_to_user_config.js +++ b/migrations/029-add_valid_to_user_config.js @@ -2,6 +2,7 @@ var db = require('./db') exports.up = function (next) { var sql = [ + 'delete from user_config', 'alter table user_config add column valid boolean not null' ] db.multi(sql, next)