feat: add icon field (#4824)

* feat: add icon field

* fix: add sqlx migration files

* chore: fix tst

* chore: fix duplicate event name

* chore: update to lastest stable rust toolchain

* chore: use 1.75 channel

* chore: fix duplicate event name

* chore: fix duplicate event name

* chore: use more reliable assertion

---------

Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
Zack
2024-03-13 15:07:52 +08:00
committed by GitHub
parent af16299c83
commit bf70be1841
19 changed files with 42 additions and 25 deletions

View File

@ -140,6 +140,8 @@ pub struct UserWorkspace {
/// The database storage id is used indexing all the database views in current workspace.
#[serde(rename = "database_storage_id")]
pub workspace_database_object_id: String,
#[serde(default)]
pub icon: String,
}
impl UserWorkspace {
@ -149,6 +151,7 @@ impl UserWorkspace {
name: "".to_string(),
created_at: Utc::now(),
workspace_database_object_id: Uuid::new_v4().to_string(),
icon: "".to_string(),
}
}
}

View File

@ -63,6 +63,7 @@ impl<'de> Visitor<'de> for SessionVisitor {
created_at: Utc::now(),
// For historical reasons, the database_storage_id is constructed by the user_id.
workspace_database_object_id: STANDARD.encode(format!("{}:user:database", user_id)),
icon: "".to_owned(),
})
}
}