2018-01-23 20:06:30 +00:00
|
|
|
const config = require('../config.js')
|
|
|
|
const db = require('knex')(config.database)
|
2017-10-04 05:05:38 +00:00
|
|
|
|
2018-01-23 20:06:30 +00:00
|
|
|
const migration = {}
|
2017-10-04 05:05:38 +00:00
|
|
|
migration.start = async () => {
|
2018-03-24 13:52:47 +00:00
|
|
|
await db.schema.table('albums', t => t.dateTime('editedAt')).catch(err => console.warn(err.message))
|
|
|
|
await db.schema.table('albums', t => t.dateTime('zipGeneratedAt')).catch(err => console.warn(err.message))
|
|
|
|
await db.schema.table('users', t => t.dateTime('enabled')).catch(err => console.warn(err.message))
|
|
|
|
await db.schema.table('users', t => t.dateTime('fileLength')).catch(err => console.warn(err.message))
|
2018-01-23 20:06:30 +00:00
|
|
|
console.log('Migration finished! Now start lolisafe normally')
|
2018-03-14 06:57:09 +00:00
|
|
|
process.exit(0)
|
2018-01-23 20:06:30 +00:00
|
|
|
}
|
2017-10-04 05:05:38 +00:00
|
|
|
|
2018-01-23 20:06:30 +00:00
|
|
|
migration.start()
|