From 63925b2893c9e969707a0f886952d6e05e79773d Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 7 May 2023 02:08:20 +0200 Subject: [PATCH] Change id field on IncomingMessage to BigInteger --- .../migrations/0002_alter_incomingmessage_id.py | 17 +++++++++++++++++ shiftregister/team/models.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 shiftregister/team/migrations/0002_alter_incomingmessage_id.py diff --git a/shiftregister/team/migrations/0002_alter_incomingmessage_id.py b/shiftregister/team/migrations/0002_alter_incomingmessage_id.py new file mode 100644 index 0000000..72d6abc --- /dev/null +++ b/shiftregister/team/migrations/0002_alter_incomingmessage_id.py @@ -0,0 +1,17 @@ +# Generated by Django 4.0.4 on 2023-05-07 00:07 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("team", "0001_initial"), + ] + + operations = [ + migrations.AlterField( + model_name="incomingmessage", + name="id", + field=models.BigIntegerField(primary_key=True, serialize=False), + ), + ] diff --git a/shiftregister/team/models.py b/shiftregister/team/models.py index eff69d9..76fcbc5 100644 --- a/shiftregister/team/models.py +++ b/shiftregister/team/models.py @@ -9,7 +9,7 @@ class IncomingMessage(models.Model): class Meta: get_latest_by = "created_at" - id = models.IntegerField(primary_key=True) + id = models.BigIntegerField(primary_key=True) sender = PhoneNumberField() content = models.TextField() created_at = models.DateTimeField()