From 8227d462488c0d0a8bd65d942648133cd01755f8 Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Wed, 6 Mar 2024 17:51:39 -0500 Subject: [PATCH] Change asset path collation to "C" --- dandiapi/api/migrations/0006_asset_path_collation.py | 2 +- dandiapi/api/models/asset.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dandiapi/api/migrations/0006_asset_path_collation.py b/dandiapi/api/migrations/0006_asset_path_collation.py index 300e0b6e8..c639dfec6 100644 --- a/dandiapi/api/migrations/0006_asset_path_collation.py +++ b/dandiapi/api/migrations/0006_asset_path_collation.py @@ -16,7 +16,7 @@ class Migration(migrations.Migration): model_name='asset', name='path', field=models.CharField( - db_collation='C.utf8', + db_collation='C', max_length=512, validators=[dandiapi.api.models.asset.validate_asset_path], ), diff --git a/dandiapi/api/models/asset.py b/dandiapi/api/models/asset.py index 5330562b6..f3dd7bcc2 100644 --- a/dandiapi/api/models/asset.py +++ b/dandiapi/api/models/asset.py @@ -134,7 +134,7 @@ class Status(models.TextChoices): INVALID = 'Invalid' asset_id = models.UUIDField(unique=True, default=uuid.uuid4) - path = models.CharField(max_length=512, validators=[validate_asset_path], db_collation='C.utf8') + path = models.CharField(max_length=512, validators=[validate_asset_path], db_collation='C') blob = models.ForeignKey( AssetBlob, related_name='assets', on_delete=models.CASCADE, null=True, blank=True )