From d0f26f3cb09de2c2e10794da5868bf2fc5451e8e Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Mon, 5 Oct 2020 13:48:04 +0200 Subject: [PATCH] migrations: create immutable_unaccent in public schema (#47339) --- src/authentic2/migrations/0028_trigram_unaccent_index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/authentic2/migrations/0028_trigram_unaccent_index.py b/src/authentic2/migrations/0028_trigram_unaccent_index.py index 4c1e89c01..55d462cfe 100644 --- a/src/authentic2/migrations/0028_trigram_unaccent_index.py +++ b/src/authentic2/migrations/0028_trigram_unaccent_index.py @@ -69,13 +69,13 @@ class Migration(migrations.Migration): TrigramExtension(), UnaccentExtension(), RunSQLIfExtension( - sql=["CREATE OR REPLACE FUNCTION immutable_unaccent(text) RETURNS varchar AS $$ " + sql=["CREATE OR REPLACE FUNCTION public.immutable_unaccent(text) RETURNS varchar AS $$ " "SELECT public.unaccent('public.unaccent',$1::text); $$ LANGUAGE 'sql' IMMUTABLE"], - reverse_sql=['DROP FUNCTION IF EXISTS immutable_unaccent(text)'] + reverse_sql=['DROP FUNCTION IF EXISTS public.immutable_unaccent(text)'] ), RunSQLIfExtension( sql=["CREATE INDEX custom_user_name_gist_idx ON custom_user_user USING gist " - "(LOWER(immutable_unaccent(first_name || ' ' || last_name)) public.gist_trgm_ops)"], + "(LOWER(public.immutable_unaccent(first_name || ' ' || last_name)) public.gist_trgm_ops)"], reverse_sql=['DROP INDEX IF EXISTS custom_user_name_gist_idx'], ), ]