-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store certificate policies data in new Pydantic format
- Loading branch information
1 parent
ab85a64
commit f75e1fe
Showing
5 changed files
with
455 additions
and
83 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,20 @@ | ||
# Generated by Django 5.0 on 2023-12-28 18:32 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def update_sign_certificates_schema(apps, schema_editor) -> None: | ||
"""Migrate stored data to new Pydantic-based serialization.""" | ||
CertificateAuthority = apps.get_model("django_ca", "CertificateAuthority") | ||
for ca in CertificateAuthority.objects.exclude(sign_certificate_policies=None): | ||
ca.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("django_ca", "0037_alter_certificateauthority_name_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(update_sign_certificates_schema, reverse_code=migrations.RunPython.noop) | ||
] |
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.