diff --git a/core/inventory/migrations/0007_remove_item_container_itemplacement_comment.py b/core/inventory/migrations/0007_remove_item_container_itemplacement_comment.py new file mode 100644 index 0000000..24c0f75 --- /dev/null +++ b/core/inventory/migrations/0007_remove_item_container_itemplacement_comment.py @@ -0,0 +1,36 @@ +# Generated by Django 4.2.7 on 2024-11-23 00:19 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('inventory', '0006_alter_event_table'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='container', + ), + migrations.CreateModel( + name='ItemPlacement', + fields=[ + ('id', models.AutoField(primary_key=True, serialize=False)), + ('timestamp', models.DateTimeField(auto_now_add=True)), + ('container', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='item_history', to='inventory.container')), + ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='container_history', to='inventory.item')), + ], + ), + migrations.CreateModel( + name='Comment', + fields=[ + ('id', models.AutoField(primary_key=True, serialize=False)), + ('comment', models.TextField()), + ('timestamp', models.DateTimeField(auto_now_add=True)), + ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='inventory.item')), + ], + ), + ]