-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Datasets): increase slug size and only add suffix if needed (#802)
* fix(Datasets): increase slug size and only add suffix if needed * fix(Datasets): use slug for dataset checks * fix(Workspaces): Try to create buckets/datasets/workspaces using their slug is taken --------- Co-authored-by: Quentin Gérôme <[email protected]>
- Loading branch information
1 parent
f50711f
commit 93d4954
Showing
5 changed files
with
149 additions
and
26 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
hexa/datasets/migrations/0007_alter_dataset_slug_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 5.0.8 on 2024-09-03 09:20 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("datasets", "0006_datasetfilemetadata"), | ||
( | ||
"workspaces", | ||
"0044_remove_workspaceinvitation_workspace_invitation_unique_workspace_email", | ||
), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="dataset", | ||
name="slug", | ||
field=models.TextField(max_length=255), | ||
), | ||
migrations.AddConstraint( | ||
model_name="dataset", | ||
constraint=models.UniqueConstraint( | ||
models.F("workspace_id"), | ||
models.F("slug"), | ||
name="unique_dataset_slug_per_workspace", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters