-
Notifications
You must be signed in to change notification settings - Fork 75
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
24593 Tombstone pipeline - implement conversion (exclude liquidation, invol dissolution, cont out) #3199
Open
chenhongjing
wants to merge
7
commits into
bcgov:main
Choose a base branch
from
chenhongjing:24593
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
24593 Tombstone pipeline - implement conversion (exclude liquidation, invol dissolution, cont out) #3199
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4aab8ec
24593 - Tombstone - implement conversion (exclude liquidation, invol …
chenhongjing 2377a9d
update legal-api for tombstone conversion
chenhongjing 5f67c0f
fix linting
chenhongjing 84633e2
fix linting
chenhongjing dcba468
fix unit test
chenhongjing 58d31ca
update processing status for corps skipped due to data collection error
chenhongjing 9762dd9
update conversion filing_json and meta_data for changeOfName
chenhongjing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
50 changes: 50 additions & 0 deletions
50
legal-api/migrations/versions/d0b10576924c_alter_amalgamation_type_enum.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,50 @@ | ||
"""alter_amalgamation_type_enum | ||
|
||
Revision ID: d0b10576924c | ||
Revises: d9254d3cbbf4 | ||
Create Date: 2025-02-03 21:47:05.061172 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'd0b10576924c' | ||
down_revision = 'd9254d3cbbf4' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
amalgamation_type_old_enum = postgresql.ENUM('regular', | ||
'vertical', | ||
'horizontal', | ||
name='amalgamation_type_old') | ||
|
||
|
||
def upgrade(): | ||
with op.get_context().autocommit_block(): | ||
op.execute("ALTER TYPE amalgamation_type ADD VALUE 'unknown'") | ||
|
||
|
||
def downgrade(): | ||
op.execute("UPDATE amalgamations SET amalgamation_type = 'regular' WHERE amalgamation_type = 'unknown'") | ||
op.execute("UPDATE amalgamations_version SET amalgamation_type = 'regular' WHERE amalgamation_type = 'unknown'") | ||
|
||
amalgamation_type_old_enum.create(op.get_bind(), checkfirst=True) | ||
|
||
op.execute(""" | ||
ALTER TABLE amalgamations | ||
ALTER COLUMN amalgamation_type | ||
TYPE amalgamation_type_old | ||
USING amalgamation_type::text::amalgamation_type_old | ||
""") | ||
op.execute(""" | ||
ALTER TABLE amalgamations_version | ||
ALTER COLUMN amalgamation_type | ||
TYPE amalgamation_type_old | ||
USING amalgamation_type::text::amalgamation_type_old | ||
""") | ||
|
||
op.execute("DROP TYPE amalgamation_type") | ||
op.execute("ALTER TYPE amalgamation_type_old RENAME TO amalgamation_type") |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's problematic to map
CONVICORP
to the behaviour of IA and update business info becauseconv_event.effective_dt
is null for all. Similar issues forCONVID1
andCONVID2
, some don't have trigger_dt for involuntary dissolution stage transition.