# Generated by Django 5.1.1 on 2024-11-05 18:00

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("bloomerp", "0041_filefolder_content_types"),
    ]

    operations = [
        migrations.RenameModel(
            old_name="Kpi",
            new_name="Widget",
        ),
        migrations.RenameField(
            model_name="userdashboardview",
            old_name="kpis",
            new_name="widgets",
        ),
        migrations.RenameField(
            model_name="userkpidashboardviewpreference",
            old_name="kpi",
            new_name="widget",
        ),
        migrations.AlterUniqueTogether(
            name="userkpidashboardviewpreference",
            unique_together=set(),
        ),
        migrations.AlterField(
            model_name="userkpidashboardviewpreference",
            name="user",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="widget_dashboard_view_preference",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AlterUniqueTogether(
            name="userkpidashboardviewpreference",
            unique_together={("widget", "user")},
        ),
        migrations.AlterModelTable(
            name="userkpidashboardviewpreference",
            table="bloomerp_user_widget_dashboard_view_preference",
        ),
        migrations.AlterModelTable(
            name="widget",
            table="bloomerp_widget",
        ),
    ]
