|
Why do you think you need a dynamic schema? What you described has a pretty natural database model and would be pretty bad in an eav table.
|
# ¿ Oct 3, 2019 06:37 |
|
|
# ¿ May 15, 2024 03:56 |
|
a few DRUNK BONERS posted:Does anyone have any ideas / examples of how to design a project with different databases for different users? The idea is you would log in with username / password / group code and then be in a different database based on the group code (with no shared auth, each database has its own auth table). Database routers have no access to requests. There's some bullshit online about using thread local variables which seems dumb and fragile. Possibly this isn't something that Django can handle with a basic single server setup but maybe there's something I'm missing. Is this the thread local variable solution you’re referring to? Because it doesn’t look terribly unreasonable for the constraints you laid out. I don’t think there’s really gonna be a “clean” solution to this problem because the level of segregation you’re talking about is usually achieved by having a separate instance of the application for each database, which might be worth exploring even if you are constrained to a single server.
|
# ¿ Aug 27, 2021 14:00 |