Skip to content

Commit abd03d1

Browse files
committed
🐛(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.
1 parent b3ac8b1 commit abd03d1

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to
1010

1111
- ✨(backend) support creating subdoc from file #1987
1212

13+
### Fixed
14+
15+
- 🐛(docs) run migration 0027 without superuser role
16+
1317

1418
## [v5.1.0] - 2026-05-11
1519

src/backend/core/migrations/0027_auto_20251120_0956.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,10 @@ class Migration(migrations.Migration):
1111
operations = [
1212
migrations.RunSQL(
1313
sql="""
14-
CREATE OR REPLACE FUNCTION public.immutable_unaccent(regdictionary, text)
15-
RETURNS text
16-
LANGUAGE c IMMUTABLE PARALLEL SAFE STRICT AS
17-
'$libdir/unaccent', 'unaccent_dict';
18-
1914
CREATE OR REPLACE FUNCTION public.f_unaccent(text)
2015
RETURNS text
21-
LANGUAGE sql IMMUTABLE PARALLEL SAFE STRICT
22-
RETURN public.immutable_unaccent(regdictionary 'public.unaccent', $1);
16+
LANGUAGE sql IMMUTABLE PARALLEL SAFE strict
17+
return unaccent($1);
2318
2419
CREATE INDEX IF NOT EXISTS user_email_unaccent_trgm_idx
2520
ON impress_user

0 commit comments

Comments
 (0)