-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e14efd
commit 572d219
Showing
7 changed files
with
163 additions
and
62 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
arches/app/models/migrations/10555_controlled_lists_rename_fields.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,77 @@ | ||
# Generated by Django 4.2.11 on 2024-03-11 09:39 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("models", "10554_controlled_lists_guide_and_search"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name="controlledlistitem", | ||
old_name="list", | ||
new_name="controlled_list", | ||
), | ||
migrations.RenameField( | ||
model_name="controlledlistitemlabel", | ||
old_name="item", | ||
new_name="controlled_list_item", | ||
), | ||
migrations.RemoveConstraint( | ||
model_name="controlledlistitem", | ||
name="unique_list_sortorder", | ||
), | ||
migrations.RemoveConstraint( | ||
model_name="controlledlistitemlabel", | ||
name="unique_item_value_valuetype_language", | ||
), | ||
migrations.RemoveConstraint( | ||
model_name="controlledlistitemlabel", | ||
name="unique_item_preflabel_language", | ||
), | ||
migrations.AlterField( | ||
model_name="controlledlistitem", | ||
name="controlled_list", | ||
field=models.ForeignKey( | ||
db_column="listid", | ||
on_delete=models.deletion.CASCADE, | ||
related_name="controlled_list_items", | ||
to="models.controlledlist", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="controlledlistitemlabel", | ||
name="controlled_list_item", | ||
field=models.ForeignKey( | ||
db_column="itemid", | ||
on_delete=models.deletion.CASCADE, | ||
related_name="controlled_list_item_labels", | ||
to="models.controlledlistitem", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="controlledlistitem", | ||
constraint=models.UniqueConstraint( | ||
deferrable=models.constraints.Deferrable["DEFERRED"], | ||
fields=("controlled_list", "sortorder"), | ||
name="unique_list_sortorder", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="controlledlistitemlabel", | ||
constraint=models.UniqueConstraint( | ||
fields=("controlled_list_item", "value", "value_type", "language"), | ||
name="unique_item_value_valuetype_language", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="controlledlistitemlabel", | ||
constraint=models.UniqueConstraint( | ||
condition=models.Q(("value_type", "prefLabel")), | ||
fields=("controlled_list_item", "language"), | ||
name="unique_item_preflabel_language", | ||
), | ||
), | ||
] |
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
Oops, something went wrong.