From ea28f4f4f7576e764728980eb9454bc4688294c3 Mon Sep 17 00:00:00 2001 From: Magnus Hoff Date: Wed, 20 Sep 2017 23:30:50 +0200 Subject: [PATCH] Fix buggy slugs_index --- migrations/20170920205112_fix_slugs_index/down.sql | 0 migrations/20170920205112_fix_slugs_index/up.sql | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 migrations/20170920205112_fix_slugs_index/down.sql create mode 100644 migrations/20170920205112_fix_slugs_index/up.sql 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;