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

Bug: Holding model should have ActiveRecord and DB null constraints #1781

Open
zachgoll opened this issue Feb 3, 2025 · 0 comments
Open
Labels
2️⃣ Medium Priority Community contributions accepted, Maybe team only works on if there are no high priority items open

Comments

@zachgoll
Copy link
Collaborator

zachgoll commented Feb 3, 2025

As seen in #1767, we're getting some invalid data in the DB because the Holding model does not validate amount.

We should ideally be adding both DB-level constraints and ActiveRecord validations on: date, qty, price, amount, and currency.

Since we have some invalid data states in the DB right now, this will require a migration to clear out invalid data prior to adding the null constraints at the DB level.

@zachgoll zachgoll added the 2️⃣ Medium Priority Community contributions accepted, Maybe team only works on if there are no high priority items open label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2️⃣ Medium Priority Community contributions accepted, Maybe team only works on if there are no high priority items open
Projects
None yet
Development

No branches or pull requests

1 participant