-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
23539 add batch_processing to colin_event_ids table #3021
23539 add batch_processing to colin_event_ids table #3021
Conversation
legal-api/migrations/versions/83a110e10979_add_batch_processing_id_to_colin_event_.py
Outdated
Show resolved
Hide resolved
|
||
def upgrade(): | ||
op.add_column('colin_event_ids', sa.Column('batch_processing_id', sa.Integer(), nullable=True)) | ||
op.add_column('colin_event_ids', sa.Column('batch_processing_step', sa.Enum('WARNING_LEVEL_1', 'WARNING_LEVEL_2', 'DISSOLUTION', name='batch_processing_step'), nullable=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I found interesting and didn't know about how alembic and sqlalchemy handles re-using enums:
To me it looked like you were re-creating the enum, so I was wondering what would happen if I changed the enum values here, and if it would have any effect on the existing batch_processing_step
enum.
Turns out this has no effect on the values batch_processing.batch_processing_step
or colin_event_id.batch_processing_step
. So alembic must be pointing the colin_event_id.batch_processing_step
enum to the existing one.
Taking it a step further, you can remove all the enum values here and it still works as long as the name
parameter points to the correct enum.
Can you update this line to remove the enum values? Just to avoid any confusion as to what this line is doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Catch.
I removed it and tested it. It works well
Quality Gate passedIssues Measures |
* 23348 - Add allowable actions for notice of withdrawal (#3014) * Add notice of withdrawal for existing business * 23349 - validation notice of withdrawal (#3020) * implement validation logic for NoW * update schema version number in requirements * exclude the new business scenario * 23539 add batch_processing to colin_event_ids table (#3021) * 23539 add batch_processing to colin_event_ids table * add relationship, tests * fix downgrade issue * remove re-define batch_processing_step enum * 23608 - Update furnishing entries transferred to bc mail+ (#3025) * Fix bug * 23697 - fix stage1 to stage2 dissolution transition bug (#3028) * add SFTP off feature flag, modify stage 2 furnishing entry check, update tests * adjust mail status check when FF is on * add feature flag "disable-dissolution-sftp-bclaws" * refactor stage 1 furnishing entries check * update tests * 23522-23562 continuation in workflow change (#3026) * 23572 update dissolution letters (#3023) * 23572 update dissolution letters * add the dots * 23845 - Bumped version numbers up for release 23.2a (#3030) * bump version * update entity-bn version * udpate version * 23563 - update review endpoint (#3029) * 23563 - update review endpoint * 23563 - update api spec * 23563 - update api spec filing description * Undo colin_event_id model changes (#3032) --------- Co-authored-by: Aimee <Aimee.Gao@gov.bc.ca> Co-authored-by: EasonPan <Eason.Pan@gov.bc.ca> Co-authored-by: Kevin Zhang <54437031+kzdev420@users.noreply.github.com> Co-authored-by: Vysakh Menon <vysakh.menon@gov.bc.ca> Co-authored-by: ketaki-deodhar <116035339+ketaki-deodhar@users.noreply.github.com> Co-authored-by: leodube-aot <122323255+leodube-aot@users.noreply.github.com>
Issue #: /bcgov/entity#23539
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).