mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02:00
fix: database unique constraints (#2594)
* fixed missing migration name * added unique constraints to all m2m tables * fixed bug trying to create duplicate tags * added more unique constraints * fixed duplicate seeder data * updated tests * fixed seed rollback error
This commit is contained in:
parent
247a4de283
commit
a98e863bca
13 changed files with 222 additions and 15 deletions
|
@ -656,7 +656,10 @@ def test_pagination_order_by_nested_model(
|
|||
|
||||
alphabet = ["a", "b", "c", "d", "e"]
|
||||
labels = database.group_multi_purpose_labels.create_many(
|
||||
[MultiPurposeLabelSave(group_id=unique_user.group_id, name=letter) for letter in alphabet]
|
||||
[
|
||||
MultiPurposeLabelSave(group_id=unique_user.group_id, name=letter + f"_{random_string()}")
|
||||
for letter in alphabet
|
||||
]
|
||||
)
|
||||
random.shuffle(labels)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue