Actors table allows for global actors with the same name/slug with unique entry IDs.

This commit is contained in:
DebaucheryLibrarian
2026-05-20 04:47:26 +02:00
parent 135a343d25
commit 7a226c165d

View 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;
`);
};