forked from python/pythondotorg
-
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.
Update membership types: merge Managing into Contributing
Update `membership_type` on `Membership` model to reflect 2024 Bylaws Change 1 (psf/bylaws#4) - Create data migration to merge `MANAGING` (3) into `CONTRIBUTING` (4). - Update `Membership` model, remove `MANAGING`. - Update all references: `MANAGING` to `CONTRIBUTING`. Left gap in `membership_type` choice values to ease data migration process. Closes python#2566
- Loading branch information
1 parent
4e2bd04
commit f65ca85
Showing
5 changed files
with
44 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.17 on 2025-01-21 22:56 | ||
|
||
# Data migration: Merge MANAGING (3) membership_type into CONTRIBUTING (4) | ||
|
||
from django.db import migrations | ||
|
||
|
||
def update_membership_level(apps, schema_editor): | ||
Membership = apps.get_model('users', 'Membership') | ||
Membership.objects.filter(membership_type=3).update(membership_type=4) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('users', '0015_alter_user_first_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython( | ||
update_membership_level, | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.17 on 2025-01-22 03:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('users', '0016_auto_20250121_2256'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='membership', | ||
name='membership_type', | ||
field=models.IntegerField(choices=[(0, 'Basic Member'), (1, 'Supporting Member'), (2, 'Sponsor Member'), (4, 'Contributing Member'), (5, 'Fellow')], default=0), | ||
), | ||
] |
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