From c84b21be7cda09bbcd5ac94b10525cead5ee080a Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 28 Dec 2019 22:47:58 +0000 Subject: Add a new table to nars for derivation source files This will allow serving the nars for derivation source files. --- sqitch/deploy/add_derivation_source_file_nars.sql | 14 ++++++++++++++ sqitch/revert/add_derivation_source_file_nars.sql | 7 +++++++ sqitch/sqitch.plan | 1 + sqitch/verify/add_derivation_source_file_nars.sql | 7 +++++++ 4 files changed, 29 insertions(+) create mode 100644 sqitch/deploy/add_derivation_source_file_nars.sql create mode 100644 sqitch/revert/add_derivation_source_file_nars.sql create mode 100644 sqitch/verify/add_derivation_source_file_nars.sql (limited to 'sqitch') diff --git a/sqitch/deploy/add_derivation_source_file_nars.sql b/sqitch/deploy/add_derivation_source_file_nars.sql new file mode 100644 index 0000000..2690dda --- /dev/null +++ b/sqitch/deploy/add_derivation_source_file_nars.sql @@ -0,0 +1,14 @@ +-- Deploy guix-data-service:add_derivation_source_file_nars to pg + +BEGIN; + +CREATE TABLE derivation_source_file_nars ( + derivation_source_file_id integer PRIMARY KEY REFERENCES derivation_source_files (id), + compression varchar NOT NULL, + hash_algorithm varchar NOT NULL, + hash varchar NOT NULL, + uncompressed_size integer NOT NULL, + data bytea NOT NULL +); + +COMMIT; diff --git a/sqitch/revert/add_derivation_source_file_nars.sql b/sqitch/revert/add_derivation_source_file_nars.sql new file mode 100644 index 0000000..66338d7 --- /dev/null +++ b/sqitch/revert/add_derivation_source_file_nars.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:add_derivation_source_file_nars from pg + +BEGIN; + +DROP TABLE derivation_source_file_nars; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 5b5659c..7949320 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -39,3 +39,4 @@ add_some_database_indexes 2019-12-05T15:53:04Z Christopher Baines # Describe the sets of derivation outputs builds_add_derivation_output_details_set_id 2019-12-07T18:25:38Z Christopher Baines # Add a derivation_output_details_set_id column to builds derivations_hash_index 2019-12-24T22:54:19Z Christopher Baines # Add index on derivations for the hash component of the filename +add_derivation_source_file_nars 2019-12-28T20:37:06Z Christopher Baines # Add table for derivation source file nars diff --git a/sqitch/verify/add_derivation_source_file_nars.sql b/sqitch/verify/add_derivation_source_file_nars.sql new file mode 100644 index 0000000..3c5d5cc --- /dev/null +++ b/sqitch/verify/add_derivation_source_file_nars.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:add_derivation_source_file_nars on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; -- cgit v1.2.3