22 lines
623 B
Python
22 lines
623 B
Python
|
from django.db import migrations
|
||
|
from django.contrib.postgres.operations import UnaccentExtension
|
||
|
|
||
|
# ref for this migration: https://stackoverflow.com/questions/47230566
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('aemo', '0001_initial'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
UnaccentExtension(),
|
||
|
migrations.RunSQL("CREATE TEXT SEARCH CONFIGURATION french_unaccent(COPY = french);"),
|
||
|
migrations.RunSQL(
|
||
|
"ALTER TEXT SEARCH CONFIGURATION french_unaccent "
|
||
|
"ALTER MAPPING FOR hword, hword_part, word "
|
||
|
"WITH unaccent, french_stem;"
|
||
|
),
|
||
|
]
|