noleafclover614
1 year ago
97
2
Tips

Database / Model design for One to many, but only 1 active.

Posted 1 year ago by noleafclover614

Hi all,

I wanted to get some feedback on how to approach the design of a database / models for the given scenario:

Let's say we have an organization that can have one or more contracts. These contracts are not considered ready to be viewed unless they are published/finalized. At the same time, the organization only wants to have one contract "active" at a time so that users who are viewing them are providing their consent to a specific, active, published version. The organization would also like the ability to activate both older and newer versions of their contracts on demand.

What say you?

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