[Best practice] Should I add a version to my json schemas for future changes? #89
-
I read that it is prefered to add a version number to the jsonb data to represent which schema we are using. Is this a good practice with this extention? I'm looking for best practice for future migrations and all but I couldn't find much informations other than an old blog post about Json in RDBMS Not an issue per se but quite important so users don't regret later down the road I guess :P
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think using the typename as version a bad practice in general. I'd just use it as normally, and when I'll need to change, change the type to a union and handle the migration case or even just rename the type so your migration work can be done inside a prisma migration file. |
Beta Was this translation helpful? Give feedback.
I think using the typename as version a bad practice in general. I'd just use it as normally, and when I'll need to change, change the type to a union and handle the migration case or even just rename the type so your migration work can be done inside a prisma migration file.