node-go/server/data/migrations/20200120232142_message.js

14 lines
460 B
JavaScript
Raw Permalink Normal View History

2020-01-21 07:36:52 +00:00
exports.up = knex => {
return knex.schema.createTable("message", table => {
table.increments('id').primary();
table.timestamps(true, true)
table.text('content').notNullable();
table.integer('move').references('id').inTable('move');
table.integer('room').references('id').inTable('room');
table.integer('user').references('id').inTable('user').notNullable();
});
};
exports.down = knex => knex.schema.dropTableIfExists("message");