I’m starting to implement some simple site-wide settings and I’m curious how others have done this. I have an admin section for managing users, products, etc which is for me and the founder (not any users). I want to have the ability in this admin section to, for example, turn on maintenance mode.
I’m considering a couple different DB architectures for this. Each of them uses a table called Site Settings.
Each setting is stored in a different row in the Site Settings table.
Create an option set called “Settings” that contains a list of settings, like Maintenance Mode.
In the Site Settings DB table, have fields for Setting, which takes an Option set Settings, and other fields for yes/no, text, number, and potentially others that could be relevant to a setting.
The Site Settings table has one row, and has a field for each setting with the appropriate data type. No need for Option sets.
Any opinions on these? They both seem viable to me and I don’t think there are any deal-breaking cons for either, but is there a better way?
Thanks for you thoughts!