-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-0.2.0' into LCFS-1654-Protect-Routes-Compliance…
…Reports
- Loading branch information
Showing
6 changed files
with
105 additions
and
21 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
backend/lcfs/db/migrations/versions/2025-01-16-19-35_998929392c8b.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,51 @@ | ||
"""add marine end use | ||
Revision ID: 998929392c8b | ||
Revises: 5bc0ef48739a | ||
Create Date: 2025-01-07 19:35:00.064999 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "998929392c8b" | ||
down_revision = "5bc0ef48739a" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.execute( | ||
""" | ||
INSERT INTO end_use_type (end_use_type_id, type, intended_use) | ||
VALUES (25, 'Marine', TRUE) | ||
ON CONFLICT (end_use_type_id) DO NOTHING; | ||
""" | ||
) | ||
# Energy Effectiveness Ratios | ||
op.execute( | ||
""" | ||
INSERT INTO energy_effectiveness_ratio ( | ||
eer_id, fuel_category_id, fuel_type_id, end_use_type_id, ratio, effective_status | ||
) | ||
VALUES (44, 2, 3, 25, 2.5, TRUE) | ||
ON CONFLICT (eer_id) DO NOTHING; | ||
""" | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.execute( | ||
""" | ||
DELETE FROM energy_effectiveness_ratio | ||
WHERE eer_id = 44; | ||
""" | ||
) | ||
op.execute( | ||
""" | ||
DELETE FROM end_use_type | ||
WHERE end_use_type_id = 25; | ||
""" | ||
) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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