81 lines
2.8 KiB
Python
81 lines
2.8 KiB
Python
"""Altered column names
|
|
|
|
Revision ID: 7d6d973351b7
|
|
Revises: 677501c83fe5
|
|
Create Date: 2026-02-27 12:40:04.831887
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '7d6d973351b7'
|
|
down_revision: Union[str, Sequence[str], None] = '677501c83fe5'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Upgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column('powerball_draws', 'draw_date',
|
|
existing_type=sa.DATETIME(),
|
|
type_=sa.Date(),
|
|
existing_nullable=False)
|
|
op.alter_column('powerball_draws', 'main_ball1',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=False)
|
|
op.alter_column('powerball_draws', 'main_ball2',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=False)
|
|
op.alter_column('powerball_draws', 'main_ball3',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=False)
|
|
op.alter_column('powerball_draws', 'main_ball4',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=False)
|
|
op.alter_column('powerball_draws', 'main_ball5',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=False)
|
|
op.alter_column('powerball_draws', 'powerball',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=False)
|
|
op.alter_column('powerball_draws', 'power_play',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=False)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Downgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column('powerball_draws', 'power_play',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=True)
|
|
op.alter_column('powerball_draws', 'powerball',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=True)
|
|
op.alter_column('powerball_draws', 'main_ball5',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=True)
|
|
op.alter_column('powerball_draws', 'main_ball4',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=True)
|
|
op.alter_column('powerball_draws', 'main_ball3',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=True)
|
|
op.alter_column('powerball_draws', 'main_ball2',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=True)
|
|
op.alter_column('powerball_draws', 'main_ball1',
|
|
existing_type=sa.INTEGER(),
|
|
nullable=True)
|
|
op.alter_column('powerball_draws', 'draw_date',
|
|
existing_type=sa.Date(),
|
|
type_=sa.DATETIME(),
|
|
existing_nullable=False)
|
|
# ### end Alembic commands ###
|