Merge branch 'fix-migration' into 'develop'
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>
Wed, 3 Mar 2021 00:57:39 +0000 (00:57 +0000)
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>
Wed, 3 Mar 2021 00:57:39 +0000 (00:57 +0000)
Fix migration in cases where database name has a hyphen

See merge request pleroma/pleroma!3359

priv/repo/migrations/20210121080964_add_default_text_search_config.exs

index 09b6cccc9830006d68a5db65ae29f74ba666adc1..27f600b705551f709d2a8aea472d60903447c558 100644 (file)
@@ -4,7 +4,7 @@ defmodule Pleroma.Repo.Migrations.AddDefaultTextSearchConfig do
   def change do
     execute("DO $$
     BEGIN
-    execute 'ALTER DATABASE '||current_database()||' SET default_text_search_config = ''english'' ';
+    execute 'ALTER DATABASE \"'||current_database()||'\" SET default_text_search_config = ''english'' ';
     END
     $$;")
   end