|
| 1 | +# Generated by Django 4.2.23 on 2025-10-03 08:45 |
| 2 | + |
| 3 | +import catmaid.fields |
| 4 | +from django.conf import settings |
| 5 | +import django.contrib.postgres.functions |
| 6 | +from django.db import migrations, models |
| 7 | +import django.db.models.deletion |
| 8 | + |
| 9 | + |
| 10 | +class Migration(migrations.Migration): |
| 11 | + |
| 12 | + dependencies = [ |
| 13 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
| 14 | + ("catmaid", "0123_update_stack_metadata_ref"), |
| 15 | + ] |
| 16 | + |
| 17 | + operations = [ |
| 18 | + migrations.CreateModel( |
| 19 | + name="ImportTask", |
| 20 | + fields=[ |
| 21 | + ( |
| 22 | + "id", |
| 23 | + models.AutoField( |
| 24 | + auto_created=True, |
| 25 | + primary_key=True, |
| 26 | + serialize=False, |
| 27 | + verbose_name="ID", |
| 28 | + ), |
| 29 | + ), |
| 30 | + ( |
| 31 | + "creation_time", |
| 32 | + catmaid.fields.DbDefaultDateTimeField( |
| 33 | + default=django.contrib.postgres.functions.TransactionNow |
| 34 | + ), |
| 35 | + ), |
| 36 | + ( |
| 37 | + "edition_time", |
| 38 | + catmaid.fields.DbDefaultDateTimeField( |
| 39 | + default=django.contrib.postgres.functions.TransactionNow |
| 40 | + ), |
| 41 | + ), |
| 42 | + ("description", models.CharField()), |
| 43 | + ("metadata", models.JSONField(blank=True, default=dict)), |
| 44 | + ("import_log", models.TextField(blank=True, default="")), |
| 45 | + ("import_time", models.FloatField(blank=True, default=0)), |
| 46 | + ( |
| 47 | + "status", |
| 48 | + models.CharField( |
| 49 | + blank=True, |
| 50 | + choices=[ |
| 51 | + ("created", "Created"), |
| 52 | + ("running", "Running"), |
| 53 | + ("success", "Success"), |
| 54 | + ("error", "Error"), |
| 55 | + ], |
| 56 | + default="created", |
| 57 | + ), |
| 58 | + ), |
| 59 | + ( |
| 60 | + "project", |
| 61 | + models.ForeignKey( |
| 62 | + on_delete=django.db.models.deletion.DO_NOTHING, |
| 63 | + to="catmaid.project", |
| 64 | + ), |
| 65 | + ), |
| 66 | + ( |
| 67 | + "user", |
| 68 | + models.ForeignKey( |
| 69 | + on_delete=django.db.models.deletion.DO_NOTHING, |
| 70 | + to=settings.AUTH_USER_MODEL, |
| 71 | + ), |
| 72 | + ), |
| 73 | + ], |
| 74 | + options={ |
| 75 | + "db_table": "catmaid_import_task", |
| 76 | + }, |
| 77 | + ), |
| 78 | + ] |
0 commit comments