river-of-ebooks/migrations/20190314120819_store_opds_i...

20 lines
423 B
JavaScript

exports.up = function (knex, Promise) {
return Promise.all([
knex.schema.table('book', t => {
t.json('opds')
t.renameColumn('isbn', 'identifier')
t.dropColumns('storage')
})
])
}
exports.down = function (knex, Promise) {
return Promise.all([
knex.schema.table('book', t => {
t.dropColumns('opds')
t.renameColumn('identifier', 'isbn')
t.string('storage')
})
])
}