LP1207396 DB / IDL
authorBill Erickson <berick@esilibrary.com>
Thu, 1 Aug 2013 20:51:40 +0000 (16:51 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 2 Aug 2013 14:53:35 +0000 (10:53 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/015.schema.staging.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql

index aa6f98b..663e5c8 100644 (file)
@@ -8963,6 +8963,7 @@ SELECT  usr,
             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
             <field reporter:label="City" name="city" reporter:datatype="text"/>
+                       <field reporter:label="County" name="county"  reporter:datatype="text"/>
             <field reporter:label="State" name="state" reporter:datatype="text"/>
             <field reporter:label="Country" name="country" reporter:datatype="text"/>
             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
@@ -8978,6 +8979,7 @@ SELECT  usr,
             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
             <field reporter:label="City" name="city" reporter:datatype="text"/>
+                       <field reporter:label="County" name="county"  reporter:datatype="text"/>
             <field reporter:label="State" name="state" reporter:datatype="text"/>
             <field reporter:label="Country" name="country" reporter:datatype="text"/>
             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
index 6febdba..83bc697 100644 (file)
@@ -33,12 +33,13 @@ CREATE TABLE staging.card_stage ( -- for new library barcodes
 
 CREATE TABLE staging.mailing_address_stage (
         row_id          BIGSERIAL PRIMARY KEY,
-        row_date            TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+        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',
+        county          TEXT,
+        state           TEXT,
         country         TEXT NOT NULL DEFAULT 'US',
         post_code       TEXT NOT NULL,
         complete        BOOL DEFAULT FALSE
index 89fb7c3..dafd5ff 100644 (file)
@@ -12816,3 +12816,59 @@ INSERT INTO config.org_unit_setting_type
         'integer'
     );
 
+-- OUS's for patron self-reg
+INSERT INTO config.org_unit_setting_type
+    (name, grp, datatype, label, description)
+VALUES (
+    'opac.allow_pending_user',
+    'opac',
+    'bool',
+    oils_i18n_gettext(
+        'opac.allow_pending_user',
+        'Allow Patron Self-Registration',
+        'coust',
+        'label'
+    ),
+    oils_i18n_gettext(
+        'opac.allow_pending_user',
+        'Allow patrons to self-register, creating pending user accounts',
+        'coust',
+        'description'
+    )
+), (
+    'opac.pending_user_expire_interval',
+    'opac',
+    'interval',
+    oils_i18n_gettext(
+        'opac.pending_user_expire_interval',
+        'Patron Self-Reg. Expire Interval',
+        'coust',
+        'label'
+    ),
+    oils_i18n_gettext(
+        'opac.pending_user_expire_interval',
+        'If set, this is the amount of time a pending user account will ' ||
+        'be allowed to sit in the database.  After this time, the pending ' ||
+        'user information will be purged',
+        'coust',
+        'description'
+    )
+), (
+    'ui.patron.edit.aua.county.show',
+    'gui',
+    'bool',
+    oils_i18n_gettext(
+        'ui.patron.edit.aua.county.require',
+        'Show count field on patron registration',
+        'coust',
+        'label'
+    ),
+    oils_i18n_gettext(
+        'ui.patron.edit.aua.county.require',
+        'The county field will be shown on the patron registration screen',
+        'coust',
+        'description'
+    )
+);
+
+
index 4ab44de..9f6a574 100644 (file)
@@ -6,6 +6,18 @@ ALTER TABLE staging.user_stage
     ADD COLUMN requesting_usr INTEGER 
         REFERENCES actor.usr(id) ON DELETE SET NULL;
 
+-- add county column to staged address tables and 
+-- drop state requirement to match actor.usr_address
+ALTER TABLE staging.mailing_address_stage 
+    ADD COLUMN county TEXT,
+    ALTER COLUMN state DROP DEFAULT,
+    ALTER COLUMN state DROP NOT NULL;
+
+ALTER TABLE staging.billing_address_stage 
+    ADD COLUMN county TEXT,
+    ALTER COLUMN state DROP DEFAULT,
+    ALTER COLUMN state DROP NOT NULL;
+
 INSERT INTO config.org_unit_setting_type
     (name, grp, datatype, label, description)
 VALUES (