add new column in end user
parent
1e10517dcf
commit
206babe17f
@ -0,0 +1,35 @@
|
|||||||
|
"""add_gender_and_extra_profile_to_end_user
|
||||||
|
|
||||||
|
Revision ID: c11c071cf21e
|
||||||
|
Revises: a91b476a53de
|
||||||
|
Create Date: 2025-03-02 08:45:21.731731
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import models as models
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from alembic import op
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'c11c071cf21e'
|
||||||
|
down_revision = 'a91b476a53de'
|
||||||
|
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.add_column(sa.Column('gender', sa.Integer(), server_default=sa.text('0'), nullable=False))
|
||||||
|
batch_op.add_column(sa.Column('extra_profile', sa.JSON(), nullable=True))
|
||||||
|
|
||||||
|
# ### 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.drop_column('extra_profile')
|
||||||
|
batch_op.drop_column('gender')
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
Loading…
Reference in New Issue