forked from pulp/pulp_ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Having more than one collection version in the system prevents the migration 0056 to run, because null as a value is not allowed to appear more than once. We need to clean this up very careful, becuase on some systems the migration may have applied cleanly. fixes pulp#2040
- Loading branch information
Showing
5 changed files
with
67 additions
and
19 deletions.
There are no files selected for viewing
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 @@ | ||
Fixed a regression with migration 0056 failing on multiple null values on a unique constraint. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 4.2.16 on 2024-11-22 12:06 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("ansible", "0057_collectionversion_sha256_migrate"), | ||
] | ||
|
||
operations = [ | ||
# --------------------------------------------------------------------- | ||
# In the current timeline of migrations, this step seems superfluous. | ||
# But in version 0.23.0 we shipped a bad version of 0056. | ||
# This repairs it. | ||
migrations.AlterUniqueTogether( | ||
name="collectionversion", | ||
unique_together={("namespace", "name", "version")}, | ||
), | ||
# --------------------------------------------------------------------- | ||
migrations.AddConstraint( | ||
model_name="collectionversion", | ||
constraint=models.UniqueConstraint( | ||
condition=models.Q(("sha256__isnull", False)), | ||
fields=("sha256",), | ||
name="unique_sha256", | ||
), | ||
), | ||
] |
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