Unlinked relation and copy revisions.
This commit is contained in:
@@ -23,23 +23,9 @@ exports.up = async function(knex) {
|
||||
.where('type', type)
|
||||
.update('share_defaults', JSON.stringify(defaults));
|
||||
}, Promise.resolve());
|
||||
|
||||
await knex.schema.alterTable('scenes_revisions', (table) => {
|
||||
// revisions generated for related scenes when a relation is shared, reviewed and applied together with their parent
|
||||
table.integer('parent_revision_id')
|
||||
.references('id')
|
||||
.inTable('scenes_revisions')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.index('parent_revision_id');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('scenes_revisions', (table) => {
|
||||
table.dropColumn('parent_revision_id');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('relations_types', (table) => {
|
||||
table.dropColumn('share_defaults');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user