38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
"""empty message
|
|
|
|
Revision ID: f5b70c6e73eb
|
|
Revises: 858e0d45876f
|
|
Create Date: 2024-10-31 13:04:48.500263
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'f5b70c6e73eb'
|
|
down_revision = '858e0d45876f'
|
|
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('newsletter', sa.Boolean(), nullable=False))
|
|
batch_op.add_column(sa.Column('country', sa.String(), nullable=False))
|
|
batch_op.add_column(sa.Column('age', sa.Integer(), nullable=False))
|
|
batch_op.add_column(sa.Column('dietary_restrictions', sa.String(), 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('dietary_restrictions')
|
|
batch_op.drop_column('age')
|
|
batch_op.drop_column('country')
|
|
batch_op.drop_column('newsletter')
|
|
|
|
# ### end Alembic commands ###
|