diff --git a/migrations/20181119152303_timestamps_to_bigint.js b/migrations/20181119152303_timestamps_to_bigint.js new file mode 100644 index 0000000..de10dd2 --- /dev/null +++ b/migrations/20181119152303_timestamps_to_bigint.js @@ -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') + }) + ]) +}