We are running single database for rest app server. We have three types of users
- for customer
- for administrator, and
- for partners
Currently they have different tables and username and password are also in separate respectively Now We need to refactor this schema as user are expanding.
So should a single table User
with Role
table is OK ? (Here Role
can be admin, partner or customer, manager).
OR
Should we a keep as it is as We will be having issue if we use User and Role table:
- if an admin acquire a username then that username can not be the same again for customer or partner due to unique constraint.
- I think user role can not be as "Customer" as customer is not a Role. Role can be admin, manager etc
I think this is not the right way to keep in single table. What are your suggestions?