Changeset 9542 for trunk/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
- Timestamp:
- 05/09/08 12:31:09 (2 months ago)
- Files:
-
- 1 modified
-
trunk/Open-ILS/src/sql/Pg/012.schema.vandelay.sql (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
r9445 r9542 7 7 CREATE TABLE vandelay.queue ( 8 8 id BIGSERIAL PRIMARY KEY, 9 owner INT NOT NULL REFERENCES actor.usr (id) ,9 owner INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED, 10 10 name TEXT NOT NULL, 11 11 complete BOOL NOT NULL DEFAULT FALSE, … … 58 58 59 59 CREATE TABLE vandelay.queued_bib_record ( 60 queue INT NOT NULL REFERENCES vandelay.bib_queue (id) ON DELETE CASCADE ,61 bib_source INT REFERENCES config.bib_source (id) ,62 imported_as INT REFERENCES biblio.record_entry (id) 60 queue INT NOT NULL REFERENCES vandelay.bib_queue (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 61 bib_source INT REFERENCES config.bib_source (id) DEFERRABLE INITIALLY DEFERRED, 62 imported_as INT REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED 63 63 ) INHERITS (vandelay.queued_record); 64 64 ALTER TABLE vandelay.queued_bib_record ADD PRIMARY KEY (id); … … 66 66 CREATE TABLE vandelay.queued_bib_record_attr ( 67 67 id BIGSERIAL PRIMARY KEY, 68 record BIGINT NOT NULL REFERENCES vandelay.queued_bib_record (id) ,69 field INT NOT NULL REFERENCES vandelay.bib_attr_definition (id) ,68 record BIGINT NOT NULL REFERENCES vandelay.queued_bib_record (id) DEFERRABLE INITIALLY DEFERRED, 69 field INT NOT NULL REFERENCES vandelay.bib_attr_definition (id) DEFERRABLE INITIALLY DEFERRED, 70 70 attr_value TEXT NOT NULL 71 71 ); … … 74 74 id BIGSERIAL PRIMARY KEY, 75 75 field_type TEXT NOT NULL CHECK (field_type in ('isbn','tcn_value','id')), 76 matched_attr INT REFERENCES vandelay.queued_bib_record_attr (id) ON DELETE CASCADE ,77 queued_record BIGINT REFERENCES vandelay.queued_bib_record (id) ON DELETE CASCADE ,78 eg_record BIGINT REFERENCES biblio.record_entry (id) 76 matched_attr INT REFERENCES vandelay.queued_bib_record_attr (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 77 queued_record BIGINT REFERENCES vandelay.queued_bib_record (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 78 eg_record BIGINT REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED 79 79 ); 80 80 … … 187 187 188 188 CREATE TABLE vandelay.queued_authority_record ( 189 queue INT NOT NULL REFERENCES vandelay.authority_queue (id) ON DELETE CASCADE ,190 imported_as INT REFERENCES authority.record_entry (id) 189 queue INT NOT NULL REFERENCES vandelay.authority_queue (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 190 imported_as INT REFERENCES authority.record_entry (id) DEFERRABLE INITIALLY DEFERRED 191 191 ) INHERITS (vandelay.queued_record); 192 192 ALTER TABLE vandelay.queued_authority_record ADD PRIMARY KEY (id); … … 194 194 CREATE TABLE vandelay.queued_authority_record_attr ( 195 195 id BIGSERIAL PRIMARY KEY, 196 record BIGINT NOT NULL REFERENCES vandelay.queued_authority_record (id) ,197 field INT NOT NULL REFERENCES vandelay.authority_attr_definition (id) ,196 record BIGINT NOT NULL REFERENCES vandelay.queued_authority_record (id) DEFERRABLE INITIALLY DEFERRED, 197 field INT NOT NULL REFERENCES vandelay.authority_attr_definition (id) DEFERRABLE INITIALLY DEFERRED, 198 198 attr_value TEXT NOT NULL 199 199 ); … … 201 201 CREATE TABLE vandelay.authority_match ( 202 202 id BIGSERIAL PRIMARY KEY, 203 matched_attr INT REFERENCES vandelay.queued_authority_record_attr (id) ON DELETE CASCADE ,204 queued_record BIGINT REFERENCES vandelay.queued_authority_record (id) ON DELETE CASCADE ,205 eg_record BIGINT REFERENCES authority.record_entry (id) 203 matched_attr INT REFERENCES vandelay.queued_authority_record_attr (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 204 queued_record BIGINT REFERENCES vandelay.queued_authority_record (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, 205 eg_record BIGINT REFERENCES authority.record_entry (id) DEFERRABLE INITIALLY DEFERRED 206 206 ); 207 207
