increase message_id length to 1024
This commit is contained in:
parent
9d3711a98a
commit
02a005d076
|
@ -1636,7 +1636,7 @@ class EmailLog(Base, ModelMixin):
|
||||||
)
|
)
|
||||||
|
|
||||||
# the Message ID
|
# the Message ID
|
||||||
message_id = deferred(sa.Column(sa.String(512), nullable=True))
|
message_id = deferred(sa.Column(sa.String(1024), nullable=True))
|
||||||
# in the reply phase, the original message_id is replaced by the SL message_id
|
# in the reply phase, the original message_id is replaced by the SL message_id
|
||||||
sl_message_id = deferred(sa.Column(sa.String(512), nullable=True))
|
sl_message_id = deferred(sa.Column(sa.String(512), nullable=True))
|
||||||
|
|
||||||
|
@ -2596,4 +2596,4 @@ class MessageIDMatching(Base, ModelMixin):
|
||||||
|
|
||||||
# SimpleLogin Message ID
|
# SimpleLogin Message ID
|
||||||
sl_message_id = sa.Column(sa.String(512), unique=True, nullable=False)
|
sl_message_id = sa.Column(sa.String(512), unique=True, nullable=False)
|
||||||
original_message_id = sa.Column(sa.String(512), unique=True, nullable=False)
|
original_message_id = sa.Column(sa.String(1024), unique=True, nullable=False)
|
||||||
|
|
29
migrations/versions/2021_102715_0b9150eb309d_.py
Normal file
29
migrations/versions/2021_102715_0b9150eb309d_.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
"""Increase message_id length manually
|
||||||
|
|
||||||
|
Revision ID: 0b9150eb309d
|
||||||
|
Revises: bbedc353f90c
|
||||||
|
Create Date: 2021-10-27 15:58:22.275769
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy_utils
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '0b9150eb309d'
|
||||||
|
down_revision = 'bbedc353f90c'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# As alembic cannot detect changes in column length, do it manually
|
||||||
|
op.execute('ALTER TABLE email_log ALTER COLUMN message_id TYPE varchar(1024);')
|
||||||
|
op.execute('ALTER TABLE message_id_matching ALTER COLUMN original_message_id TYPE varchar(1024);')
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# As alembic cannot detect changes in column length, do it manually
|
||||||
|
op.execute('ALTER TABLE email_log ALTER COLUMN message_id TYPE varchar(512);')
|
||||||
|
op.execute('ALTER TABLE message_id_matching ALTER COLUMN original_message_id TYPE varchar(512);')
|
Loading…
Reference in a new issue