Skip to content

Commit

Permalink
add alembic schema changes for the recent constraint.
Browse files Browse the repository at this point in the history
  • Loading branch information
rousik committed Nov 2, 2023
1 parent c11b1a4 commit a79edeb
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""demand_hourly_pa_ferc714.report_date can't be null
Revision ID: 3313ca078f4e
Revises: 1ceb9897fd34
Create Date: 2023-11-02 15:48:50.477585
"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = '3313ca078f4e'
down_revision = '1ceb9897fd34'
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('demand_hourly_pa_ferc714', schema=None) as batch_op:
batch_op.alter_column('report_date',
existing_type=sa.DATE(),
nullable=False)

# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('demand_hourly_pa_ferc714', schema=None) as batch_op:
batch_op.alter_column('report_date',
existing_type=sa.DATE(),
nullable=True)

# ### end Alembic commands ###

0 comments on commit a79edeb

Please sign in to comment.