Skip to content

Commit

Permalink
chore: priority migration (#2162)
Browse files Browse the repository at this point in the history
  • Loading branch information
NarayanBavisetti authored Sep 13, 2023
1 parent b9c9350 commit 47bec77
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions apiserver/plane/db/migrations/0043_auto_20230912_1733.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.3 on 2023-09-12 17:33

from django.db import migrations


def update_issue_priority_choice(apps, schema_editor):
IssueModel = apps.get_model("db", "Issue")
updated_issues = []
for obj in IssueModel.objects.all():
if obj.priority is None:
obj.priority = "none"
updated_issues.append(obj)
IssueModel.objects.bulk_update(updated_issues, ["priority"], batch_size=100)


class Migration(migrations.Migration):

dependencies = [
('db', '0042_alter_analyticview_created_by_and_more'),
]

operations = [
migrations.RunPython(update_issue_priority_choice),
]

0 comments on commit 47bec77

Please sign in to comment.