node-go/server/data/migrations/20200118133355_room.js
2020-01-18 14:15:44 -08:00

15 lines
452 B
JavaScript

const languageArray = [
'EN'
]
exports.up = function(knex) {
return knex.schema.createTable("room", table => {
table.increments('id').primary();
table.string('name').notNullable().unique();
table.text('description').notNullable();
table.boolean('private').notNullable().defaultTo(false);
table.enu('language', languageArray).notNullable().defaultTo('EN');
})
};
exports.down = knex => knex.schema.dropTableIfExists("room");