Actors table allows for global actors with the same name/slug with unique entry IDs.
This commit is contained in:
13
migrations/20260520044355_actors_unique.js
Normal file
13
migrations/20260520044355_actors_unique.js
Normal file
@@ -0,0 +1,13 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.raw(`
|
||||
DROP INDEX unique_actor_slugs;
|
||||
CREATE UNIQUE INDEX unique_actor_slugs ON actors (slug, entry_id) WHERE entity_id IS NULL;
|
||||
`);
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.raw(`
|
||||
DROP INDEX unique_actor_slugs;
|
||||
CREATE UNIQUE INDEX unique_actor_slugs ON actors (slug) WHERE entity_id IS NULL;
|
||||
`);
|
||||
};
|
||||
Reference in New Issue
Block a user