diff options
| author | feld <feld@feld.me> | 2021-02-08 22:01:32 +0000 |
|---|---|---|
| committer | Mark Felder <feld@feld.me> | 2021-02-08 16:01:50 -0600 |
| commit | 593c0851d9a62977f5a6abd22df991b0d73da657 (patch) | |
| tree | c469efff6113ca9f860b0c7222ad8c842ca4e120 /priv | |
| parent | 0368419fce04f636d2c5adcf44e7d35c43279dc1 (diff) | |
| parent | a5bee1bf35a3a771aa259cc98190f24e84880f47 (diff) | |
| download | pleroma-593c0851d9a62977f5a6abd22df991b0d73da657.tar.gz pleroma-593c0851d9a62977f5a6abd22df991b0d73da657.zip | |
Merge branch 'develop' into 'new-user-emails'
Diffstat (limited to 'priv')
| -rw-r--r-- | priv/repo/migrations/20210121080964_add_default_text_search_config.exs | 11 | ||||
| -rw-r--r-- | priv/repo/optional_migrations/rum_indexing/20190510135645_add_fts_index_to_objects_two.exs | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/priv/repo/migrations/20210121080964_add_default_text_search_config.exs b/priv/repo/migrations/20210121080964_add_default_text_search_config.exs new file mode 100644 index 000000000..09b6cccc9 --- /dev/null +++ b/priv/repo/migrations/20210121080964_add_default_text_search_config.exs @@ -0,0 +1,11 @@ +defmodule Pleroma.Repo.Migrations.AddDefaultTextSearchConfig do + use Ecto.Migration + + def change do + execute("DO $$ + BEGIN + execute 'ALTER DATABASE '||current_database()||' SET default_text_search_config = ''english'' '; + END + $$;") + end +end diff --git a/priv/repo/optional_migrations/rum_indexing/20190510135645_add_fts_index_to_objects_two.exs b/priv/repo/optional_migrations/rum_indexing/20190510135645_add_fts_index_to_objects_two.exs index 82e02281d..88476fb57 100644 --- a/priv/repo/optional_migrations/rum_indexing/20190510135645_add_fts_index_to_objects_two.exs +++ b/priv/repo/optional_migrations/rum_indexing/20190510135645_add_fts_index_to_objects_two.exs @@ -17,7 +17,7 @@ defmodule Pleroma.Repo.Migrations.AddFtsIndexToObjectsTwo do execute("CREATE FUNCTION objects_fts_update() RETURNS trigger AS $$ begin - new.fts_content := to_tsvector('english', new.data->>'content'); + new.fts_content := to_tsvector(new.data->>'content'); return new; end $$ LANGUAGE plpgsql") |
