FIX: Add unique index to prevent duplicate slugs for categories

This commit is contained in:
Daniel Waterworth
2019-10-08 14:00:05 +01:00
parent 5f5b232cde
commit c71da3f335
2 changed files with 13 additions and 0 deletions

View File

@@ -890,4 +890,5 @@ end
# index_categories_on_search_priority (search_priority)
# index_categories_on_topic_count (topic_count)
# unique_index_categories_on_name (COALESCE(parent_category_id, '-1'::integer), name) UNIQUE
# unique_index_categories_on_slug (COALESCE(parent_category_id, '-1'::integer), slug) UNIQUE
#