|
| 1 | +# Generated by Django 4.2.10 on 2025-04-02 20:12 |
| 2 | + |
| 3 | +from django.conf import settings |
| 4 | +from django.db import migrations, models |
| 5 | +import django.db.models.deletion |
| 6 | + |
| 7 | + |
| 8 | +class Migration(migrations.Migration): |
| 9 | + initial = True |
| 10 | + |
| 11 | + dependencies = [ |
| 12 | + ("main", "0058_alter_project_options"), |
| 13 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
| 14 | + ] |
| 15 | + |
| 16 | + operations = [ |
| 17 | + migrations.CreateModel( |
| 18 | + name="DataExport", |
| 19 | + fields=[ |
| 20 | + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), |
| 21 | + ("created_at", models.DateTimeField(auto_now_add=True)), |
| 22 | + ("updated_at", models.DateTimeField(auto_now=True)), |
| 23 | + ( |
| 24 | + "format", |
| 25 | + models.CharField( |
| 26 | + choices=[ |
| 27 | + ("occurrences_simple_json", "occurrences_simple_json"), |
| 28 | + ("occurrences_simple_csv", "occurrences_simple_csv"), |
| 29 | + ], |
| 30 | + max_length=255, |
| 31 | + ), |
| 32 | + ), |
| 33 | + ("filters", models.JSONField(blank=True, null=True)), |
| 34 | + ("filters_display", models.JSONField(blank=True, null=True)), |
| 35 | + ("file_url", models.URLField(blank=True, null=True)), |
| 36 | + ("record_count", models.PositiveIntegerField(default=0)), |
| 37 | + ("file_size", models.PositiveBigIntegerField(default=0)), |
| 38 | + ( |
| 39 | + "project", |
| 40 | + models.ForeignKey( |
| 41 | + on_delete=django.db.models.deletion.CASCADE, related_name="exports", to="main.project" |
| 42 | + ), |
| 43 | + ), |
| 44 | + ( |
| 45 | + "user", |
| 46 | + models.ForeignKey( |
| 47 | + on_delete=django.db.models.deletion.CASCADE, |
| 48 | + related_name="exports", |
| 49 | + to=settings.AUTH_USER_MODEL, |
| 50 | + ), |
| 51 | + ), |
| 52 | + ], |
| 53 | + options={ |
| 54 | + "abstract": False, |
| 55 | + }, |
| 56 | + ), |
| 57 | + ] |
0 commit comments