Skip to content

Commit

Permalink
Merge pull request #1713 from bcgov/feat/kevin-1602
Browse files Browse the repository at this point in the history
feat: fuel code etl improvements
  • Loading branch information
kevin-hashimoto authored Jan 16, 2025
2 parents d750c8d + 41abf97 commit ce7d444
Show file tree
Hide file tree
Showing 6 changed files with 552 additions and 73 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""add truck and marine transport mode
Revision ID: 5bc0ef48739a
Revises: f78e53370ed2
Create Date: 2025-01-15 22:48:43.582069
"""

import sqlalchemy as sa
from alembic import op
from datetime import datetime

# revision identifiers, used by Alembic.
revision = "5bc0ef48739a"
down_revision = "8119d12538df"
branch_labels = None
depends_on = None


def upgrade() -> None:
current_time = datetime.now()

# Insert Truck and Marine transport modes
op.execute(
"""
INSERT INTO transport_mode (transport_mode, create_date, update_date, create_user, update_user)
VALUES
('Truck', '{}', '{}', 'no_user', 'no_user'),
('Marine', '{}', '{}', 'no_user', 'no_user')
""".format(
current_time, current_time, current_time, current_time
)
)


def downgrade() -> None:
# Remove Truck and Marine transport modes
op.execute(
"""
DELETE FROM transport_mode
WHERE transport_mode IN ('Truck', 'Marine')
"""
)
Binary file modified etl/database/nifi-registry-primary.mv.db
Binary file not shown.
Binary file modified etl/nifi/conf/flow.json.gz
Binary file not shown.
Binary file modified etl/nifi/conf/flow.xml.gz
Binary file not shown.
Loading

0 comments on commit ce7d444

Please sign in to comment.