File size: 6,978 Bytes
b4f2238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Generated by Django 6.0.2 on 2026-02-28 06:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("documents", "0001_initial"),
        ("litigation_ai", "0001_initial"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name="generationtask",
            name="litigation_session",
            field=models.ForeignKey(
                blank=True,
                help_text="如果是 AI 生成,关联到对应的会话",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="generation_tasks",
                to="litigation_ai.litigationsession",
                verbose_name="AI生成会话",
            ),
        ),
        migrations.AddIndex(
            model_name="placeholder",
            index=models.Index(fields=["is_active"], name="documents_p_is_acti_861641_idx"),
        ),
        migrations.AddIndex(
            model_name="promptversion",
            index=models.Index(fields=["name", "is_active"], name="documents_p_name_55877d_idx"),
        ),
        migrations.AlterUniqueTogether(
            name="promptversion",
            unique_together={("name", "version")},
        ),
        migrations.AddIndex(
            model_name="proxymatterrule",
            index=models.Index(fields=["is_active", "priority"], name="documents_p_is_acti_fc1829_idx"),
        ),
        migrations.AddIndex(
            model_name="proxymatterrule",
            index=models.Index(fields=["case_type", "case_stage", "is_active"], name="documents_p_case_ty_a13a8f_idx"),
        ),
        migrations.AddField(
            model_name="templateauditlog",
            name="user",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
                verbose_name="操作人",
            ),
        ),
        migrations.AddIndex(
            model_name="evidencelist",
            index=models.Index(fields=["case", "order"], name="documents_e_case_id_0cb748_idx"),
        ),
        migrations.AddIndex(
            model_name="evidencelist",
            index=models.Index(fields=["case", "list_type"], name="documents_e_case_id_9ff9d0_idx"),
        ),
        migrations.AddIndex(
            model_name="evidencelist",
            index=models.Index(fields=["created_by"], name="documents_e_created_4a285c_idx"),
        ),
        migrations.AddConstraint(
            model_name="evidencelist",
            constraint=models.UniqueConstraint(fields=("case", "list_type"), name="unique_case_list_type"),
        ),
        migrations.AddIndex(
            model_name="evidenceitem",
            index=models.Index(fields=["evidence_list", "order"], name="documents_e_evidenc_9a8ef6_idx"),
        ),
        migrations.AddIndex(
            model_name="externaltemplate",
            index=models.Index(fields=["law_firm", "source_name"], name="documents_e_law_fir_31fde5_idx"),
        ),
        migrations.AddIndex(
            model_name="externaltemplate",
            index=models.Index(fields=["law_firm", "is_active"], name="documents_e_law_fir_897043_idx"),
        ),
        migrations.AddIndex(
            model_name="externaltemplate",
            index=models.Index(fields=["structure_fingerprint"], name="documents_e_structu_9ffa3b_idx"),
        ),
        migrations.AddIndex(
            model_name="externaltemplate",
            index=models.Index(fields=["status"], name="documents_e_status_d32985_idx"),
        ),
        migrations.AddIndex(
            model_name="externaltemplatefieldmapping",
            index=models.Index(fields=["template", "sort_order"], name="documents_e_templat_9d6340_idx"),
        ),
        migrations.AddIndex(
            model_name="fillrecord",
            index=models.Index(fields=["case", "-filled_at"], name="documents_f_case_id_926567_idx"),
        ),
        migrations.AddIndex(
            model_name="fillrecord",
            index=models.Index(fields=["template", "-filled_at"], name="documents_f_templat_8db7a8_idx"),
        ),
        migrations.AddIndex(
            model_name="documenttemplatefolderbinding",
            index=models.Index(fields=["folder_template", "folder_node_id"], name="documents_d_folder__69fc0d_idx"),
        ),
        migrations.AddIndex(
            model_name="documenttemplatefolderbinding",
            index=models.Index(fields=["document_template"], name="documents_d_documen_3e722a_idx"),
        ),
        migrations.AddIndex(
            model_name="documenttemplatefolderbinding",
            index=models.Index(fields=["is_active"], name="documents_d_is_acti_19e591_idx"),
        ),
        migrations.AlterUniqueTogether(
            name="documenttemplatefolderbinding",
            unique_together={("document_template", "folder_template", "folder_node_id")},
        ),
        migrations.AddIndex(
            model_name="generationtask",
            index=models.Index(fields=["case", "-created_at"], name="documents_g_case_id_57bb8e_idx"),
        ),
        migrations.AddIndex(
            model_name="generationtask",
            index=models.Index(fields=["contract", "-created_at"], name="documents_g_contrac_3b54f8_idx"),
        ),
        migrations.AddIndex(
            model_name="generationtask",
            index=models.Index(fields=["litigation_session"], name="documents_g_litigat_ee5b82_idx"),
        ),
        migrations.AddIndex(
            model_name="generationtask",
            index=models.Index(fields=["status"], name="documents_g_status_3fd33e_idx"),
        ),
        migrations.AddIndex(
            model_name="generationtask",
            index=models.Index(fields=["generation_method"], name="documents_g_generat_96ab0e_idx"),
        ),
        migrations.AddIndex(
            model_name="generationtask",
            index=models.Index(fields=["created_by", "-created_at"], name="documents_g_created_afe336_idx"),
        ),
        migrations.AddIndex(
            model_name="templateauditlog",
            index=models.Index(fields=["content_type", "object_id"], name="documents_t_content_b119bb_idx"),
        ),
        migrations.AddIndex(
            model_name="templateauditlog",
            index=models.Index(fields=["action"], name="documents_t_action_1e19ee_idx"),
        ),
        migrations.AddIndex(
            model_name="templateauditlog",
            index=models.Index(fields=["user"], name="documents_t_user_id_177e24_idx"),
        ),
        migrations.AddIndex(
            model_name="templateauditlog",
            index=models.Index(fields=["-created_at"], name="documents_t_created_033a55_idx"),
        ),
    ]