node-go/packages/play-node-go/server/data/migrations/20200120232142_message.js
2020-02-05 16:44:34 -08:00

13 lines
460 B
JavaScript

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");