diff --git a/action/migrations/0002_devicelog_note.py b/action/migrations/0002_devicelog_note.py new file mode 100644 index 0000000..c14c0f6 --- /dev/null +++ b/action/migrations/0002_devicelog_note.py @@ -0,0 +1,89 @@ +# Generated by Django 5.0.6 on 2024-12-17 19:40 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("action", "0001_initial"), + ("user", "0001_initial"), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name="DeviceLog", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("date", models.DateTimeField(auto_now_add=True)), + ("event", models.CharField(max_length=255)), + ("snapshot_uuid", models.UUIDField()), + ( + "institution", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to="user.institution", + ), + ), + ( + "user", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to=settings.AUTH_USER_MODEL, + ), + ), + ], + options={ + "ordering": ["-date"], + }, + ), + migrations.CreateModel( + name="Note", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("date", models.DateTimeField(auto_now_add=True)), + ("description", models.TextField()), + ("snapshot_uuid", models.UUIDField()), + ( + "institution", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to="user.institution", + ), + ), + ( + "user", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to=settings.AUTH_USER_MODEL, + ), + ), + ], + options={ + "ordering": ["-date"], + }, + ), + ] diff --git a/evidence/migrations/0004_remove_userproperty_user_unique_type_key_uuid.py b/evidence/migrations/0004_remove_userproperty_user_unique_type_key_uuid.py new file mode 100644 index 0000000..7ecc072 --- /dev/null +++ b/evidence/migrations/0004_remove_userproperty_user_unique_type_key_uuid.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.6 on 2024-12-18 12:11 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("evidence", "0003_systemproperty_userproperty_delete_annotation_and_more"), + ] + + operations = [ + migrations.RemoveConstraint( + model_name="userproperty", + name="user_unique_type_key_uuid", + ), + ] diff --git a/lot/migrations/0004_remove_lotproperty_lot_unique_type_key_lot_and_more.py b/lot/migrations/0004_remove_lotproperty_lot_unique_type_key_lot_and_more.py new file mode 100644 index 0000000..d23f407 --- /dev/null +++ b/lot/migrations/0004_remove_lotproperty_lot_unique_type_key_lot_and_more.py @@ -0,0 +1,24 @@ +# Generated by Django 5.0.6 on 2024-12-18 12:11 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("lot", "0003_lotproperty_delete_lotannotation_and_more"), + ] + + operations = [ + migrations.RemoveConstraint( + model_name="lotproperty", + name="lot_unique_type_key_lot", + ), + migrations.AlterField( + model_name="lotproperty", + name="type", + field=models.SmallIntegerField( + choices=[(0, "System"), (1, "User"), (2, "Document")], default=1 + ), + ), + ]