We have been going over a lot of naming conventions for our database. I would like to start recording the ideas and why they work/don't.
This applies to having an archived
state of an item. We attempted to draw a line at when a column is an action (e.g. archive
) rather than a property (e.g. is_red
). This idea means that we convert these "action" states to timestamp fields over booleans (e.g. archived_at: timestamp
).
In order to keep data consistent, we must introduce the timestamp from a single service. This means that we must introduce an alternative endpoint to performing this action (e.g. PUT /item/:id/archive
). This is fine but can lead to complications with pedantic REST frameworks.
There are a lot of options for column naming: