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

Handle update in case class attributes #70

Open
fedex995 opened this issue Aug 21, 2017 · 1 comment
Open

Handle update in case class attributes #70

fedex995 opened this issue Aug 21, 2017 · 1 comment

Comments

@fedex995
Copy link

Hi, team!
I'm having trouble updating my case classes once I already have data stores in the database. Is there a way to accomplish this?
For example, I have the following case class
case class Event(var date: String, delivered: Boolean, file: Option[String], name: String, imported: Boolean, interrupts: Boolean, isIdentified: Boolean)
And I already have a big amount of Events stored in the db. Now I want to add an attribute to the case class. If I do so, I obviously get an upickle.Invalid$Data: Key Missing error as the new attribute isn't present in the old data.
Any help?

@GuyIncognito1986
Copy link

Learn to code and update your dbs properly. Version your db object case classes, have a clear path to upgrade, and write a mapper. This isn't magic land. You are a special kind of special mate.

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

No branches or pull requests

2 participants