* Adds 'enabled' column into 'users' table with database/migration.js file.

* Ignore errors when adding new columns in database/migration.js. There's a better method by checking whether the columns already exist before adding them, but this will do for now.
This commit is contained in:
Bobby Wibowo 2018-03-14 14:12:12 +07:00
parent c2b2f5b14b
commit c5b1e26671
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -6,7 +6,10 @@ migration.start = async () => {
await db.schema.table('albums', table => {
table.dateTime('editedAt')
table.dateTime('zipGeneratedAt')
})
}).catch(() => {})
await db.schema.table('users', table => {
table.integer('enabled')
}).catch(() => {})
console.log('Migration finished! Now start lolisafe normally')
process.exit(0)
}