This commit is contained in:
2022-12-30 16:23:27 +00:00
parent 02776e8478
commit 20da343c54
1304 changed files with 870224 additions and 0 deletions

View 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);')