adding
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from django.db import migrations
|
||||
|
||||
# ریزاپ کارگزاری کامل حذف شد — این migration پاکسازی میکند اگر روی یک DB
|
||||
# که قبلاً 0002 را اجرا کرده بود (و رکورد "brokerage" را ساخته بود) اعمال شود.
|
||||
# روی DB تازه (که 0002 دیگر "brokerage" را seed نمیکند) بیاثر است.
|
||||
|
||||
|
||||
def remove_brokerage(apps, schema_editor):
|
||||
FeaturePlan = apps.get_model("billing", "FeaturePlan")
|
||||
FeaturePlan.objects.filter(key="brokerage").delete()
|
||||
|
||||
|
||||
def noop(apps, schema_editor):
|
||||
pass
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [("billing", "0002_seed_feature_plans")]
|
||||
operations = [migrations.RunPython(remove_brokerage, noop)]
|
||||
Reference in New Issue
Block a user