aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-05 14:09:47 +0100
committerChristopher Baines <mail@cbaines.net>2019-12-12 20:07:22 +0000
commit8a5beb7f8813ec6ecca3d1e8da256bbbbcc67a36 (patch)
tree5de7c3936c7e37252c9c7b8c20441f69aa366e1f /sqitch
parent5168b38c2a50e39e74c04b616ff6f962363130c0 (diff)
downloaddata-service-8a5beb7f8813ec6ecca3d1e8da256bbbbcc67a36.tar
data-service-8a5beb7f8813ec6ecca3d1e8da256bbbbcc67a36.tar.gz
Change nar_urls size to bigint
As some nars can be bigger than the size of an int.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/change_nar_urls_size_to_bigint.sql7
-rw-r--r--sqitch/revert/change_nar_urls_size_to_bigint.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/change_nar_urls_size_to_bigint.sql7
4 files changed, 22 insertions, 0 deletions
diff --git a/sqitch/deploy/change_nar_urls_size_to_bigint.sql b/sqitch/deploy/change_nar_urls_size_to_bigint.sql
new file mode 100644
index 0000000..4b6fdf3
--- /dev/null
+++ b/sqitch/deploy/change_nar_urls_size_to_bigint.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-data-service:change_nar_urls_size_to_bigint to pg
+
+BEGIN;
+
+ALTER TABLE nar_urls ALTER COLUMN file_size TYPE bigint USING file_size::bigint;
+
+COMMIT;
diff --git a/sqitch/revert/change_nar_urls_size_to_bigint.sql b/sqitch/revert/change_nar_urls_size_to_bigint.sql
new file mode 100644
index 0000000..30eb432
--- /dev/null
+++ b/sqitch/revert/change_nar_urls_size_to_bigint.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:change_nar_urls_size_to_bigint from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 603f5a7..ee65c61 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -33,3 +33,4 @@ nar_related_tables 2019-11-29T20:28:19Z Christopher Baines <mail@cbaines.net> #
add_index_on_builds_derivation_file_name 2019-12-03T16:23:55Z <chris@phact> # Add index on builds_derivation_file_name
narinfo_fetch_record 2019-12-03T20:53:28Z <chris@phact> # Add a table to describe fetching a narinfo
change_nars_size_to_bigint 2019-12-04T21:24:21Z <chris@phact> # Change nars.size to bigint
+change_nar_urls_size_to_bigint 2019-12-04T21:49:07Z <chris@phact> # Change nar_urls.size to bigint
diff --git a/sqitch/verify/change_nar_urls_size_to_bigint.sql b/sqitch/verify/change_nar_urls_size_to_bigint.sql
new file mode 100644
index 0000000..851c7b5
--- /dev/null
+++ b/sqitch/verify/change_nar_urls_size_to_bigint.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:change_nar_urls_size_to_bigint on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;