From 37c7c496144c7778fb2ea219d1236b1c2e606874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Sat, 2 Oct 2021 18:41:19 +0200 Subject: [PATCH] Remove Django 3.2 warnings --- .../migrations/0003_alter_telemetry_id.py | 18 ++++++++++++++++++ bite/telemetry/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 bite/telemetry/migrations/0003_alter_telemetry_id.py diff --git a/bite/telemetry/migrations/0003_alter_telemetry_id.py b/bite/telemetry/migrations/0003_alter_telemetry_id.py new file mode 100644 index 0000000..f3f04db --- /dev/null +++ b/bite/telemetry/migrations/0003_alter_telemetry_id.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.7 on 2021-09-03 09:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('telemetry', '0002_timescale'), + ] + + operations = [ + migrations.AlterField( + model_name='telemetry', + name='id', + field=models.AutoField(primary_key=True, serialize=False), + ), + ] diff --git a/bite/telemetry/models.py b/bite/telemetry/models.py index 09906f4..c7cafe9 100644 --- a/bite/telemetry/models.py +++ b/bite/telemetry/models.py @@ -30,6 +30,7 @@ def telemetry_validation(value): class Telemetry(models.Model): + id = models.AutoField(primary_key=True) device = models.ForeignKey(Device, on_delete=models.CASCADE) time = models.DateTimeField(db_index=True, auto_now_add=True) transport = models.CharField(max_length=4,