# Generated by Django 3.2.7 on 2021-09-05 16:42

import django.contrib.postgres.indexes
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
    dependencies = [
        ("torque", "0026_auto_20210905_1638"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="attachment",
            name="unique_attachment",
        ),
        migrations.RemoveIndex(
            model_name="searchcachedocument",
            name="torque_search_data_ve_67ae25_gin",
        ),
        migrations.AlterField(
            model_name="document",
            name="sheet",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="documents",
                to="torque.spreadsheet",
            ),
        ),
        migrations.AddIndex(
            model_name="searchcachedocument",
            index=django.contrib.postgres.indexes.GinIndex(
                fields=["data_vector"], name="torque_search_data_ve_0ad953_gin"
            ),
        ),
        migrations.AddConstraint(
            model_name="attachment",
            constraint=models.UniqueConstraint(
                fields=("sheet", "document", "name"), name="unique_attachment"
            ),
        ),
    ]
