-
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 pull request #1751 from bcgov/feat/prashanth-history-save-name-…
…1693 Feat: LCFS - Update the history record to save name #1693
- Loading branch information
Showing
25 changed files
with
255 additions
and
98 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
backend/lcfs/db/migrations/versions/2025-01-20-16-23_c306137b57ab.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,66 @@ | ||
"""Add display names to history tables. | ||
Revision ID: c306137b57ab | ||
Revises: 98d79870df6b | ||
Create Date: 2025-01-20 16:23:50.597769 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "c306137b57ab" | ||
down_revision = "98d79870df6b" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"admin_adjustment_history", | ||
sa.Column( | ||
"display_name", | ||
sa.String(length=255), | ||
nullable=True, | ||
comment="Display name for the admin_adjustment history record", | ||
), | ||
) | ||
op.add_column( | ||
"compliance_report_history", | ||
sa.Column( | ||
"display_name", | ||
sa.String(length=255), | ||
nullable=True, | ||
comment="Display name for the compliance report history", | ||
), | ||
) | ||
op.add_column( | ||
"initiative_agreement_history", | ||
sa.Column( | ||
"display_name", | ||
sa.String(length=255), | ||
nullable=True, | ||
comment="Display name for the initiative agreement history record", | ||
), | ||
) | ||
op.add_column( | ||
"transfer_history", | ||
sa.Column( | ||
"display_name", | ||
sa.String(length=255), | ||
nullable=True, | ||
comment="Display name for the transfer history record", | ||
), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("transfer_history", "display_name") | ||
op.drop_column("initiative_agreement_history", "display_name") | ||
op.drop_column("compliance_report_history", "display_name") | ||
op.drop_column("admin_adjustment_history", "display_name") | ||
# ### 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
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
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
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
Oops, something went wrong.