mirror of
https://github.com/ae-utbm/sith.git
synced 2025-09-23 08:33:54 +00:00
57 lines
1.8 KiB
Python
57 lines
1.8 KiB
Python
# Generated by Django 5.2.3 on 2025-09-08 05:38
|
|
|
|
from django.db import migrations, models
|
|
from django.db.migrations.state import StateApps
|
|
|
|
|
|
def rename_enums(apps: StateApps, schema_editor):
|
|
Subscription = apps.get_model("subscription", "Subscription")
|
|
Subscription.objects.filter(subscription_type="EBOUTIC").update(
|
|
subscription_type="AE_ACCOUNT"
|
|
)
|
|
|
|
|
|
def rename_enums_reverse(apps: StateApps, schema_editor):
|
|
Subscription = apps.get_model("subscription", "Subscription")
|
|
Subscription.objects.filter(subscription_type="AE_ACCOUNT").update(
|
|
subscription_type="EBOUTIC"
|
|
)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [("subscription", "0014_auto_20201207_2323")]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name="subscription",
|
|
name="location",
|
|
field=models.CharField(
|
|
choices=[
|
|
("BELFORT", "Belfort"),
|
|
("SEVENANS", "Sevenans"),
|
|
("MONTBELIARD", "Montbéliard"),
|
|
("EBOUTIC", "Eboutic"),
|
|
("OTHER", "Other"),
|
|
],
|
|
max_length=20,
|
|
verbose_name="location",
|
|
),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="subscription",
|
|
name="payment_method",
|
|
field=models.CharField(
|
|
choices=[
|
|
("CHECK", "Check"),
|
|
("CARD", "Credit card"),
|
|
("CASH", "Cash"),
|
|
("AE_ACCOUNT", "AE account"),
|
|
("OTHER", "Other"),
|
|
],
|
|
max_length=255,
|
|
verbose_name="payment method",
|
|
),
|
|
),
|
|
migrations.RunPython(rename_enums, reverse_code=rename_enums_reverse),
|
|
]
|