mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-16 05:19:36 -06:00
Introduce case-insensitive collations
This commit is contained in:
parent
52d4498caf
commit
dac0a06f4f
26
netbox/dcim/migrations/0216_ci_collations.py
Normal file
26
netbox/dcim/migrations/0216_ci_collations.py
Normal file
@ -0,0 +1,26 @@
|
||||
from django.contrib.postgres.operations import CreateCollation
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dcim', '0215_rackreservation_status'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# Create a case-insensitive collation
|
||||
CreateCollation(
|
||||
'case_insensitive',
|
||||
provider='icu',
|
||||
locale='und-u-ks-level2',
|
||||
deterministic=False,
|
||||
),
|
||||
# Create a case-insensitive collation with natural sorting
|
||||
CreateCollation(
|
||||
'ci_natural_sort',
|
||||
provider='icu',
|
||||
locale='und-u-kn-true-ks-level2',
|
||||
deterministic=False,
|
||||
),
|
||||
]
|
||||
Loading…
Reference in New Issue
Block a user