# Generated by Django 4.1.5 on 2023-03-17 22:15

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


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("documents", "1034_alter_savedviewfilterrule_rule_type"),
    ]

    operations = [
        migrations.RenameModel(
            old_name="Comment",
            new_name="Note",
        ),
        migrations.RenameField(model_name="note", old_name="comment", new_name="note"),
        migrations.AlterModelOptions(
            name="note",
            options={
                "ordering": ("created",),
                "verbose_name": "note",
                "verbose_name_plural": "notes",
            },
        ),
        migrations.AlterField(
            model_name="note",
            name="document",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="notes",
                to="documents.document",
                verbose_name="document",
            ),
        ),
        migrations.AlterField(
            model_name="note",
            name="note",
            field=models.TextField(
                blank=True,
                help_text="Note for the document",
                verbose_name="content",
            ),
        ),
        migrations.AlterField(
            model_name="note",
            name="user",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="notes",
                to=settings.AUTH_USER_MODEL,
                verbose_name="user",
            ),
        ),
    ]
