migrate dates to bigint

pull/31/head
unknown 2018-11-19 15:26:11 -05:00
parent 42ccd90272
commit 49c2997cda
1 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,41 @@
exports.up = function (knex, Promise) {
return Promise.all([
knex.schema.table('user', t => {
t.bigInteger('created_at')
t.bigInteger('updated_at')
}),
knex.schema.table('passport', t => {
t.bigInteger('created_at')
t.bigInteger('updated_at')
}),
knex.schema.table('targeturl', t => {
t.bigInteger('created_at')
t.bigInteger('updated_at')
}),
knex.schema.table('book', t => {
t.bigInteger('created_at')
t.bigInteger('updated_at')
})
])
}
exports.down = function (knex, Promise) {
return Promise.all([
knex.schema.table('user', t => {
t.integer('created_at')
t.integer('updated_at')
}),
knex.schema.table('passport', t => {
t.integer('created_at')
t.integer('updated_at')
}),
knex.schema.table('targeturl', t => {
t.integer('created_at')
t.integer('updated_at')
}),
knex.schema.table('book', t => {
t.integer('created_at')
t.integer('updated_at')
})
])
}