mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-09 19:27:55 +02:00
🐛(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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user