Download apps/documents/migrations/0002_initial.py from jun2024/fc: direct link, hf CLI and curl.
- Browser
- Download file 6.98 kB
-
https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/documents/migrations/0002_initial.py
- Command line
-
hf download hf://spaces/jun2024/fc/apps/documents/migrations/0002_initial.py
-
curl -L -o 0002_initial.py https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/documents/migrations/0002_initial.py
6.98 kB
| # 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"), | |
| ), | |
| ] | |