summaryrefslogtreecommitdiff
path: root/lib/migrations/20160515114000-user-add-tokens.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/migrations/20160515114000-user-add-tokens.js')
-rw-r--r--lib/migrations/20160515114000-user-add-tokens.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/migrations/20160515114000-user-add-tokens.js b/lib/migrations/20160515114000-user-add-tokens.js
index 4245f1ad..435ae9cb 100644
--- a/lib/migrations/20160515114000-user-add-tokens.js
+++ b/lib/migrations/20160515114000-user-add-tokens.js
@@ -4,7 +4,7 @@ module.exports = {
return queryInterface.addColumn('Users', 'accessToken', Sequelize.STRING).then(function () {
return queryInterface.addColumn('Users', 'refreshToken', Sequelize.STRING)
}).catch(function (error) {
- if (error.message === "ER_DUP_FIELDNAME: Duplicate column name 'accessToken'") {
+ if (error.message === 'SQLITE_ERROR: duplicate column name: accessToken' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'accessToken'" || error.message === 'column "accessToken" of relation "Users" already exists') {
console.log('Migration has already run… ignoring.')
} else {
throw error