From 8d52f57e6a751ebae835007de58a13bed5ed527b Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Tue, 9 Jan 2018 15:20:04 +0100 Subject: [PATCH] Fix pg extension creation in migration for #1097 --- .../20180108132507_enable_unaccent_postgresql_extension.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrate/20180108132507_enable_unaccent_postgresql_extension.rb b/db/migrate/20180108132507_enable_unaccent_postgresql_extension.rb index e68c29332..f7872c27d 100644 --- a/db/migrate/20180108132507_enable_unaccent_postgresql_extension.rb +++ b/db/migrate/20180108132507_enable_unaccent_postgresql_extension.rb @@ -1,9 +1,9 @@ class EnableUnaccentPostgresqlExtension < ActiveRecord::Migration[5.0] def up - execute 'CREATE EXTENSION unaccent;' + execute 'CREATE EXTENSION IF NOT EXISTS unaccent;' end def down - execute 'DROP EXTENSION unaccent;' + execute 'DROP EXTENSION IF EXISTS unaccent;' end end