Add org unit phone numbers
authorBill Erickson <berickxx@gmail.com>
Wed, 22 Nov 2017 16:29:03 +0000 (11:29 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/schema/deploy/org-phones.sql [new file with mode: 0644]
KCLS/sql/schema/revert/org-phones.sql [new file with mode: 0644]
KCLS/sql/schema/sqitch.plan
KCLS/sql/schema/verify/org-phones.sql [new file with mode: 0644]

diff --git a/KCLS/sql/schema/deploy/org-phones.sql b/KCLS/sql/schema/deploy/org-phones.sql
new file mode 100644 (file)
index 0000000..7c06350
--- /dev/null
@@ -0,0 +1,56 @@
+-- Deploy kcls-evergreen:org-phones to pg
+-- requires: 2.9-to-2.10-upgrade
+
+BEGIN;
+
+UPDATE actor.org_unit SET phone = '425-450-1765' WHERE id =  1492;
+UPDATE actor.org_unit SET phone = '360-886-1105' WHERE id =  1491;
+UPDATE actor.org_unit SET phone = '206-242-8662' WHERE id =  1494;
+UPDATE actor.org_unit SET phone = '206-243-3490' WHERE id =  1495;
+UPDATE actor.org_unit SET phone = '425-333-4398' WHERE id =  1496;
+UPDATE actor.org_unit SET phone = '253-630-8761' WHERE id =  1497;
+UPDATE actor.org_unit SET phone = '206-824-6066' WHERE id =  1502;
+UPDATE actor.org_unit SET phone = '425-788-1173' WHERE id =  1503;
+UPDATE actor.org_unit SET phone = '360-825-2045' WHERE id =   119;
+UPDATE actor.org_unit SET phone = '425-222-5951' WHERE id =  1506;
+UPDATE actor.org_unit SET phone = '253-838-3668' WHERE id =  1509;
+UPDATE actor.org_unit SET phone = '425-392-5430' WHERE id =  1513;
+UPDATE actor.org_unit SET phone = '425-486-8747' WHERE id =  1519;
+UPDATE actor.org_unit SET phone = '253-859-3330' WHERE id =  1520;
+UPDATE actor.org_unit SET phone = '425-821-7686' WHERE id =  1517;
+UPDATE actor.org_unit SET phone = '425-822-2459' WHERE id =  1518;
+UPDATE actor.org_unit SET phone = '206-362-8860' WHERE id =  1521;
+UPDATE actor.org_unit SET phone = '425-747-3350' WHERE id =  1522;
+UPDATE actor.org_unit SET phone = '206-236-3537' WHERE id =  1525;
+UPDATE actor.org_unit SET phone = '425-885-1861' WHERE id =  1559;
+UPDATE actor.org_unit SET phone = '425-277-1831' WHERE id =  1557;
+UPDATE actor.org_unit SET phone = '425-226-6043' WHERE id =  1556;
+UPDATE actor.org_unit SET phone = '206-772-5541' WHERE id =  1541;
+UPDATE actor.org_unit SET phone = '206-242-1640' WHERE id =   154;
+UPDATE actor.org_unit SET phone = '206-242-6044' WHERE id =  1546;
+UPDATE actor.org_unit SET phone = '206-463-2069' WHERE id =  1545;
+UPDATE actor.org_unit SET phone = '206-243-0233' WHERE id =  1547;
+UPDATE actor.org_unit SET phone = '425-788-0733' WHERE id =  1548;
+UPDATE actor.org_unit SET phone = '253-839-0121' WHERE id =  1549;
+UPDATE actor.org_unit SET phone = '253-931-3018' WHERE id =  1490;
+UPDATE actor.org_unit SET phone = '253-833-3554' WHERE id =  1489;
+UPDATE actor.org_unit SET phone = '425-486-7811' WHERE id =  1493;
+UPDATE actor.org_unit SET phone = '425-226-0522' WHERE id =  1508;
+UPDATE actor.org_unit SET phone = '253-839-0257' WHERE id =  1505;
+UPDATE actor.org_unit SET phone = '206-762-1682' WHERE id =  1510;
+UPDATE actor.org_unit SET phone = '425-644-6203' WHERE id =  1499;
+UPDATE actor.org_unit SET phone = '425-226-0522' WHERE id =  1538;
+UPDATE actor.org_unit SET phone = '425-432-4620' WHERE id =  1527;
+UPDATE actor.org_unit SET phone = '253-931-6779' WHERE id =  1526;
+UPDATE actor.org_unit SET phone = '425-255-0111' WHERE id =  1564;
+UPDATE actor.org_unit SET phone = '425-747-2390' WHERE id =  1529;
+UPDATE actor.org_unit SET phone = '425-888-0554' WHERE id =  1528;
+UPDATE actor.org_unit SET phone = '425-885-1861' WHERE id =  1533;
+UPDATE actor.org_unit SET phone = '206-546-3522' WHERE id =  1532;
+UPDATE actor.org_unit SET phone = '425-392-3130' WHERE id =  1534;
+UPDATE actor.org_unit SET phone = '206-362-7550' WHERE id =  1535;
+UPDATE actor.org_unit SET phone = '360-677-2660' WHERE id =  1536;
+UPDATE actor.org_unit SET phone = '425-888-1223' WHERE id =  1537;
+UPDATE actor.org_unit SET phone = '425-369-3471' WHERE id =  1531;
+
+COMMIT;
diff --git a/KCLS/sql/schema/revert/org-phones.sql b/KCLS/sql/schema/revert/org-phones.sql
new file mode 100644 (file)
index 0000000..1246287
--- /dev/null
@@ -0,0 +1,9 @@
+-- Revert kcls-evergreen:org-phones from pg
+
+BEGIN;
+
+-- PR is the only org in prod w/ a phone number pre-deployment.
+
+UPDATE actor.org_unit SET phone = '' WHERE id != 1531;
+
+COMMIT;
index 1314930..70cf22b 100644 (file)
@@ -50,4 +50,5 @@ aged-circs-api [patron-co-history-stage-2] 2016-08-25T14:14:36Z Bill Erickson <b
 patron-merge-co-history [aged-circs-api] 2017-08-23T19:49:03Z Bill Erickson,,, <berick@kcls-dev-local> # Carry circ history when merging patrons
 hold-targeter-v2 [2.7-to-2.9-upgrade-part-2] 2017-03-10T16:53:06Z Bill Erickson <berickxx@gmail.com> # New hold targeter DB bits
 2.9-to-2.10-upgrade [2.7-to-2.9-upgrade-part-2] 2017-06-26T15:44:46Z Bill Erickson,,, <berick@kcls-dev-local> # KCLS 2.9 to 2.10 SQL upgrade
-2.9-to-2.10-upgrade-reingest [2.9-to-2.10-upgrade] 2017-06-26T19:01:20Z Bill Erickson,,, <berick@kcls-dev-local> # KCLS 2.9 to 2.10 SQL Data Ingests
+org-phones [2.9-to-2.10-upgrade] 2017-11-22T16:23:27Z Bill Erickson,,, <berick@kcls-dev-local> # Add a pile of org unit phone numbers
+2.9-to-2.10-upgrade-reingest [org-phones] 2017-06-26T19:01:20Z Bill Erickson,,, <berick@kcls-dev-local> # KCLS 2.9 to 2.10 SQL Data Ingests
diff --git a/KCLS/sql/schema/verify/org-phones.sql b/KCLS/sql/schema/verify/org-phones.sql
new file mode 100644 (file)
index 0000000..913e818
--- /dev/null
@@ -0,0 +1,7 @@
+-- Verify kcls-evergreen:org-phones on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;