pub async fn delete_build(pool: &Pool<MySql>, id: i64) -> Result<()>
Expand description
Deletes a specific build record from the database.
This function permanently removes a build record identified by its ID. It’s typically used for cleanup operations or when a build was created erroneously.
§Arguments
pool
- Database connection pool for executing the queryid
- Unique identifier of the build to delete
§Returns
Ok(())
- Successfully deleted the buildErr(anyhow::Error)
- Failed to delete the build
§Warning
This operation is irreversible. Once a build is deleted, all associated information including build logs and status history is permanently lost.
§Note
This function does not verify if the build exists before attempting deletion. If the build does not exist, the operation will still succeed (as far as SQL is concerned), but no rows will be affected.