How can I solve the issue of content existing in multiple versions and multiple languages?
My current structure:
Each content can only have one active version in each language, and that's how I'm curious on how to best solve.
Right now I have a column of the contentversions table, which means for each change of active version I have to run a update and set active=false on all version and then a update to set active=true for the piece of content in question.
You could use a table activeversion with the same structure as content_contentversion_languages, but with a unique key on (content_id, language_id) and a single foreign key on all columns, referencing content_contentversion_languages. Marking a new version as active requires just a single INSERT or UPDATE to this table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With