1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

[bug] Unable to run migrations if postgre unaccent was already active

This commit is contained in:
Sylvain 2016-06-27 09:10:33 +02:00
parent 98edd345b1
commit b08ab236dc

View File

@ -2,8 +2,8 @@ class CreateUnaccentFunction < ActiveRecord::Migration
# PostgreSQL only
def up
execute 'CREATE EXTENSION unaccent;'
execute 'CREATE EXTENSION pg_trgm;'
execute 'CREATE EXTENSION IF NOT EXISTS unaccent;'
execute 'CREATE EXTENSION IF NOT EXISTS pg_trgm;'
execute "CREATE OR REPLACE FUNCTION f_unaccent(text)
RETURNS text AS
$func$