fc-common: add database migration for extended build status codes
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I0c13eda985d634e63189ba6907e488ae6a6a6964
This commit is contained in:
parent
2b763833d4
commit
f4772036ce
1 changed files with 26 additions and 0 deletions
26
crates/common/migrations/013_extended_build_status.sql
Normal file
26
crates/common/migrations/013_extended_build_status.sql
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
-- Extended build status codes to match Hydra
|
||||
|
||||
-- Update the builds table CHECK constraint to include all new statuses
|
||||
ALTER TABLE builds DROP CONSTRAINT builds_status_check;
|
||||
|
||||
ALTER TABLE builds ADD CONSTRAINT builds_status_check CHECK (
|
||||
status IN (
|
||||
'pending',
|
||||
'running',
|
||||
'succeeded',
|
||||
'failed',
|
||||
'dependency_failed',
|
||||
'aborted',
|
||||
'cancelled',
|
||||
'failed_with_output',
|
||||
'timeout',
|
||||
'cached_failure',
|
||||
'unsupported_system',
|
||||
'log_limit_exceeded',
|
||||
'nar_size_limit_exceeded',
|
||||
'non_deterministic'
|
||||
)
|
||||
);
|
||||
|
||||
-- Add index on status for faster filtering
|
||||
CREATE INDEX IF NOT EXISTS idx_builds_status ON builds(status);
|
||||
Loading…
Add table
Add a link
Reference in a new issue