-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new "retired" field on policy models
Implements ADR 0016-policy-retirement, and also updates it to reflect the decision to rename the field to "retired" and change it to a boolean. Note this also adds extra visibility into the historical values of various policy fields via the django admin record history interface. Previously, changes were only noted (e.g. "active field changed"), but now the actual historical value of the field is visible. ENT-8206
- Loading branch information
Showing
8 changed files
with
148 additions
and
28 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
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
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
33 changes: 33 additions & 0 deletions
33
enterprise_access/apps/subsidy_access_policy/migrations/0021_subsidyaccesspolicy_retired.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,33 @@ | ||
# Generated by Django 4.2.9 on 2024-01-17 23:44 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('subsidy_access_policy', '0020_alter_historicalassignedlearnercreditaccesspolicy_options_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='historicalsubsidyaccesspolicy', | ||
name='retired', | ||
field=models.BooleanField(default=False, help_text="True means redeemability of content using this policy has been enabled. Set this to False to deactivate the policy but keep it visible from an admin's perspective (useful when you want to just expire a policy without expiring the whole plan)."), | ||
), | ||
migrations.AddField( | ||
model_name='subsidyaccesspolicy', | ||
name='retired', | ||
field=models.BooleanField(default=False, help_text="True means redeemability of content using this policy has been enabled. Set this to False to deactivate the policy but keep it visible from an admin's perspective (useful when you want to just expire a policy without expiring the whole plan)."), | ||
), | ||
migrations.AlterField( | ||
model_name='historicalsubsidyaccesspolicy', | ||
name='active', | ||
field=models.BooleanField(default=False, help_text='Set to FALSE to deactivate and hide this policy. Use this when you want to disable redemption and make it disappear from all frontends, effectively soft-deleting it. Default is False (deactivated).'), | ||
), | ||
migrations.AlterField( | ||
model_name='subsidyaccesspolicy', | ||
name='active', | ||
field=models.BooleanField(default=False, help_text='Set to FALSE to deactivate and hide this policy. Use this when you want to disable redemption and make it disappear from all frontends, effectively soft-deleting it. Default is False (deactivated).'), | ||
), | ||
] |
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.