guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: Trip the derivation output details table in the small data dump


From: Christopher Baines
Subject: 02/03: Trip the derivation output details table in the small data dump
Date: Fri, 13 Mar 2020 14:42:38 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit 6ce96ad55b1092014cfe1616f219aa2c7ce74ebb
Author: Christopher Baines <address@hidden>
AuthorDate: Fri Mar 13 18:38:29 2020 +0000

    Trip the derivation output details table in the small data dump
---
 scripts/guix-data-service-create-small-backup | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/guix-data-service-create-small-backup 
b/scripts/guix-data-service-create-small-backup
index a5f8cc6..0d9f5b4 100755
--- a/scripts/guix-data-service-create-small-backup
+++ b/scripts/guix-data-service-create-small-backup
@@ -90,6 +90,11 @@ SELECT *
 FROM derivation_outputs
 WHERE derivation_id IN (SELECT id FROM tmp_derivations);
 
+CREATE UNLOGGED TABLE tmp_derivation_output_details AS
+SELECT *
+FROM derivation_output_details
+WHERE id IN (SELECT derivation_output_details_id FROM tmp_derivation_outputs);
+
 CREATE UNLOGGED TABLE tmp_derivation_sources AS
 SELECT *
 FROM derivation_sources
@@ -97,6 +102,7 @@ WHERE derivation_id IN (SELECT id FROM tmp_derivations);
 
 TRUNCATE package_derivations CASCADE;
 TRUNCATE derivations CASCADE;
+TRUNCATE derivation_output_details, derivation_outputs, derivation_inputs;
 
 EOF
 
@@ -215,6 +221,9 @@ INSERT INTO builds OVERRIDING SYSTEM VALUE
 INSERT INTO build_status OVERRIDING SYSTEM VALUE
   SELECT * FROM tmp_build_status;
 
+INSERT INTO derivation_output_details OVERRIDING SYSTEM VALUE
+  SELECT * FROM tmp_derivation_output_details;
+
 INSERT INTO derivation_outputs OVERRIDING SYSTEM VALUE
   SELECT * FROM tmp_derivation_outputs;
 
@@ -238,6 +247,7 @@ DROP TABLE tmp_package_derivations;
 DROP TABLE tmp_guix_revision_package_derivations;
 DROP TABLE tmp_builds;
 DROP TABLE tmp_build_status;
+DROP TABLE tmp_derivation_output_details;
 DROP TABLE tmp_derivation_outputs;
 DROP TABLE tmp_derivation_inputs;
 DROP TABLE tmp_derivation_sources;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]