diff --git a/olgram/migrations/models/3_20210917115559_update.sql b/olgram/migrations/models/3_20210917115559_update.sql new file mode 100644 index 0000000..f5d22e0 --- /dev/null +++ b/olgram/migrations/models/3_20210917115559_update.sql @@ -0,0 +1,4 @@ +-- upgrade -- +ALTER TABLE "group_chat" ALTER COLUMN "name" TYPE VARCHAR(255) USING "name"::VARCHAR(255); +-- downgrade -- +ALTER TABLE "group_chat" ALTER COLUMN "name" TYPE VARCHAR(50) USING "name"::VARCHAR(50); diff --git a/olgram/models/models.py b/olgram/models/models.py index b597ac9..92aa08e 100644 --- a/olgram/models/models.py +++ b/olgram/models/models.py @@ -42,7 +42,7 @@ class User(Model): class GroupChat(Model): id = fields.IntField(pk=True) chat_id = fields.BigIntField(index=True, unique=True) - name = fields.CharField(max_length=50) + name = fields.CharField(max_length=255) class Meta: table = 'group_chat'