Add backup_id column to executions methods

This commit is contained in:
Luis Eduardo Jeréz Girón
2024-07-21 17:29:42 -06:00
parent 63c330f85d
commit 99e26e46b9
2 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
-- name: ExecutionsServiceCreateExecution :one
INSERT INTO executions (status, message, path)
VALUES (@status, @message, @path)
INSERT INTO executions (backup_id, status, message, path)
VALUES (@backup_id, @status, @message, @path)
RETURNING *;

View File

@@ -33,7 +33,8 @@ func (s *Service) RunExecution(ctx context.Context, backupID uuid.UUID) error {
}
ex, err := s.CreateExecution(ctx, dbgen.ExecutionsServiceCreateExecutionParams{
Status: "running",
BackupID: backupID,
Status: "running",
})
if err != nil {
return err