Any thoughts on how to store users? I've got two u...
# off-topic
t
Any thoughts on how to store users? I've got two user roles and I'm paralyzed about how to store their data. Should I put all users in one table or should I have a table for each role?
s
Like the stack exchange mentioned if the columns differ that much between both role types then different table could work, but personally I use 1 table and have a column to define the role
Also note that because Postgres supports json data (jsonb column type), you could store extra information in there which aren't related to both user types
t
Thank you! I guess I'm reading that this is mostly personal preference — I hate personal preference 🙂 Far prefer rules!
s
Haha, almost everything in software is personal preference, rules are just a collectives personal preference 😆