16 lines
387 B
JavaScript
16 lines
387 B
JavaScript
exports.up = async function(knex) {
|
|
await knex.schema.alterTable('stashes', (table) => {
|
|
table.boolean('archived')
|
|
.notNullable()
|
|
.defaultTo(false);
|
|
|
|
table.check('NOT ("primary" AND archived)', [], 'stashes_not_primary_and_archived');
|
|
});
|
|
};
|
|
|
|
exports.down = async function(knex) {
|
|
await knex.schema.alterTable('stashes', (table) => {
|
|
table.dropColumn('archived');
|
|
});
|
|
};
|