diff --git a/migrations/20170920205112_fix_slugs_index/down.sql b/migrations/20170920205112_fix_slugs_index/down.sql new file mode 100644 index 0000000..e69de29 diff --git a/migrations/20170920205112_fix_slugs_index/up.sql b/migrations/20170920205112_fix_slugs_index/up.sql new file mode 100644 index 0000000..cd92904 --- /dev/null +++ b/migrations/20170920205112_fix_slugs_index/up.sql @@ -0,0 +1,2 @@ +DROP INDEX slugs_index; +CREATE UNIQUE INDEX slugs_index ON article_revisions (slug) WHERE latest=1;