davidtran999 commited on
Commit
8e8a910
·
verified ·
1 Parent(s): 008d400

Upload backend/core/migrations/0007_legal_upload_storage.py with huggingface_hub

Browse files
backend/core/migrations/0007_legal_upload_storage.py ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from django.db import migrations, models
2
+ import hue_portal.core.models
3
+
4
+
5
+ class Migration(migrations.Migration):
6
+
7
+ dependencies = [
8
+ ("core", "0006_legal_documents"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AddField(
13
+ model_name="legaldocument",
14
+ name="file_checksum",
15
+ field=models.CharField(blank=True, max_length=128),
16
+ ),
17
+ migrations.AddField(
18
+ model_name="legaldocument",
19
+ name="file_size",
20
+ field=models.BigIntegerField(blank=True, null=True),
21
+ ),
22
+ migrations.AddField(
23
+ model_name="legaldocument",
24
+ name="mime_type",
25
+ field=models.CharField(blank=True, max_length=120),
26
+ ),
27
+ migrations.AddField(
28
+ model_name="legaldocument",
29
+ name="original_filename",
30
+ field=models.CharField(blank=True, max_length=255),
31
+ ),
32
+ migrations.AddField(
33
+ model_name="legaldocument",
34
+ name="uploaded_file",
35
+ field=models.FileField(blank=True, null=True, upload_to=hue_portal.core.models.legal_document_upload_path),
36
+ ),
37
+ migrations.AlterField(
38
+ model_name="legaldocument",
39
+ name="source_file",
40
+ field=models.CharField(blank=True, max_length=500),
41
+ ),
42
+ migrations.CreateModel(
43
+ name="LegalDocumentImage",
44
+ fields=[
45
+ ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
46
+ ("image", models.ImageField(upload_to=hue_portal.core.models.legal_document_image_upload_path)),
47
+ ("page_number", models.IntegerField(blank=True, null=True)),
48
+ ("description", models.CharField(blank=True, max_length=255)),
49
+ ("width", models.IntegerField(blank=True, null=True)),
50
+ ("height", models.IntegerField(blank=True, null=True)),
51
+ ("checksum", models.CharField(blank=True, max_length=128)),
52
+ ("created_at", models.DateTimeField(auto_now_add=True)),
53
+ (
54
+ "document",
55
+ models.ForeignKey(
56
+ on_delete=models.deletion.CASCADE,
57
+ related_name="images",
58
+ to="core.legaldocument",
59
+ ),
60
+ ),
61
+ ],
62
+ ),
63
+ migrations.AddIndex(
64
+ model_name="legaldocumentimage",
65
+ index=models.Index(fields=["document", "page_number"], name="core_legald_documen_b2f145_idx"),
66
+ ),
67
+ migrations.AddIndex(
68
+ model_name="legaldocumentimage",
69
+ index=models.Index(fields=["checksum"], name="core_legald_checksum_90ccce_idx"),
70
+ ),
71
+ ]
72
+