ticket: own typed schema migrations

This commit is contained in:
2026-08-11 05:00:40 +09:00
parent 1d498d13c3
commit 9dccf99c50
6 changed files with 1171 additions and 158 deletions
+2 -2
View File
@@ -370,7 +370,7 @@ fn backend_for_workspace(workspace: &Path) -> Result<Box<dyn TicketBackend>, Tic
let workspace_id = workspace_id_for_workspace(workspace)?;
let db_path = server_database_path(workspace)?;
Ok(Box::new(
SqliteTicketBackend::new(db_path, workspace_id)
SqliteTicketBackend::open(db_path, workspace_id)?
.with_record_language(config.ticket_record_language()),
))
}
@@ -381,7 +381,7 @@ fn import_local(workspace: &Path) -> Result<TicketCliOutput, TicketCliError> {
.with_record_language(config.ticket_record_language());
let workspace_id = workspace_id_for_workspace(workspace)?;
let db_path = server_database_path(workspace)?;
let sqlite = SqliteTicketBackend::new(db_path.clone(), workspace_id)
let sqlite = SqliteTicketBackend::open(db_path.clone(), workspace_id)?
.with_record_language(config.ticket_record_language());
sqlite.import_from_local_backend(&local)?;
Ok(success(format!(