]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql
LP1207396 DB / IDL for patron self-reg
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / XXXX.schema.patron-self-reg.sql
1
2 BEGIN;
3
4 -- Track the requesting user
5 ALTER TABLE staging.user_stage
6     ADD COLUMN requesting_usr INTEGER 
7         REFERENCES actor.usr(id) ON DELETE SET NULL;
8
9 -- add county column to staged address tables and 
10 -- drop state requirement to match actor.usr_address
11 ALTER TABLE staging.mailing_address_stage 
12     ADD COLUMN county TEXT,
13     ALTER COLUMN state DROP DEFAULT,
14     ALTER COLUMN state DROP NOT NULL;
15
16 ALTER TABLE staging.billing_address_stage 
17     ADD COLUMN county TEXT,
18     ALTER COLUMN state DROP DEFAULT,
19     ALTER COLUMN state DROP NOT NULL;
20
21 INSERT INTO config.org_unit_setting_type
22     (name, grp, datatype, label, description)
23 VALUES (
24     'opac.allow_pending_user',
25     'opac',
26     'bool',
27     oils_i18n_gettext(
28         'opac.allow_pending_user',
29         'Allow Patron Self-Registration',
30         'coust',
31         'label'
32     ),
33     oils_i18n_gettext(
34         'opac.allow_pending_user',
35         'Allow patrons to self-register, creating pending user accounts',
36         'coust',
37         'description'
38     )
39 ), (
40     'opac.pending_user_expire_interval',
41     'opac',
42     'interval',
43     oils_i18n_gettext(
44         'opac.pending_user_expire_interval',
45         'Patron Self-Reg. Expire Interval',
46         'coust',
47         'label'
48     ),
49     oils_i18n_gettext(
50         'opac.pending_user_expire_interval',
51         'If set, this is the amount of time a pending user account will ' ||
52         'be allowed to sit in the database.  After this time, the pending ' ||
53         'user information will be purged',
54         'coust',
55         'description'
56     )
57 ), (
58     'ui.patron.edit.aua.county.show',
59     'gui',
60     'bool',
61     oils_i18n_gettext(
62         'ui.patron.edit.aua.county.require',
63         'Show count field on patron registration',
64         'coust',
65         'label'
66     ),
67     oils_i18n_gettext(
68         'ui.patron.edit.aua.county.require',
69         'The county field will be shown on the patron registration screen',
70         'coust',
71         'description'
72     )
73 );
74
75 COMMIT;