-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate 'package_checksum_type' and 'metadata_checksum_type'
closes #2480
- Loading branch information
Showing
5 changed files
with
96 additions
and
5 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,3 @@ | ||
Deprecated the 'package_checksum_type' and 'metadata_checksum_type' options on the `RpmRepository` | ||
and `RpmPublication` models. A 'checksum_type' argument will be provided instead, which will | ||
control both settings (but they will no longer be individually controllable). |
35 changes: 35 additions & 0 deletions
35
pulp_rpm/app/migrations/0056_rpmpublication_checksum_type_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,35 @@ | ||
# Generated by Django 4.2.5 on 2023-11-07 03:51 | ||
|
||
from django.db import migrations, models | ||
from django.db.models import F | ||
|
||
|
||
def set_publication_checksum(apps, schema_editor): | ||
RpmPublication = apps.get_model("rpm", "RpmPublication") | ||
RpmPublication.objects.update(checksum_type=F("metadata_checksum_type")) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('rpm', '0055_add_repo_config_field'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='rpmpublication', | ||
name='checksum_type', | ||
field=models.TextField(choices=[('unknown', 'unknown'), ('md5', 'md5'), ('sha1', 'sha1'), ('sha1', 'sha1'), ('sha224', 'sha224'), ('sha256', 'sha256'), ('sha384', 'sha384'), ('sha512', 'sha512')], null=True), | ||
), | ||
migrations.RunPython(set_publication_checksum), | ||
migrations.AlterField( | ||
model_name='rpmpublication', | ||
name='checksum_type', | ||
field=models.TextField(choices=[('unknown', 'unknown'), ('md5', 'md5'), ('sha1', 'sha1'), ('sha1', 'sha1'), ('sha224', 'sha224'), ('sha256', 'sha256'), ('sha384', 'sha384'), ('sha512', 'sha512')]), | ||
), | ||
migrations.AddField( | ||
model_name='rpmrepository', | ||
name='checksum_type', | ||
field=models.TextField(choices=[('unknown', 'unknown'), ('md5', 'md5'), ('sha1', 'sha1'), ('sha1', 'sha1'), ('sha224', 'sha224'), ('sha256', 'sha256'), ('sha384', 'sha384'), ('sha512', 'sha512')], null=True), | ||
), | ||
] |
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