creates postgres extensions if they don't exist

This commit is contained in:
rgarcia
2015-10-29 17:18:08 +01:00
parent 30d4312e1e
commit 9a6238f154
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
class AddUnaccentExtension < ActiveRecord::Migration
def change
execute "create extension unaccent"
execute "create extension unaccent if not exists unaccent"
end
end

View File

@@ -1,5 +1,5 @@
class AddPgTrgmExtension < ActiveRecord::Migration
def change
execute "create extension pg_trgm"
execute "create extension pg_trgm if not exists pg_trgm"
end
end