-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added filing_task and filing_task_state tables #50
Conversation
- New DAOs and DTOs to support filing_task and filing_task_state tables - New FilingTaskState enum - New alembic scripts to create tables and update Filing table to remove "state" field and replace with filingtaskstate relationship - New pytests to test migration and FilingTask and FilingTaskState objects - Updated references to FilingDAO to remove "state" concept and add list of FilingTaskStates
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
|
||
|
||
def downgrade() -> None: | ||
op.drop_table("filing_task_state") |
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.
does the downgrade remove the custom type just by dropping the table, or do we need to do the drop type thing as well?
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.
Thank you, updated the downgrade to have a drop of the filingtaskstate TYPE. Note that sqlite doesn't have that concept so it checks for the dialect.
class FilingDAO(Base): | ||
__tablename__ = "filing" | ||
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) | ||
lei: Mapped[str] | ||
state: Mapped[FilingState] = mapped_column(SAEnum(FilingState)) | ||
tasks: Mapped[List[FilingTaskStateDAO]] = relationship(lazy="selectin", cascade="all, delete-orphan") | ||
filing_period: Mapped[int] = mapped_column(ForeignKey("filing_period.id")) | ||
institution_snapshot_id: Mapped[str] | ||
contact_info: Mapped[str] = mapped_column(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.
good for this PR, but let's create a ticket to get contact_info as a separate table
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.
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.
LGTM
Closes #45