mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: save workspace member info to disk (#5536)
* chore: save workspace member info to disk * chore: fix clippy
This commit is contained in:
@ -0,0 +1 @@
|
||||
-- This file should undo anything in `up.sql`
|
@ -0,0 +1,11 @@
|
||||
-- Your SQL goes here
|
||||
CREATE TABLE workspace_members_table (
|
||||
email TEXT KEY NOT NULL,
|
||||
role INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
avatar_url TEXT,
|
||||
uid BIGINT NOT NULL,
|
||||
workspace_id TEXT NOT NULL,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (email, workspace_id)
|
||||
);
|
@ -67,6 +67,18 @@ diesel::table! {
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
workspace_members_table (email, workspace_id) {
|
||||
email -> Text,
|
||||
role -> Integer,
|
||||
name -> Text,
|
||||
avatar_url -> Nullable<Text>,
|
||||
uid -> BigInt,
|
||||
workspace_id -> Text,
|
||||
updated_at -> Timestamp,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::allow_tables_to_appear_in_same_query!(
|
||||
chat_message_table,
|
||||
chat_table,
|
||||
@ -74,4 +86,5 @@ diesel::allow_tables_to_appear_in_same_query!(
|
||||
user_data_migration_records,
|
||||
user_table,
|
||||
user_workspace_table,
|
||||
workspace_members_table,
|
||||
);
|
||||
|
Reference in New Issue
Block a user