/**
 * @param {import("knex").Knex} knex
 */
exports.up = function(knex) {
    return knex.schema.createTable('student_events', (table) => {
        table.increments('id').primary();
        table.integer('owner_id').notNullable();

        table.integer("student_id").notNullable();
        table.integer("event_id").notNullable();
        table.integer("score").notNullable();

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