-
Notifications
You must be signed in to change notification settings - Fork 321
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
[omm] Exchanges CRUD functions and tests #1374
Conversation
|
||
|
||
@dataclass | ||
class Hash(db.Model): # type: ignore[name-defined] # Should this be Signal? |
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.
This is duplicate with ContentSignal
@@ -0,0 +1,39 @@ | |||
"""empty message |
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.
Doing migrations at this stage seems like an undue burden. Easy enough to do flask reset_all_tables
class ContentSignal(db.Model): # type: ignore[name-defined] | ||
id: Mapped[int] = mapped_column(primary_key=True) | ||
content_id: Mapped[int] = mapped_column(ForeignKey("bank_content.id")) | ||
signal_type: Mapped[str] | ||
signal_val: Mapped[str] = mapped_column(Text) | ||
id: Mapped[int] = db.Column(dbtypes.Integer, primary_key=True, autoincrement=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.
Why not mapped syntax? This seems like the preferred one
@@ -64,8 +69,36 @@ def as_storage_iface_cls(self) -> BankContentConfig: | |||
) | |||
|
|||
|
|||
@dataclass |
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.
This interacts strangely with db.Model and the columns - I found a few edge cases during working that I couldn't find a workaround to. I'm not sure its worth keeping :/
Hey @dougneal , I'm going to close this PR for inactivity, feel free to re-open if you still want to try and get it merged! |
Summary
Test Plan