fix: update the length of the session_id and external_user_id fields in the end_users table to 1024
parent
5a6f20d575
commit
0e0ea12b04
@ -0,0 +1,47 @@
|
||||
"""Update end_users session_id length to 1024
|
||||
|
||||
Revision ID: fd0948688f2d
|
||||
Revises: 6a9f914f656c
|
||||
Create Date: 2025-05-06 10:20:56.017787
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import models as models
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'fd0948688f2d'
|
||||
down_revision = '6a9f914f656c'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('end_users', schema=None) as batch_op:
|
||||
batch_op.alter_column('external_user_id',
|
||||
existing_type=sa.VARCHAR(length=255),
|
||||
type_=sa.String(length=1024),
|
||||
existing_nullable=True)
|
||||
batch_op.alter_column('session_id',
|
||||
existing_type=sa.VARCHAR(length=255),
|
||||
type_=sa.String(length=1024),
|
||||
existing_nullable=False)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('end_users', schema=None) as batch_op:
|
||||
batch_op.alter_column('session_id',
|
||||
existing_type=sa.String(length=1024),
|
||||
type_=sa.VARCHAR(length=255),
|
||||
existing_nullable=False)
|
||||
batch_op.alter_column('external_user_id',
|
||||
existing_type=sa.String(length=1024),
|
||||
type_=sa.VARCHAR(length=255),
|
||||
existing_nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Reference in New Issue