[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 45a98b79ac72fabc09a62cc24436ff241b33dd54
Evergreen Git
git at git.evergreen-ils.org
Thu May 19 20:44:22 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_0 has been updated
via 45a98b79ac72fabc09a62cc24436ff241b33dd54 (commit)
from 9ee51d00965663034ca8b9673d4447d5fd8b2e7e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 45a98b79ac72fabc09a62cc24436ff241b33dd54
Author: Galen Charlton <gmc at esilibrary.com>
Date: Thu May 19 21:28:50 2011 -0400
add missing upgrade step to create staging schema
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
index 28c45ba..1302226 100644
--- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
@@ -18971,6 +18971,69 @@ CREATE TRIGGER autogenerate_placeholder_barcode
COMMIT;
+BEGIN;
+-- stick loading the staging schema into a separate transaction, as
+-- libraries upgrading from earlier stock versions of Evergreen won't have
+-- it, but at least one library is known to have it in a pre-2.0 variant
+-- setup.
+CREATE SCHEMA staging;
+
+CREATE TABLE staging.user_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ profile TEXT,
+ email TEXT,
+ passwd TEXT,
+ ident_type INT DEFAULT 3,
+ first_given_name TEXT,
+ second_given_name TEXT,
+ family_name TEXT,
+ day_phone TEXT,
+ evening_phone TEXT,
+ home_ou INT DEFAULT 2,
+ dob TEXT,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.card_stage ( -- for new library barcodes
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ barcode TEXT NOT NULL,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.mailing_address_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL, -- user's SIS barcode, for linking
+ street1 TEXT,
+ street2 TEXT,
+ city TEXT NOT NULL DEFAULT '',
+ state TEXT NOT NULL DEFAULT 'OK',
+ country TEXT NOT NULL DEFAULT 'US',
+ post_code TEXT NOT NULL,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.billing_address_stage (
+ LIKE staging.mailing_address_stage INCLUDING DEFAULTS
+);
+
+ALTER TABLE staging.billing_address_stage ADD PRIMARY KEY (row_id);
+
+CREATE TABLE staging.statcat_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ statcat TEXT NOT NULL, -- for things like 'Year of study'
+ value TEXT NOT NULL, -- and the value, such as 'Freshman'
+ complete BOOL DEFAULT FALSE
+);
+
+COMMIT;
+
-- Some operations go outside of the transaction, because they may
-- legitimately fail.
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql | 63 ++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list