chore: rename (#4551)

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
This commit is contained in:
Nathan.fooo
2024-01-31 00:43:55 +08:00
committed by GitHub
parent f6242f1cc7
commit 0483e305e7
11 changed files with 36 additions and 30 deletions

View File

@ -139,7 +139,7 @@ pub struct UserWorkspace {
pub created_at: DateTime<Utc>,
/// The database storage id is used indexing all the database views in current workspace.
#[serde(rename = "database_storage_id")]
pub database_view_tracker_id: String,
pub workspace_database_object_id: String,
}
impl UserWorkspace {
@ -148,7 +148,7 @@ impl UserWorkspace {
id: workspace_id.to_string(),
name: "".to_string(),
created_at: Utc::now(),
database_view_tracker_id: Uuid::new_v4().to_string(),
workspace_database_object_id: Uuid::new_v4().to_string(),
}
}
}

View File

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