Skip to content
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

Conversation

kzdev420
Copy link
Collaborator

@kzdev420 kzdev420 commented Oct 7, 2024

Issue #: /bcgov/entity#23539

Description of changes:

Screenshot 2024-10-07 at 9 20 21 AM

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).

@argush3
Copy link
Collaborator

argush3 commented Oct 8, 2024

don't believe you've addressed all todos defined in the ticket description.

image

@kzdev420 kzdev420 requested a review from argush3 October 8, 2024 20:18

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))
Copy link
Collaborator

@leodube-aot leodube-aot Oct 9, 2024

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.

Screenshot 2024-10-09 at 10 15 58 AM

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.

Screenshot 2024-10-09 at 10 19 21 AM

Can you update this line to remove the enum values? Just to avoid any confusion as to what this line is doing.

Copy link
Collaborator Author

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

Copy link

sonarcloud bot commented Oct 9, 2024

@kzdev420 kzdev420 merged commit 2ab5ac9 into bcgov:main Oct 9, 2024
7 checks passed
chenhongjing added a commit that referenced this pull request Oct 22, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants