aboutsummaryrefslogtreecommitdiff
path: root/sqitch/verify
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-04-14 10:06:13 +0100
committerChristopher Baines <mail@cbaines.net>2019-04-14 10:06:13 +0100
commitd69f77d59eefc1ca577d6df0cfe6d8cd46742b82 (patch)
tree86dd2c86d984dcbb49741e4852407af66587d2a8 /sqitch/verify
parent70faad04371ff441793da4e6213ae0855723b019 (diff)
downloaddata-service-d69f77d59eefc1ca577d6df0cfe6d8cd46742b82.tar
data-service-d69f77d59eefc1ca577d6df0cfe6d8cd46742b82.tar.gz
Add some initial Sqitch migrations
These are based on the state of the current manually managed database.
Diffstat (limited to 'sqitch/verify')
-rw-r--r--sqitch/verify/appschema.sql7
-rw-r--r--sqitch/verify/buildstatus_enum.sql7
-rw-r--r--sqitch/verify/initial_import.sql50
3 files changed, 64 insertions, 0 deletions
diff --git a/sqitch/verify/appschema.sql b/sqitch/verify/appschema.sql
new file mode 100644
index 0000000..bc056f0
--- /dev/null
+++ b/sqitch/verify/appschema.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:appschema on pg
+
+BEGIN;
+
+SELECT pg_catalog.has_schema_privilege('guix_data_service', 'usage');
+
+ROLLBACK;
diff --git a/sqitch/verify/buildstatus_enum.sql b/sqitch/verify/buildstatus_enum.sql
new file mode 100644
index 0000000..988cff5
--- /dev/null
+++ b/sqitch/verify/buildstatus_enum.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:buildstatus_enum on pg
+
+BEGIN;
+
+SELECT pg_catalog.has_type_privilege('guix_data_service.buildstatus', 'usage');
+
+ROLLBACK;
diff --git a/sqitch/verify/initial_import.sql b/sqitch/verify/initial_import.sql
new file mode 100644
index 0000000..c1cd488
--- /dev/null
+++ b/sqitch/verify/initial_import.sql
@@ -0,0 +1,50 @@
+-- Verify guix-data-service:initial_import on pg
+
+BEGIN;
+
+SELECT id, url, lookup_all_derivations
+ FROM guix_data_service.build_servers WHERE FALSE;
+
+SELECT id, status_fetched_at, internal_build_id, starttime, stoptime status
+ FROM guix_data_service.build_status WHERE FALSE;
+
+SELECT internal_id, id, build_server_id, derivation_id
+ FROM guix_data_service.builds WHERE FALSE;
+
+SELECT derivation_id, derivation_output_id
+ FROM guix_data_service.derivation_inputs WHERE FALSE;
+
+SELECT id, path, hash_algorithm, hash, recursive
+ FROM guix_data_service.derivation_output_details WHERE FALSE;
+
+SELECT derivation_id, name, derivation_output_details_id, id
+ FROM guix_data_service.derivation_outputs WHERE FALSE;
+
+SELECT id, store_path
+ FROM guix_data_service.derivation_source_files WHERE FALSE;
+
+SELECT derivation_id, derivation_source_file_id
+ FROM guix_data_service.derivation_sources WHERE FALSE;
+
+SELECT id, file_name, builder, args, env_vars, system
+ FROM guix_data_service.derivations WHERE FALSE;
+
+SELECT revision_id, package_derivation_id
+ FROM guix_data_service.guix_revision_package_derivations WHERE FALSE;
+
+SELECT id, url, commit, store_path
+ FROM guix_data_service.guix_revisions WHERE FALSE;
+
+SELECT id, url, commit, source
+ FROM guix_data_service.load_new_guix_revision_jobs WHERE FALSE;
+
+SELECT id, package_id, derivation_id, system, target
+ FROM guix_data_service.package_derivations WHERE FALSE;
+
+SELECT id, sha1_hash, synopsis, description, home_page
+ FROM guix_data_service.package_metadata WHERE FALSE;
+
+SELECT id, name, version, package_metadata_id
+ FROM guix_data_service.packages WHERE FALSE;
+
+ROLLBACK;