Create a table for systems
And use it for the systems in the derivations and package derivations tables. The primary motivation here is to allow quickly working out what systems the database contains, and having a small table with just the right data seems a good way to do that.
This commit is contained in:
parent
1cc5accb9e
commit
b430c632b7
10 changed files with 112 additions and 29 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#:use-module (json)
|
||||
#:use-module (guix-data-service database)
|
||||
#:use-module (guix-data-service model utils)
|
||||
#:use-module (guix-data-service model system)
|
||||
#:export (select-build-stats
|
||||
select-builds-with-context
|
||||
select-builds-with-context-by-derivation-file-name
|
||||
|
|
@ -51,7 +52,8 @@
|
|||
`(("guix_revisions.commit = $" . ,revision-commit))
|
||||
'())
|
||||
,@(if system
|
||||
`(("package_derivations.system = $" . ,system))
|
||||
`(("package_derivations.system_id = $" .
|
||||
,(system->system-id conn system)))
|
||||
'())
|
||||
,@(if target
|
||||
`(("package_derivations.target = $" . ,target))
|
||||
|
|
@ -143,7 +145,8 @@ ORDER BY status"))
|
|||
`(("guix_revisions.commit = $" . ,revision-commit))
|
||||
'())
|
||||
,@(if system
|
||||
`(("package_derivations.system = $" . ,system))
|
||||
`(("package_derivations.system_id = $" .
|
||||
,(system->system-id conn system)))
|
||||
'())
|
||||
,@(if target
|
||||
`(("package_derivations.target = $" . ,target))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue