User management misunderstanding #182
-
Hello everyone, I am pretty new to fief, I started today actually, and I am trying to make the self-hosted version (docker compose) works. I managed to get to the admin interface, but now I have a question about the user management. When adding a user, where is this user stored? Because when I look into the postgreSql db, I only see in the workspace_users table, a single row which is the admin user, whereas I created 4 new users. Is there a problem with my db? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hail, @hugobaret 👋 Welcome to Fief's kingdom! Our team will get back to you very soon to help. In the meantime, take a minute to star our repository ⭐️ Farewell! |
Beta Was this translation helpful? Give feedback.
-
Hi @hugobaret 👋 That's completely expected 🙂 With PostgreSQL, we leverage a feature of the DBMS called "schemas": https://www.postgresql.org/docs/current/ddl-schemas.html In a nutshell, we are able to create "sub-database". The main one is here to manage the different workspaces. For each workspace, we create a single schema, named after the ID of the workspace. You can query a schema by prefixing the table name with the schema name: SELECT * FROM "d293a0cc-b26a-47a0-ac75-41c93756de62".fief_users; |
Beta Was this translation helpful? Give feedback.
-
Hello @frankie567 and thank you for your response, it solved my problem. |
Beta Was this translation helpful? Give feedback.
Hi @hugobaret 👋
That's completely expected 🙂
With PostgreSQL, we leverage a feature of the DBMS called "schemas": https://www.postgresql.org/docs/current/ddl-schemas.html In a nutshell, we are able to create "sub-database".
The main one is here to manage the different workspaces. For each workspace, we create a single schema, named after the ID of the workspace.
You can query a schema by prefixing the table name with the schema name: