mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-04 06:16:23 -06:00
Introduce case-insensitive collations
This commit is contained in:
@@ -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,
|
||||||
|
),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user