Skip to content

Commit

Permalink
Merge pull request #3443 from HHS/OPS-3276/can-history-pt-3
Browse files Browse the repository at this point in the history
CAN History Part 3
  • Loading branch information
rajohnson90 authored Feb 11, 2025
2 parents 578d9a7 + 5654cfa commit 595ca0c
Show file tree
Hide file tree
Showing 13 changed files with 610 additions and 183 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def upgrade() -> None:
sa.Column('ops_event_id', sa.Integer(), autoincrement=False, nullable=True),
sa.Column('history_title', sa.String(), autoincrement=False, nullable=True),
sa.Column('history_message', sa.Text(), autoincrement=False, nullable=True),
sa.Column('timestamp', sa.String(), autoincrement=False, nullable=True),
sa.Column('timestamp', sa.DateTime(), autoincrement=False, nullable=True),
sa.Column('history_type', postgresql.ENUM('CAN_DATA_IMPORT', 'CAN_NICKNAME_EDITED', 'CAN_DESCRIPTION_EDITED', 'CAN_FUNDING_CREATED', 'CAN_RECEIVED_CREATED', 'CAN_FUNDING_EDITED', 'CAN_RECEIVED_EDITED', 'CAN_FUNDING_DELETED', 'CAN_RECEIVED_DELETED', 'CAN_PORTFOLIO_CREATED', 'CAN_PORTFOLIO_DELETED', 'CAN_PORTFOLIO_EDITED', 'CAN_DIVISION_CREATED', 'CAN_DIVISION_DELETED', 'CAN_DIVISION_EDITED', 'CAN_CARRY_FORWARD_CALCULATED', name='canhistorytype', create_type=False), autoincrement=False, nullable=True),
sa.Column('created_by', sa.Integer(), autoincrement=False, nullable=True),
sa.Column('updated_by', sa.Integer(), autoincrement=False, nullable=True),
Expand All @@ -47,7 +47,7 @@ def upgrade() -> None:
sa.Column('ops_event_id', sa.Integer(), nullable=False),
sa.Column('history_title', sa.String(), nullable=False),
sa.Column('history_message', sa.Text(), nullable=False),
sa.Column('timestamp', sa.String(), nullable=False),
sa.Column('timestamp', sa.DateTime(), nullable=False),
sa.Column('history_type', postgresql.ENUM('CAN_DATA_IMPORT', 'CAN_NICKNAME_EDITED', 'CAN_DESCRIPTION_EDITED', 'CAN_FUNDING_CREATED', 'CAN_RECEIVED_CREATED', 'CAN_FUNDING_EDITED', 'CAN_RECEIVED_EDITED', 'CAN_FUNDING_DELETED', 'CAN_RECEIVED_DELETED', 'CAN_PORTFOLIO_CREATED', 'CAN_PORTFOLIO_DELETED', 'CAN_PORTFOLIO_EDITED', 'CAN_DIVISION_CREATED', 'CAN_DIVISION_DELETED', 'CAN_DIVISION_EDITED', 'CAN_CARRY_FORWARD_CALCULATED', name='canhistorytype', create_type=False), nullable=True),
sa.Column('created_by', sa.Integer(), nullable=True),
sa.Column('updated_by', sa.Integer(), nullable=True),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""adding fiscal year to CANHistory
Revision ID: 3d8237681112
Revises: c9a2b729be0e
Create Date: 2025-02-06 21:33:56.555892+00:00
"""
from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = '3d8237681112'
down_revision: Union[str, None] = 'c9a2b729be0e'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('can_history', sa.Column('fiscal_year', sa.Integer(), nullable=False))
op.add_column('can_history_version', sa.Column('fiscal_year', sa.Integer(), autoincrement=False, nullable=True))
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('can_history_version', 'fiscal_year')
op.drop_column('can_history', 'fiscal_year')
# ### end Alembic commands ###
Loading

0 comments on commit 595ca0c

Please sign in to comment.