33 lines
811 B
Python
33 lines
811 B
Python
"""Add last_name to User model
|
|
|
|
Revision ID: c243d6a1843d
|
|
Revises: 7554ab70efe7
|
|
Create Date: 2025-05-23 16:00:09.905001
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'c243d6a1843d'
|
|
down_revision = '7554ab70efe7'
|
|
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.add_column(sa.Column('last_name', sa.String(length=150), 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.drop_column('last_name')
|
|
|
|
# ### end Alembic commands ###
|