Skip to content

Commit

Permalink
updated interactive model message id to biginteger (#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
jparguello authored Oct 1, 2024
2 parents 9d7d02a + 8938094 commit 237535c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions interactive/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@


class RapidProMessageSerializer(serializers.Serializer):
channel = serializers.UUIDField()
from_ = serializers.CharField(required=False)
channel = serializers.UUIDField(required=False)
from_ = serializers.CharField()
id = serializers.CharField()
quick_replies = serializers.JSONField()
text = serializers.CharField()
Expand Down
23 changes: 23 additions & 0 deletions interactive/migrations/0006_auto_20240925_0946.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.24 on 2024-09-25 09:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('interactive', '0005_auto_20240506_1128'),
]

operations = [
migrations.AlterField(
model_name='message',
name='channel',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='message',
name='rapidpro_message_id',
field=models.BigIntegerField(primary_key=True, serialize=False),
),
]
4 changes: 2 additions & 2 deletions interactive/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def __str__(self):


class Message(models.Model):
rapidpro_message_id = models.AutoField(primary_key=True)
rapidpro_message_id = models.BigIntegerField(primary_key=True)
text = models.TextField()
quick_replies = models.JSONField(null=True, blank=True)
to = models.CharField(max_length=255)
from_field = models.CharField(max_length=255)
channel = models.CharField(max_length=255)
channel = models.CharField(max_length=255, null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

Expand Down

0 comments on commit 237535c

Please sign in to comment.