-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add unique constraint to test flag bridge (#414)
* fix: add unique constraint to test flag bridge * fix: tests
- Loading branch information
1 parent
bf285c7
commit 6958f32
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...apps/reports/migrations/0030_testflagbridge_reports_test_results_flag_bridge_flag_test.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,28 @@ | ||
# Generated by Django 4.2.16 on 2024-11-05 20:47 | ||
|
||
from django.db import migrations, models | ||
|
||
""" | ||
BEGIN; | ||
-- | ||
-- Create constraint reports_test_results_flag_bridge_flag_test on model testflagbridge | ||
-- | ||
ALTER TABLE "reports_test_results_flag_bridge" ADD CONSTRAINT "reports_test_results_flag_bridge_flag_test" UNIQUE ("flag_id", "test_id"); | ||
COMMIT; | ||
""" | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("reports", "0029_alter_dailytestrollup_branch"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddConstraint( | ||
model_name="testflagbridge", | ||
constraint=models.UniqueConstraint( | ||
fields=("flag", "test"), | ||
name="reports_test_results_flag_bridge_flag_test", | ||
), | ||
), | ||
] |
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