Revision 749
Added by bojilova over 23 years ago
src/xmltables_postgres.sql | ||
---|---|---|
26 | 26 |
DROP SEQUENCE xml_relation_id_seq; |
27 | 27 |
DROP SEQUENCE xml_replication_id_seq; |
28 | 28 |
DROP SEQUENCE accnum_uniqueid_seq; |
29 |
DROP SEQUENCE xml_documents_id_seq; |
|
29 | 30 |
|
30 |
|
|
31 | 31 |
DROP TABLE xml_index; |
32 | 32 |
DROP TABLE xml_access; |
33 | 33 |
DROP TABLE xml_revisions; |
... | ... | |
40 | 40 |
/* |
41 | 41 |
*Replication -- table to store servers that metacat is replicated to |
42 | 42 |
*/ |
43 |
|
|
44 | 43 |
CREATE SEQUENCE xml_replication_id_seq; |
45 |
|
|
46 | 44 |
CREATE TABLE xml_replication ( |
47 | 45 |
serverid INT8 default nextval('xml_replication_id_seq'), |
48 | 46 |
server VARCHAR(512), |
... | ... | |
88 | 86 |
* XML Catalog -- table to store all external sources for XML documents |
89 | 87 |
*/ |
90 | 88 |
CREATE SEQUENCE xml_catalog_id_seq; |
91 |
|
|
92 | 89 |
CREATE TABLE xml_catalog ( |
93 | 90 |
catalog_id INT8 default nextval('xml_catalog_id_seq'), -- the id for this catalog entry |
94 | 91 |
entry_type VARCHAR(500), -- the type of this catalog entry |
... | ... | |
102 | 99 |
); |
103 | 100 |
|
104 | 101 |
|
105 |
|
|
106 | 102 |
/* |
103 |
* Sequence to get uniqueID for Accession # |
|
104 |
*/ |
|
105 |
CREATE SEQUENCE xml_documents_id_seq; |
|
106 |
/* |
|
107 | 107 |
* Documents -- table to store XML documents |
108 | 108 |
*/ |
109 | 109 |
CREATE TABLE xml_documents ( |
... | ... | |
137 | 137 |
* Revised Documents -- table to store XML documents saved after an UPDATE |
138 | 138 |
* or DELETE |
139 | 139 |
*/ |
140 |
|
|
141 |
|
|
142 | 140 |
CREATE SEQUENCE xml_revisions_id_seq; |
143 | 141 |
CREATE TABLE xml_revisions ( |
144 | 142 |
revisionid INT8 default nextval('xml_revisions_id_seq'), -- the revision number we are saving |
... | ... | |
204 | 202 |
*/ |
205 | 203 |
CREATE INDEX xml_index_idx1 ON xml_index (path); |
206 | 204 |
|
207 |
/* |
|
208 |
* Sequence to get uniqueID for Accession # |
|
209 |
*/ |
|
210 |
CREATE SEQUENCE accnum_uniqueid_seq; |
|
205 |
|
|
211 | 206 |
CREATE SEQUENCE xml_relation_id_seq; |
212 |
|
|
213 | 207 |
CREATE TABLE xml_relation ( |
214 | 208 |
relationid INT8 default nextval('xml_relation_id_seq') PRIMARY KEY, -- unique id |
215 | 209 |
docid VARCHAR(250) , -- the docid of the package file |
src/xmltables.sql | ||
---|---|---|
24 | 24 |
DROP SEQUENCE xml_relation_id_seq; |
25 | 25 |
DROP SEQUENCE xml_replication_id_seq; |
26 | 26 |
DROP SEQUENCE accnum_uniqueid_seq; |
27 |
DROP SEQUENCE xml_documents_id_seq; |
|
27 | 28 |
|
28 | 29 |
DROP TRIGGER xml_revisions_before_insert; |
29 | 30 |
DROP TRIGGER xml_catalog_before_insert; |
... | ... | |
146 | 147 |
); |
147 | 148 |
|
148 | 149 |
/* |
150 |
* Sequence to get uniqueID for Accession # |
|
151 |
*/ |
|
152 |
CREATE SEQUENCE xml_documents_id_seq; |
|
153 |
|
|
154 |
/* |
|
149 | 155 |
* Index of <docid,doctype> in xml_document |
150 | 156 |
*/ |
151 | 157 |
CREATE INDEX xml_documents_idx1 ON xml_documents (docid, doctype); |
... | ... | |
228 | 234 |
*/ |
229 | 235 |
CREATE INDEX xml_index_idx1 ON xml_index (path); |
230 | 236 |
|
231 |
/* |
|
232 |
* Sequence to get uniqueID for Accession # |
|
233 |
*/ |
|
234 |
CREATE SEQUENCE accnum_uniqueid_seq; |
|
235 |
|
|
236 | 237 |
CREATE TABLE xml_relation ( |
237 | 238 |
relationid NUMBER(20) PRIMARY KEY, -- unique id |
238 | 239 |
docid VARCHAR2(250), -- the docid of the package file |
Also available in: Unified diff
changed the db sequence name used for the accession# uniqueid
to xml_documents_id_seq.
All db sequences now are named of form <table_name>_id_seq