backend/data/migrations/20200502184450_account.js

17 lines
454 B
JavaScript

exports.up = (knex) => {
return knex.schema.createTable('account', (table) => {
table.increments('id').primary();
table.string('username').notNullable();
table.string('email').notNullable().unique();
table.string('password').notNullable();
table.string('timezone');
table.string('earliest_time');
table.string('latest_time');
table.timestamps(true, true);
});
};
exports.down = (knex) => {
return knex.schema.dropTable('account');
};