# Generated by Django 3.2.16 on 2024-01-05 10:44

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
from django.apps import apps
import uuid


def create_priorities(app, schema_editor):

    TicketPriority = apps.get_model("home", "TicketPriority")

    data = [
        {"title": "Urgent", "colour": "#FF0000"},
        {"title": "High", "colour": "#FFA500"},
        {"title": "Normal", "colour": "#FFFF00"},
        {"title": "Low", "colour": "#008000"}
    ]

    for item in data:
        priority = TicketPriority.objects.create(title=item["title"], colour=item["colour"])


class Migration(migrations.Migration):

    dependencies = [
        ("home", "0001_initial"),
    ]

    operations = [
       migrations.RunPython(create_priorities)
    ]
