-
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add alembic schema changes for the recent constraint.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
migrations/versions/3313ca078f4e_demand_hourly_pa_ferc714_report_date_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ### |