Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Comment on why we need member and principal

天舟c7e39d486195
diff --git a/frontend/src/components/ProvideDashboardContext.vue b/frontend/src/components/ProvideDashboardContext.vue
index b9c22c61a4..ec74986b15 100644
--- a/frontend/src/components/ProvideDashboardContext.vue
+++ b/frontend/src/components/ProvideDashboardContext.vue
@@ -18,8 +18,11 @@ export default {
);
await Promise.all([
- // Fetch member and principal list so MemberSelect can have the data.
+ // Fetch so MemberSelect can have the data.
store.dispatch("member/fetchMemberList"),
+ // Though fetchMemberList also return the principal info, it's possible that a principal is no longer a member.
+ // since all record types have creator, updater which are associated with principal, so we need to fetch
+ // the principal list as well.
store.dispatch("principal/fetchPrincipalList"),
store.dispatch("environment/fetchEnvironmentList"),
// The default project hosts databases not explicitly assigned to other users project.
diff --git a/store/migration/10001__init_schema.sql b/store/migration/10001__init_schema.sql
index e136a363fe..bbc17f45c1 100644
--- a/store/migration/10001__init_schema.sql
+++ b/store/migration/10001__init_schema.sql
@@ -90,6 +90,7 @@ WHERE
END;
-- Member
+-- We separate the concept from Principal because if we support multiple workspace in the future, each workspace can have different member for the same principal
CREATE TABLE member (
id INTEGER PRIMARY KEY AUTOINCREMENT,
row_status TEXT NOT NULL CHECK (