Changeset 9543
- Timestamp:
- 05/09/08 12:34:30 (3 months ago)
- Location:
- branches/rel_1_2/Open-ILS/src/sql/Pg
- Files:
-
- 8 modified
-
005.schema.actors.sql (modified) (13 diffs)
-
006.schema.permissions.sql (modified) (5 diffs)
-
011.schema.authority.sql (modified) (1 diff)
-
080.schema.money.sql (modified) (2 diffs)
-
090.schema.action.sql (modified) (12 diffs)
-
1.2.1-1.2.2-upgrade-db.sql (modified) (1 diff)
-
300.schema.staged_search.sql (modified) (1 diff)
-
reporter-schema.sql (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/rel_1_2/Open-ILS/src/sql/Pg/005.schema.actors.sql
r9242 r9543 33 33 email TEXT, 34 34 passwd TEXT NOT NULL, 35 standing INT NOT NULL DEFAULT 1 REFERENCES config.standing (id) ,36 ident_type INT NOT NULL REFERENCES config.identification_type (id) ,35 standing INT NOT NULL DEFAULT 1 REFERENCES config.standing (id) DEFERRABLE INITIALLY DEFERRED, 36 ident_type INT NOT NULL REFERENCES config.identification_type (id) DEFERRABLE INITIALLY DEFERRED, 37 37 ident_value TEXT, 38 ident_type2 INT REFERENCES config.identification_type (id) ,38 ident_type2 INT REFERENCES config.identification_type (id) DEFERRABLE INITIALLY DEFERRED, 39 39 ident_value2 TEXT, 40 net_access_level INT NOT NULL DEFAULT 1 REFERENCES config.net_access_level (id) ,40 net_access_level INT NOT NULL DEFAULT 1 REFERENCES config.net_access_level (id) DEFERRABLE INITIALLY DEFERRED, 41 41 photo_url TEXT, 42 42 prefix TEXT, … … 139 139 CREATE TABLE actor.usr_note ( 140 140 id BIGSERIAL PRIMARY KEY, 141 usr BIGINT NOT NULL REFERENCES actor.usr ON DELETE CASCADE ,142 creator BIGINT NOT NULL REFERENCES actor.usr ON DELETE CASCADE ,141 usr BIGINT NOT NULL REFERENCES actor.usr ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 142 creator BIGINT NOT NULL REFERENCES actor.usr ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 143 143 create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(), 144 144 pub BOOL NOT NULL DEFAULT FALSE, … … 150 150 CREATE TABLE actor.usr_standing_penalty ( 151 151 id SERIAL PRIMARY KEY, 152 usr INT NOT NULL REFERENCES actor.usr ON DELETE CASCADE ,152 usr INT NOT NULL REFERENCES actor.usr ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 153 153 penalty_type TEXT NOT NULL 154 154 ); … … 178 178 CREATE TABLE actor.usr_setting ( 179 179 id BIGSERIAL PRIMARY KEY, 180 usr INT NOT NULL REFERENCES actor.usr ON DELETE CASCADE ,180 usr INT NOT NULL REFERENCES actor.usr ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 181 181 name TEXT NOT NULL, 182 182 value TEXT NOT NULL, … … 311 311 CREATE TABLE actor.card ( 312 312 id SERIAL PRIMARY KEY, 313 usr INT NOT NULL REFERENCES actor.usr (id) ,313 usr INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 314 314 barcode TEXT NOT NULL UNIQUE, 315 315 active BOOL NOT NULL DEFAULT TRUE … … 352 352 opac_label TEXT NOT NULL, 353 353 depth INT NOT NULL, 354 parent INT REFERENCES actor.org_unit_type (id) ,354 parent INT REFERENCES actor.org_unit_type (id) DEFERRABLE INITIALLY DEFERRED, 355 355 can_have_vols BOOL NOT NULL DEFAULT TRUE, 356 356 can_have_users BOOL NOT NULL DEFAULT TRUE … … 367 367 CREATE TABLE actor.org_unit ( 368 368 id SERIAL PRIMARY KEY, 369 parent_ou INT REFERENCES actor.org_unit (id) ,370 ou_type INT NOT NULL REFERENCES actor.org_unit_type (id) ,369 parent_ou INT REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 370 ou_type INT NOT NULL REFERENCES actor.org_unit_type (id) DEFERRABLE INITIALLY DEFERRED, 371 371 ill_address INT, 372 372 holds_address INT, … … 405 405 406 406 CREATE TABLE actor.hours_of_operation ( 407 id INT PRIMARY KEY REFERENCES actor.org_unit (id) ON DELETE CASCADE ,407 id INT PRIMARY KEY REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 408 408 dow_0_open TIME NOT NULL DEFAULT '09:00', 409 409 dow_0_close TIME NOT NULL DEFAULT '17:00', … … 424 424 CREATE TABLE actor.org_unit_closed ( 425 425 id SERIAL PRIMARY KEY, 426 org_unit INT NOT NULL REFERENCES actor.org_unit (id) ,426 org_unit INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 427 427 close_start TIMESTAMP WITH TIME ZONE NOT NULL, 428 428 close_end TIMESTAMP WITH TIME ZONE NOT NULL, … … 434 434 id SERIAL PRIMARY KEY, 435 435 name TEXT NOT NULL UNIQUE, 436 owning_lib INT NOT NULL REFERENCES actor.org_unit (id) 436 owning_lib INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED 437 437 ); 438 438 439 439 CREATE TABLE actor.usr_org_unit_opt_in ( 440 440 id SERIAL PRIMARY KEY, 441 org_unit INT NOT NULL REFERENCES actor.org_unit (id) ,442 usr INT NOT NULL REFERENCES actor.usr (id) ,443 staff INT NOT NULL REFERENCES actor.usr (id) ,441 org_unit INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 442 usr INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 443 staff INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 444 444 opt_in_ts TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), 445 opt_in_ws INT NOT NULL REFERENCES actor.workstation (id) ,445 opt_in_ws INT NOT NULL REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED, 446 446 CONSTRAINT usr_opt_in_once_per_org_unit UNIQUE (usr,org_unit) 447 447 ); … … 449 449 CREATE TABLE actor.org_unit_setting ( 450 450 id BIGSERIAL PRIMARY KEY, 451 org_unit INT NOT NULL REFERENCES actor.org_unit ON DELETE CASCADE ,451 org_unit INT NOT NULL REFERENCES actor.org_unit ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 452 452 name TEXT NOT NULL, 453 453 value TEXT NOT NULL, … … 486 486 within_city_limits BOOL NOT NULL DEFAULT TRUE, 487 487 address_type TEXT NOT NULL DEFAULT 'MAILING', 488 usr INT NOT NULL REFERENCES actor.usr (id) ,488 usr INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 489 489 street1 TEXT NOT NULL, 490 490 street2 TEXT, … … 510 510 valid BOOL NOT NULL DEFAULT TRUE, 511 511 address_type TEXT NOT NULL DEFAULT 'MAILING', 512 org_unit INT NOT NULL REFERENCES actor.org_unit (id) ,512 org_unit INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 513 513 street1 TEXT NOT NULL, 514 514 street2 TEXT, -
branches/rel_1_2/Open-ILS/src/sql/Pg/006.schema.permissions.sql
r7158 r9543 14 14 id SERIAL PRIMARY KEY, 15 15 name TEXT NOT NULL UNIQUE, 16 parent INT REFERENCES permission.grp_tree (id) ON DELETE RESTRICT ,16 parent INT REFERENCES permission.grp_tree (id) ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED, 17 17 usergroup BOOL NOT NULL DEFAULT TRUE, 18 18 perm_interval INTERVAL DEFAULT '3 years'::interval NOT NULL, … … 24 24 CREATE TABLE permission.grp_perm_map ( 25 25 id SERIAL PRIMARY KEY, 26 grp INT NOT NULL REFERENCES permission.grp_tree (id) ON DELETE CASCADE ,27 perm INT NOT NULL REFERENCES permission.perm_list (id) ON DELETE CASCADE ,26 grp INT NOT NULL REFERENCES permission.grp_tree (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 27 perm INT NOT NULL REFERENCES permission.perm_list (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 28 28 depth INT NOT NULL, 29 29 grantable BOOL NOT NULL DEFAULT FALSE, … … 33 33 CREATE TABLE permission.usr_perm_map ( 34 34 id SERIAL PRIMARY KEY, 35 usr INT NOT NULL REFERENCES actor.usr (id) ON DELETE CASCADE ,36 perm INT NOT NULL REFERENCES permission.perm_list (id) ON DELETE CASCADE ,35 usr INT NOT NULL REFERENCES actor.usr (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 36 perm INT NOT NULL REFERENCES permission.perm_list (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 37 37 depth INT NOT NULL, 38 38 grantable BOOL NOT NULL DEFAULT FALSE, … … 42 42 CREATE TABLE permission.usr_grp_map ( 43 43 id SERIAL PRIMARY KEY, 44 usr INT NOT NULL REFERENCES actor.usr (id) ON DELETE CASCADE ,45 grp INT NOT NULL REFERENCES permission.grp_tree (id) ON DELETE CASCADE ,44 usr INT NOT NULL REFERENCES actor.usr (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 45 grp INT NOT NULL REFERENCES permission.grp_tree (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 46 46 CONSTRAINT usr_grp_once UNIQUE (usr,grp) 47 47 ); … … 82 82 CREATE TABLE permission.usr_work_ou_map ( 83 83 id SERIAL PRIMARY KEY, 84 usr INT NOT NULL REFERENCES actor.usr (id) ON DELETE CASCADE ,85 work_ou INT NOT NULL REFERENCES actor.org_unit (id) ON DELETE CASCADE ,84 usr INT NOT NULL REFERENCES actor.usr (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 85 work_ou INT NOT NULL REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 86 86 CONSTRAINT usr_work_ou_once UNIQUE (usr,work_ou) 87 87 ); -
branches/rel_1_2/Open-ILS/src/sql/Pg/011.schema.authority.sql
r4794 r9543 24 24 CREATE TABLE authority.record_note ( 25 25 id BIGSERIAL PRIMARY KEY, 26 record BIGINT NOT NULL REFERENCES authority.record_entry (id) ,26 record BIGINT NOT NULL REFERENCES authority.record_entry (id) DEFERRABLE INITIALLY DEFERRED, 27 27 value TEXT NOT NULL, 28 28 creator INT NOT NULL DEFAULT 1, -
branches/rel_1_2/Open-ILS/src/sql/Pg/080.schema.money.sql
r8052 r9543 7 7 CREATE TABLE money.collections_tracker ( 8 8 id BIGSERIAL PRIMARY KEY, 9 usr INT NOT NULL REFERENCES actor.usr (id) , -- actor.usr.id10 collector INT NOT NULL REFERENCES actor.usr (id) ,11 location INT NOT NULL REFERENCES actor.org_unit (id) ,9 usr INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, -- actor.usr.id 10 collector INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 11 location INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 12 12 enter_time TIMESTAMP WITH TIME ZONE 13 13 ); … … 286 286 287 287 CREATE TABLE money.bnm_desk_payment ( 288 cash_drawer INT REFERENCES actor.workstation (id) 288 cash_drawer INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED 289 289 ) INHERITS (money.bnm_payment); 290 290 ALTER TABLE money.bnm_desk_payment ADD PRIMARY KEY (id); -
branches/rel_1_2/Open-ILS/src/sql/Pg/090.schema.action.sql
r8908 r9543 7 7 CREATE TABLE action.in_house_use ( 8 8 id SERIAL PRIMARY KEY, 9 item BIGINT NOT NULL REFERENCES asset.copy (id) ,10 staff INT NOT NULL REFERENCES actor.usr (id) ,11 org_unit INT NOT NULL REFERENCES actor.org_unit (id) ,9 item BIGINT NOT NULL REFERENCES asset.copy (id) DEFERRABLE INITIALLY DEFERRED, 10 staff INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 11 org_unit INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 12 12 use_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() 13 13 ); … … 15 15 CREATE TABLE action.non_cataloged_circulation ( 16 16 id SERIAL PRIMARY KEY, 17 patron INT NOT NULL REFERENCES actor.usr (id) ,18 staff INT NOT NULL REFERENCES actor.usr (id) ,19 circ_lib INT NOT NULL REFERENCES actor.org_unit (id) ,20 item_type INT NOT NULL REFERENCES config.non_cataloged_type (id) ,17 patron INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 18 staff INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 19 circ_lib INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 20 item_type INT NOT NULL REFERENCES config.non_cataloged_type (id) DEFERRABLE INITIALLY DEFERRED, 21 21 circ_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() 22 22 ); … … 24 24 CREATE TABLE action.non_cat_in_house_use ( 25 25 id SERIAL PRIMARY KEY, 26 item_type BIGINT NOT NULL REFERENCES config.non_cataloged_type(id) ,27 staff INT NOT NULL REFERENCES actor.usr (id) ,28 org_unit INT NOT NULL REFERENCES actor.org_unit (id) ,26 item_type BIGINT NOT NULL REFERENCES config.non_cataloged_type(id) DEFERRABLE INITIALLY DEFERRED, 27 staff INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 28 org_unit INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 29 29 use_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() 30 30 ); … … 32 32 CREATE TABLE action.survey ( 33 33 id SERIAL PRIMARY KEY, 34 owner INT NOT NULL REFERENCES actor.org_unit (id) ,34 owner INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 35 35 start_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), 36 36 end_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() + '10 years'::INTERVAL, … … 46 46 CREATE TABLE action.survey_question ( 47 47 id SERIAL PRIMARY KEY, 48 survey INT NOT NULL REFERENCES action.survey ,48 survey INT NOT NULL REFERENCES action.survey DEFERRABLE INITIALLY DEFERRED, 49 49 question TEXT NOT NULL 50 50 ); … … 52 52 CREATE TABLE action.survey_answer ( 53 53 id SERIAL PRIMARY KEY, 54 question INT NOT NULL REFERENCES action.survey_question ,54 question INT NOT NULL REFERENCES action.survey_question DEFERRABLE INITIALLY DEFERRED, 55 55 answer TEXT NOT NULL 56 56 ); … … 62 62 response_group_id INT, 63 63 usr INT, -- REFERENCES actor.usr 64 survey INT NOT NULL REFERENCES action.survey ,65 question INT NOT NULL REFERENCES action.survey_question ,66 answer INT NOT NULL REFERENCES action.survey_answer ,64 survey INT NOT NULL REFERENCES action.survey DEFERRABLE INITIALLY DEFERRED, 65 question INT NOT NULL REFERENCES action.survey_question DEFERRABLE INITIALLY DEFERRED, 66 answer INT NOT NULL REFERENCES action.survey_answer DEFERRABLE INITIALLY DEFERRED, 67 67 answer_date TIMESTAMP WITH TIME ZONE, 68 68 effective_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() … … 176 176 cancel_time TIMESTAMP WITH TIME ZONE, 177 177 target BIGINT NOT NULL, -- see hold_type 178 current_copy BIGINT REFERENCES asset.copy (id) ON DELETE SET NULL ,179 fulfillment_staff INT REFERENCES actor.usr (id) ,180 fulfillment_lib INT REFERENCES actor.org_unit (id) ,181 request_lib INT NOT NULL REFERENCES actor.org_unit (id) ,182 requestor INT NOT NULL REFERENCES actor.usr (id) ,183 usr INT NOT NULL REFERENCES actor.usr (id) ,178 current_copy BIGINT REFERENCES asset.copy (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, 179 fulfillment_staff INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 180 fulfillment_lib INT REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 181 request_lib INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 182 requestor INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 183 usr INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 184 184 selection_ou INT NOT NULL, 185 185 selection_depth INT NOT NULL DEFAULT 0, 186 pickup_lib INT NOT NULL REFERENCES actor.org_unit ,186 pickup_lib INT NOT NULL REFERENCES actor.org_unit DEFERRABLE INITIALLY DEFERRED, 187 187 hold_type TEXT NOT NULL CHECK (hold_type IN ('M','T','V','C')), 188 188 holdable_formats TEXT, … … 202 202 CREATE TABLE action.hold_notification ( 203 203 id SERIAL PRIMARY KEY, 204 hold INT NOT NULL REFERENCES action.hold_request (id) ,205 notify_staff INT REFERENCES actor.usr (id) ,204 hold INT NOT NULL REFERENCES action.hold_request (id) DEFERRABLE INITIALLY DEFERRED, 205 notify_staff INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 206 206 notify_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), 207 207 method TEXT NOT NULL, -- email address or phone number … … 212 212 CREATE TABLE action.hold_copy_map ( 213 213 id SERIAL PRIMARY KEY, 214 hold INT NOT NULL REFERENCES action.hold_request (id) ON DELETE CASCADE ,215 target_copy BIGINT NOT NULL REFERENCES asset.copy (id) ON DELETE CASCADE ,214 hold INT NOT NULL REFERENCES action.hold_request (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 215 target_copy BIGINT NOT NULL REFERENCES asset.copy (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 216 216 CONSTRAINT copy_once_per_hold UNIQUE (hold,target_copy) 217 217 ); … … 223 223 source_send_time TIMESTAMP WITH TIME ZONE, 224 224 dest_recv_time TIMESTAMP WITH TIME ZONE, 225 target_copy BIGINT NOT NULL REFERENCES asset.copy (id) ON DELETE CASCADE ,226 source INT NOT NULL REFERENCES actor.org_unit (id) ,227 dest INT NOT NULL REFERENCES actor.org_unit (id) ,228 prev_hop INT REFERENCES action.transit_copy (id) ,229 copy_status INT NOT NULL REFERENCES config.copy_status (id) ,225 target_copy BIGINT NOT NULL REFERENCES asset.copy (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 226 source INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 227 dest INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED, 228 prev_hop INT REFERENCES action.transit_copy (id) DEFERRABLE INITIALLY DEFERRED, 229 copy_status INT NOT NULL REFERENCES config.copy_status (id) DEFERRABLE INITIALLY DEFERRED, 230 230 persistant_transfer BOOL NOT NULL DEFAULT FALSE 231 231 ); … … 239 239 ) INHERITS (action.transit_copy); 240 240 ALTER TABLE action.hold_transit_copy ADD PRIMARY KEY (id); 241 ALTER TABLE action.hold_transit_copy ADD CONSTRAINT ahtc_tc_fkey FOREIGN KEY (target_copy) REFERENCES asset.copy (id) ON DELETE CASCADE ;241 ALTER TABLE action.hold_transit_copy ADD CONSTRAINT ahtc_tc_fkey FOREIGN KEY (target_copy) REFERENCES asset.copy (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 242 242 CREATE INDEX active_hold_transit_dest_idx ON "action".hold_transit_copy (dest); 243 243 CREATE INDEX active_hold_transit_source_idx ON "action".hold_transit_copy (source); -
branches/rel_1_2/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql
r9529 r9543 171 171 id SERIAL PRIMARY KEY, 172 172 active BOOL NOT NULL DEFAULT TRUE, 173 field INT NOT NULL REFERENCES config.metabib_field (id) ,173 field INT NOT NULL REFERENCES config.metabib_field (id) DEFERRABLE INITIALLY DEFERRED, 174 174 bump_type TEXT NOT NULL CHECK (bump_type IN ('word_order','first_word','full_match')), 175 175 multiplier NUMERIC NOT NULL DEFAULT 1.0 -
branches/rel_1_2/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
r9147 r9543 9 9 id SERIAL PRIMARY KEY, 10 10 active BOOL NOT NULL DEFAULT TRUE, 11 field INT NOT NULL REFERENCES config.metabib_field (id) ,11 field INT NOT NULL REFERENCES config.metabib_field (id) DEFERRABLE INITIALLY DEFERRED, 12 12 bump_type TEXT NOT NULL CHECK (bump_type IN ('word_order','first_word','full_match')), 13 13 multiplier NUMERIC NOT NULL DEFAULT 1.0 -
branches/rel_1_2/Open-ILS/src/sql/Pg/reporter-schema.sql
r9475 r9543 52 52 description TEXT NOT NULL, 53 53 data TEXT NOT NULL, 54 folder INT NOT NULL REFERENCES reporter.template_folder (id) 54 folder INT NOT NULL REFERENCES reporter.template_folder (id) DEFERRABLE INITIALLY DEFERRED 55 55 ); 56 56 CREATE INDEX rpt_tmpl_owner_idx ON reporter.template (owner); … … 66 66 template INT NOT NULL REFERENCES reporter.template (id) DEFERRABLE INITIALLY DEFERRED, 67 67 data TEXT NOT NULL, 68 folder INT NOT NULL REFERENCES reporter.report_folder (id) ,68 folder INT NOT NULL REFERENCES reporter.report_folder (id) DEFERRABLE INITIALLY DEFERRED, 69 69 recur BOOL NOT NULL DEFAULT FALSE, 70 70 recurance INTERVAL … … 77 77 id SERIAL PRIMARY KEY, 78 78 report INT NOT NULL REFERENCES reporter.report (id) DEFERRABLE INITIALLY DEFERRED, 79 folder INT NOT NULL REFERENCES reporter.output_folder (id) ,79 folder INT NOT NULL REFERENCES reporter.output_folder (id) DEFERRABLE INITIALLY DEFERRED, 80 80 runner INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 81 81 run_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
