🐛(docs) run migration 0027 without superuser role

The migration 00227 must be run with a postgres superuser, most af
managed postgresql database can not be run using this kind of user.
Ti fix this, we use postgresql unnacent function instead of accessing C
function.
This commit is contained in:
Manuel Raynaud
2026-05-13 08:18:01 +02:00
parent b3ac8b1e8c
commit abd03d1ac0
2 changed files with 6 additions and 7 deletions
+4
View File
@@ -10,6 +10,10 @@ and this project adheres to
- ✨(backend) support creating subdoc from file #1987
### Fixed
- 🐛(docs) run migration 0027 without superuser role
## [v5.1.0] - 2026-05-11
@@ -11,15 +11,10 @@ class Migration(migrations.Migration):
operations = [
migrations.RunSQL(
sql="""
CREATE OR REPLACE FUNCTION public.immutable_unaccent(regdictionary, text)
RETURNS text
LANGUAGE c IMMUTABLE PARALLEL SAFE STRICT AS
'$libdir/unaccent', 'unaccent_dict';
CREATE OR REPLACE FUNCTION public.f_unaccent(text)
RETURNS text
LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT
RETURN public.immutable_unaccent(regdictionary 'public.unaccent', $1);
LANGUAGE sql IMMUTABLE PARALLEL SAFE strict
return unaccent($1);
CREATE INDEX IF NOT EXISTS user_email_unaccent_trgm_idx
ON impress_user