4 ms·
Your table naming convention needs work... User model -> User table Role model -> UserRole table UserRole model -> UserUserRole table If you consi
by datashaman 10y ago
Your table naming convention needs work...
User model -> User table
Role model -> UserRole table
UserRole model -> UserUserRole table
If you consider that User is the module, then your User table should be called UserUser if you want to be consistent.
But that's silly.
Calling your module Auth would be better. Then the table names don't contain RepeatedRepeated parts.
Or even better, don't use the module name in the table name. It's pretty clear what User, Role and UserRole mean just on their own.
And since you're considering using SQLite as the DB, your system will (hopefully) be small enough not to worry about naming collisions, so why bother with module scoping the tables at all?