elliotk
238
4
General

Arbitrary Data Points

Posted 1 year ago by elliotk

Hello,

I have a posts table containing blog posts. I'd like to add some new functionality for example post status (draft / in review / published) and visibility (everyone / logged in users / admin users). I was just going to add 2 columns to my post table, and use integer to identify the current value (eg 0 draft / 1 in review / 2 published).

However, I am wondering, should I create a new table for status and a new table for visibility so that I can have these options stored in the database with also a description of each one and perhaps some other data points?

Should I create a model for this eg PostStatus and PostVisibility or is that overkill?

Any thoughts on handling arbitrary data would be helpful.

Thanks

Please sign in or create an account to participate in this conversation.