# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Generated by Django 4.2.3 on 2023-09-05 12:20

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


class Migration(migrations.Migration):
    dependencies = [
        ("screenshots", "0007_alter_screenshot_image"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("lang", "0020_alter_plural_source"),
        ("trans", "0187_alter_variant_unique_together_alter_alert_component_and_more"),
    ]

    operations = [
        migrations.RemoveIndex(
            model_name="change",
            name="trans_chang_timesta_33178f_idx",
        ),
        migrations.RemoveIndex(
            model_name="change",
            name="trans_chang_action_27fd77_idx",
        ),
        migrations.RemoveIndex(
            model_name="change",
            name="trans_chang_user_id_b1b554_idx",
        ),
        migrations.AlterField(
            model_name="change",
            name="action",
            field=models.IntegerField(
                choices=[
                    (0, "Resource update"),
                    (1, "Translation completed"),
                    (2, "Translation changed"),
                    (5, "New translation"),
                    (3, "Comment added"),
                    (4, "Suggestion added"),
                    (6, "Automatic translation"),
                    (7, "Suggestion accepted"),
                    (8, "Translation reverted"),
                    (9, "Translation uploaded"),
                    (13, "New source string"),
                    (14, "Component locked"),
                    (15, "Component unlocked"),
                    (17, "Committed changes"),
                    (18, "Pushed changes"),
                    (19, "Reset repository"),
                    (20, "Merged repository"),
                    (21, "Rebased repository"),
                    (22, "Failed merge on repository"),
                    (23, "Failed rebase on repository"),
                    (28, "Failed push on repository"),
                    (24, "Parse error"),
                    (25, "Removed translation"),
                    (26, "Suggestion removed"),
                    (27, "Search and replace"),
                    (29, "Suggestion removed during cleanup"),
                    (30, "Source string changed"),
                    (31, "New string added"),
                    (32, "Bulk status change"),
                    (33, "Changed visibility"),
                    (34, "Added user"),
                    (35, "Removed user"),
                    (36, "Translation approved"),
                    (37, "Marked for edit"),
                    (38, "Removed component"),
                    (39, "Removed project"),
                    (41, "Renamed project"),
                    (42, "Renamed component"),
                    (43, "Moved component"),
                    (44, "New string to translate"),
                    (45, "New contributor"),
                    (46, "New announcement"),
                    (47, "New alert"),
                    (48, "Added new language"),
                    (49, "Requested new language"),
                    (50, "Created project"),
                    (51, "Created component"),
                    (52, "Invited user"),
                    (53, "Received repository notification"),
                    (54, "Replaced file by upload"),
                    (55, "License changed"),
                    (56, "Contributor agreement changed"),
                    (57, "Screnshot added"),
                    (58, "Screnshot uploaded"),
                    (59, "String updated in the repository"),
                    (60, "Add-on installed"),
                    (61, "Add-on configuration changed"),
                    (62, "Add-on uninstalled"),
                    (63, "Removed string"),
                    (64, "Removed comment"),
                    (65, "Resolved comment"),
                    (66, "Explanation updated"),
                    (67, "Removed category"),
                    (68, "Renamed category"),
                    (69, "Moved category"),
                ],
                default=2,
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="alert",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="trans.alert",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="announcement",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="trans.announcement",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="author",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="comment",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="trans.comment",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="component",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="trans.component",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="language",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="lang.language",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="project",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="trans.project",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="screenshot",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="screenshots.screenshot",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="suggestion",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="trans.suggestion",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="translation",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="trans.translation",
            ),
        ),
        migrations.AlterField(
            model_name="change",
            name="unit",
            field=models.ForeignKey(
                db_index=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="trans.unit",
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["timestamp", "action"], name="trans_chang_timesta_2565db_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["project", "action", "timestamp"],
                name="trans_chang_project_6d802b_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["language", "action", "timestamp"],
                name="trans_chang_languag_33816c_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["project", "language", "action", "timestamp"],
                name="trans_chang_project_d37cd3_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["component", "action", "timestamp"],
                name="trans_chang_compone_5e4964_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["translation", "action", "timestamp"],
                name="trans_chang_transla_36a8a9_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["unit", "action", "timestamp"],
                name="trans_chang_unit_id_6d86c1_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="change",
            index=models.Index(
                fields=["user", "action", "timestamp"],
                name="trans_chang_user_id_88ba38_idx",
            ),
        ),
    ]
