main functions fix
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
"""Add account_number to participations and winners
|
||||
|
||||
Revision ID: 0e35616a69df
|
||||
Revises: 002_add_account_numbers_and_display_type
|
||||
Create Date: 2025-11-15 19:11:53.075216
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0e35616a69df'
|
||||
down_revision = '002_add_account_numbers_and_display_type'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('participations', sa.Column('account_number', sa.String(length=23), nullable=True))
|
||||
op.alter_column('participations', 'user_id',
|
||||
existing_type=sa.INTEGER(),
|
||||
nullable=True)
|
||||
op.create_index(op.f('ix_participations_account_number'), 'participations', ['account_number'], unique=False)
|
||||
op.add_column('winners', sa.Column('account_number', sa.String(length=23), nullable=True))
|
||||
op.alter_column('winners', 'user_id',
|
||||
existing_type=sa.INTEGER(),
|
||||
nullable=True)
|
||||
op.create_index(op.f('ix_winners_account_number'), 'winners', ['account_number'], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_winners_account_number'), table_name='winners')
|
||||
op.alter_column('winners', 'user_id',
|
||||
existing_type=sa.INTEGER(),
|
||||
nullable=False)
|
||||
op.drop_column('winners', 'account_number')
|
||||
op.drop_index(op.f('ix_participations_account_number'), table_name='participations')
|
||||
op.alter_column('participations', 'user_id',
|
||||
existing_type=sa.INTEGER(),
|
||||
nullable=False)
|
||||
op.drop_column('participations', 'account_number')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user