summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorClément Lassieur <clement@lassieur.org>2018-09-02 09:45:48 +0200
committerClément Lassieur <clement@lassieur.org>2018-09-29 22:29:06 +0200
commit4e661552c3a0bebd9b584dcf72b9e949fb5582ef (patch)
tree83fa7b387ee0a5db7f902c6324c92d8dbc3287f2 /Makefile.am
parent8d40c49170971ad7bbf8b97336934dbb3d949fc1 (diff)
downloadcuirass-4e661552c3a0bebd9b584dcf72b9e949fb5582ef.tar
cuirass-4e661552c3a0bebd9b584dcf72b9e949fb5582ef.tar.gz
database: Add builds only if one of their outputs is new.
* Makefile.am (dist_sql_DATA): Add 'src/sql/upgrade-4.sql'. * src/cuirass/database.scm (db-add-output): New procedure. (db-add-build): Call DB-ADD-OUTPUT, rollback the transaction and return #f if DB-ADD-OUTPUT returned an empty list. * src/schema.sql (Outputs): Set 'path' as primary key, instead of 'derivation, name'. * src/sql/upgrade-4.sql: New file with SQL queries to upgrade the database. * tests/database.scm (make-dummy-build): Use the #:OUTPUTS key. Get default OUTPUTS to depend on DRV. ("db-add-build-with-fixed-output"): New test.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 2f83659..7cea2ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,7 +67,8 @@ dist_pkgdata_DATA = src/schema.sql
dist_sql_DATA = \
src/sql/upgrade-1.sql \
src/sql/upgrade-2.sql \
- src/sql/upgrade-3.sql
+ src/sql/upgrade-3.sql \
+ src/sql/upgrade-4.sql
dist_css_DATA = \
src/static/css/bootstrap.css \