23 lines
505 B
JavaScript
23 lines
505 B
JavaScript
exports.up = async knex => {
|
|
await knex.schema.createTable('mtx', table => {
|
|
table.uuid('id')
|
|
.primary();
|
|
|
|
table.uuid('account')
|
|
.notNullable()
|
|
.index();
|
|
|
|
table.foreign('account')
|
|
.references('id')
|
|
.inTable('accounts')
|
|
.onDelete('RESTRICT');
|
|
|
|
table.string('variant')
|
|
.notNullable()
|
|
.index();
|
|
|
|
table.timestamps(true, true);
|
|
});
|
|
};
|
|
|
|
exports.down = async () => {}; |