filesafe/database/migration.js
Bobby Wibowo 0067c8fe83
Updates
* Refactored all instances of "err" into "error".

* Added bulk delete feature (API route: /api/uploads/bulkdelete). It accepts an array of IDs (its key must be "ids" in the JSON POST request). Don't forget it still requires a token in the headers. (https://s.fiery.me/6rjMAYoC.mp4)

* Removed fontello.css from auth.html.

* Updated a bunch of styling.

* Added "copy link to clipboard" button to thumbs view.

* Added "view thumbnail" button to list view. Clicking the row will no longer trigger thumb view, instead you have to press that button.

* Updated icons.

* ... and perhaps some others that I can't remember?
2018-03-30 06:22:08 +07:00

15 lines
674 B
JavaScript

const config = require('../config.js')
const db = require('knex')(config.database)
const migration = {}
migration.start = async () => {
await db.schema.table('albums', t => t.dateTime('editedAt')).catch(error => console.warn(error.message))
await db.schema.table('albums', t => t.dateTime('zipGeneratedAt')).catch(error => console.warn(error.message))
await db.schema.table('users', t => t.dateTime('enabled')).catch(error => console.warn(error.message))
await db.schema.table('users', t => t.dateTime('fileLength')).catch(error => console.warn(error.message))
console.log('Migration finished! Now start lolisafe normally')
process.exit(0)
}
migration.start()