Skip to content
Snippets Groups Projects
Unverified Commit 265b1345 authored by Mathieu Othacehe's avatar Mathieu Othacehe
Browse files

Save the default database.

* src/cuirass/database.scm (db-open): Save the default database in the
%package-database parameter.
parent df39aa48
No related branches found
No related tags found
No related merge requests found
......@@ -355,11 +355,12 @@ upgrade-n.sql files."
(database (%package-database)))
"Open database to store or read jobs and builds informations. Return a
database object."
(let* ((param (or database
(format #f "dbname=~a host=~a"
(%cuirass-database)
(%cuirass-host))))
(db (connect-to-postgres-paramstring param)))
(unless database
(%package-database
(format #f "dbname=~a host=~a"
(%cuirass-database) (%cuirass-host))))
(let ((db (connect-to-postgres-paramstring (%package-database))))
(when (%create-database?)
(match (db-schema-version db)
(#f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment