[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: Handle channel instances in create-small-backup
From: |
Christopher Baines |
Subject: |
02/02: Handle channel instances in create-small-backup |
Date: |
Wed, 25 Mar 2020 14:27:27 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit 8af7130239877bc8c24dd0c44ccd52d15d1eb1d0
Author: Christopher Baines <address@hidden>
AuthorDate: Wed Mar 25 18:27:01 2020 +0000
Handle channel instances in create-small-backup
Otherwise this table is empty.
---
scripts/guix-data-service-create-small-backup | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/scripts/guix-data-service-create-small-backup
b/scripts/guix-data-service-create-small-backup
index 996b494..57ee5ef 100755
--- a/scripts/guix-data-service-create-small-backup
+++ b/scripts/guix-data-service-create-small-backup
@@ -73,6 +73,17 @@ WHERE guix_revision_id IN (
)
);
+CREATE UNLOGGED TABLE tmp_channel_instances AS
+SELECT *
+FROM channel_instances
+WHERE guix_revision_id IN (
+ SELECT id
+ FROM guix_revisions
+ WHERE commit IN (
+ SELECT commit FROM git_branches
+ )
+);
+
CREATE UNLOGGED TABLE tmp_package_derivations AS
SELECT * FROM package_derivations WHERE id IN (
SELECT package_derivation_id FROM tmp_guix_revision_package_derivations
@@ -85,6 +96,8 @@ WITH RECURSIVE derivation_ids(id) AS (
UNION
SELECT tmp_guix_revision_system_test_derivations.derivation_id
FROM tmp_guix_revision_system_test_derivations
+ UNION
+ SELECT tmp_channel_instances.derivation_id FROM tmp_channel_instances
)
UNION
SELECT derivation_outputs.derivation_id
@@ -228,6 +241,9 @@ INSERT INTO guix_revision_package_derivations
INSERT INTO guix_revision_system_test_derivations
SELECT * FROM tmp_guix_revision_system_test_derivations;
+INSERT INTO channel_instances
+ SELECT * FROM tmp_channel_instances;
+
INSERT INTO builds OVERRIDING SYSTEM VALUE
SELECT * FROM tmp_builds;