39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
"""Increase password_hash column length
|
|
|
|
Revision ID: d8dcbf9fe881
|
|
Revises: 1c297825e3a9
|
|
Create Date: 2025-05-23 08:45:00.693155
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'd8dcbf9fe881'
|
|
down_revision = '1c297825e3a9'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
batch_op.alter_column('password_hash',
|
|
existing_type=sa.VARCHAR(length=128),
|
|
type_=sa.String(length=256),
|
|
existing_nullable=True)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
batch_op.alter_column('password_hash',
|
|
existing_type=sa.String(length=256),
|
|
type_=sa.VARCHAR(length=128),
|
|
existing_nullable=True)
|
|
|
|
# ### end Alembic commands ###
|