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

        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');
};