From 067f9495e815a47b151e2fe69222bb30bdf3df29 Mon Sep 17 00:00:00 2001 From: st42597 Date: Wed, 23 Mar 2022 09:06:56 +0000 Subject: [PATCH] add: model migration --- .../migrations/0007_auto_20220323_1806.py | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 backend/temperature/migrations/0007_auto_20220323_1806.py diff --git a/backend/temperature/migrations/0007_auto_20220323_1806.py b/backend/temperature/migrations/0007_auto_20220323_1806.py new file mode 100644 index 000000000..35988561e --- /dev/null +++ b/backend/temperature/migrations/0007_auto_20220323_1806.py @@ -0,0 +1,57 @@ +# Generated by Django 3.2.10 on 2022-03-23 09:06 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('problem', '0015_auto_20211030_1535'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('temperature', '0006_alter_solvedproblem_id'), + ] + + operations = [ + migrations.AddField( + model_name='solvedproblem', + name='problem', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='problem.problem'), + ), + migrations.AddField( + model_name='solvedproblem', + name='user', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='temperature', + name='user', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='solvedproblem', + name='id', + field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + ), + migrations.AlterUniqueTogether( + name='solvedproblem', + unique_together={('user', 'problem')}, + ), + migrations.AlterUniqueTogether( + name='temperature', + unique_together={('user', 'date')}, + ), + migrations.RemoveField( + model_name='solvedproblem', + name='_id', + ), + migrations.RemoveField( + model_name='solvedproblem', + name='user_id', + ), + migrations.RemoveField( + model_name='temperature', + name='user_id', + ), + ]