# Generated by Django 5.1.9 on 2025-05-16 18:48

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


class Migration(migrations.Migration):

    dependencies = [
        ('access', '0010_company_alter_entity_entity_type_alter_person_dob_and_more'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('core', '0023_ticketcommentaction_alter_manufacturer_organization_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='modelhistory',
            options={'ordering': ['-created'], 'verbose_name': 'Model History', 'verbose_name_plural': 'Model Histories'},
        ),
        migrations.RemoveField(
            model_name='modelhistory',
            name='is_global',
        ),
        migrations.AlterField(
            model_name='modelhistory',
            name='action',
            field=models.IntegerField(choices=[(1, 'Create'), (2, 'Update'), (3, 'Delete')], default=None, help_text='History action performed', null=True, validators=[core.models.centurion.CenturionModel.validate_field_not_none], verbose_name='Action'),
        ),
        migrations.AlterField(
            model_name='modelhistory',
            name='after',
            field=models.JSONField(blank=True, default=None, help_text='Value Change to', null=True, validators=[core.models.centurion.CenturionModel.validate_field_not_none], verbose_name='After'),
        ),
        migrations.AlterField(
            model_name='modelhistory',
            name='before',
            field=models.JSONField(blank=True, default=None, help_text='Value before Change', null=True, validators=[core.models.centurion.CenturionModel.validate_field_not_none], verbose_name='Before'),
        ),
        migrations.AlterField(
            model_name='modelhistory',
            name='content_type',
            field=models.ForeignKey(blank=True, help_text='Model this history is for', on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype', validators=[core.models.centurion.CenturionModel.validate_field_not_none], verbose_name='Content Model'),
        ),
        migrations.AlterField(
            model_name='modelhistory',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[core.models.centurion.CenturionModel.validate_field_not_none], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='modelhistory',
            name='user',
            field=models.ForeignKey(help_text='User whom performed the action', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='User'),
        ),
    ]
