river-of-ebooks/migrations/20181119152303_timestamps_t...

42 lines
1.2 KiB
JavaScript
Raw Normal View History

2018-11-19 20:26:11 +00:00
exports.up = function (knex, Promise) {
return Promise.all([
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('user', t => {
t.bigInteger('created_at').alter()
t.bigInteger('updated_at').alter()
2018-11-19 20:26:11 +00:00
}),
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('passport', t => {
t.bigInteger('created_at').alter()
t.bigInteger('updated_at').alter()
2018-11-19 20:26:11 +00:00
}),
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('targeturl', t => {
t.bigInteger('created_at').alter()
t.bigInteger('updated_at').alter()
2018-11-19 20:26:11 +00:00
}),
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('book', t => {
t.bigInteger('created_at').alter()
t.bigInteger('updated_at').alter()
2018-11-19 20:26:11 +00:00
})
])
}
exports.down = function (knex, Promise) {
return Promise.all([
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('user', t => {
t.integer('created_at').alter()
t.integer('updated_at').alter()
2018-11-19 20:26:11 +00:00
}),
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('passport', t => {
t.integer('created_at').alter()
t.integer('updated_at').alter()
2018-11-19 20:26:11 +00:00
}),
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('targeturl', t => {
t.integer('created_at').alter()
t.integer('updated_at').alter()
2018-11-19 20:26:11 +00:00
}),
2018-11-19 20:31:44 +00:00
knex.schema.alterTable('book', t => {
t.integer('created_at').alter()
t.integer('updated_at').alter()
2018-11-19 20:26:11 +00:00
})
])
}