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,