-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3856 from catalyst-cooperative/transform-714-year…
…ly-forecast Transform XBRL core_ferc714__yearly_planning_area_demand_forecast table
- Loading branch information
Showing
4 changed files
with
232 additions
and
63 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
migrations/versions/bbd84fd6320f_add_forecast_to_forecast_columns.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,42 @@ | ||
"""Add forecast to forecast columns | ||
Revision ID: bbd84fd6320f | ||
Revises: a93bdb8d4fbd | ||
Create Date: 2024-09-19 14:59:49.108628 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'bbd84fd6320f' | ||
down_revision = 'a93bdb8d4fbd' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('core_ferc714__yearly_planning_area_demand_forecast', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('summer_peak_demand_forecast_mw', sa.Float(), nullable=True, comment='The maximum forecasted hourly sumemr load (for the months of June through September).')) | ||
batch_op.add_column(sa.Column('winter_peak_demand_forecast_mw', sa.Float(), nullable=True, comment='The maximum forecasted hourly winter load (for the months of January through March).')) | ||
batch_op.add_column(sa.Column('net_demand_forecast_mwh', sa.Float(), nullable=True, comment='Net forecasted electricity demand for the specific period in megawatt-hours (MWh).')) | ||
batch_op.drop_column('summer_peak_demand_mw') | ||
batch_op.drop_column('winter_peak_demand_mw') | ||
batch_op.drop_column('net_demand_mwh') | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('core_ferc714__yearly_planning_area_demand_forecast', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('net_demand_mwh', sa.FLOAT(), nullable=True)) | ||
batch_op.add_column(sa.Column('winter_peak_demand_mw', sa.FLOAT(), nullable=True)) | ||
batch_op.add_column(sa.Column('summer_peak_demand_mw', sa.FLOAT(), nullable=True)) | ||
batch_op.drop_column('net_demand_forecast_mwh') | ||
batch_op.drop_column('winter_peak_demand_forecast_mw') | ||
batch_op.drop_column('summer_peak_demand_forecast_mw') | ||
|
||
# ### end Alembic commands ### |
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
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
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