/**
 * @param {import("knex").Knex} knex
 */
exports.up = function(knex) {
    return knex.schema.createTable('events', (table) => {
        table.increments('id').primary();
        table.integer('owner_id').notNullable();
        table.string("name").notNullable();
        table.text("description").nullable();
        table.integer("score").notNullable();

        table.dateTime("created_at").defaultTo(knex.fn.now());
        table.dateTime("deleted_at");
    });
};
exports.down = function(knex) {
    return knex.schema.dropTable('events');
};