mnml/ops/migrations/20180913000513_create_accounts.js
2019-06-16 17:47:45 +10:00

15 lines
469 B
JavaScript
Executable File

exports.up = async knex => {
return knex.schema.createTable('accounts', table => {
table.uuid('id').primary();
table.timestamps(true, true);
table.string('name', 42).notNullable().unique();
table.string('password').notNullable();
table.string('token', 64).notNullable();
table.timestamp('token_expiry').notNullable();
table.index('name');
table.index('id');
});
};
exports.down = async () => {};