node-go/packages/server/data/migrations/20200120215211_timeSetting.js
2020-02-05 16:54:09 -08:00

15 lines
No EOL
693 B
JavaScript

const timeTypes = ['untimed','game', 'byoYomi', 'move'];
exports.up = function(knex) {
return knex.schema.createTable("time_setting", table => {
table.increments('id').primary();
table.enu('main_time', timeTypes).notNullable();
table.integer('time_period').notNullable(); // number of periods
table.integer('period_length').notNullable(); // length in seconds
table.enu('overtime', timeTypes).notNullable();
table.integer('overtime_period').notNullable(); // number of periods
table.integer('overtime_length').notNullable(); // length in seconds
})
};
exports.down = knex => knex.schema.dropTableIfExists("time_setting");