Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdmlib / cdmlib-test / src / main / resources / dbscripts / 001-cdm.h2.sql @ f15eb5ec

History | View | Annotate | Download (371 KB)

1
SET CLUSTER '';
2
SET DEFAULT_TABLE_TYPE 0;
3
SET WRITE_DELAY 500;
4
SET DEFAULT_LOCK_TIMEOUT 2000;
5
SET CACHE_SIZE 16384;
6

    
7
CREATE USER IF NOT EXISTS EDIT PASSWORD '' ADMIN;
8
CREATE SEQUENCE PUBLIC.SYSTEM_SEQUENCE_10A55F0A_EE57_42DB_8046_6240A60AD0EC START WITH 4 BELONGS_TO_TABLE;
9

    
10

    
11
CREATE CACHED TABLE PUBLIC.ADDRESS(
12
    ID INTEGER NOT NULL,
13
    CREATED TIMESTAMP,
14
    UUID VARCHAR(36),
15
    UPDATED TIMESTAMP,
16
    LOCALITY VARCHAR(255),
17
    LOCATION_ERRORRADIUS INTEGER,
18
    LOCATION_LATITUDE DOUBLE,
19
    LOCATION_LONGITUDE DOUBLE,
20
    POBOX VARCHAR(255),
21
    POSTCODE VARCHAR(255),
22
    REGION VARCHAR(255),
23
    STREET VARCHAR(255),
24
    CREATEDBY_ID INTEGER,
25
    UPDATEDBY_ID INTEGER,
26
    COUNTRY_ID INTEGER,
27
    LOCATION_REFERENCESYSTEM_ID INTEGER
28
);
29
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ADDRESS;
30
CREATE CACHED TABLE PUBLIC.ADDRESS_AUD(
31
    ID INTEGER NOT NULL,
32
    REV INTEGER NOT NULL,
33
    REVTYPE TINYINT,
34
    CREATED TIMESTAMP,
35
    UUID VARCHAR(36),
36
    UPDATED TIMESTAMP,
37
    LOCALITY VARCHAR(255),
38
    LOCATION_ERRORRADIUS INTEGER,
39
    LOCATION_LATITUDE DOUBLE,
40
    LOCATION_LONGITUDE DOUBLE,
41
    POBOX VARCHAR(255),
42
    POSTCODE VARCHAR(255),
43
    REGION VARCHAR(255),
44
    STREET VARCHAR(255),
45
    CREATEDBY_ID INTEGER,
46
    UPDATEDBY_ID INTEGER,
47
    COUNTRY_ID INTEGER,
48
    LOCATION_REFERENCESYSTEM_ID INTEGER
49
);
50
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ADDRESS_AUD;
51
CREATE CACHED TABLE PUBLIC.AGENTBASE(
52
    DTYPE VARCHAR(31) NOT NULL,
53
    ID INTEGER NOT NULL,
54
    CREATED TIMESTAMP,
55
    UUID VARCHAR(36),
56
    UPDATED TIMESTAMP,
57
    LSID_AUTHORITY VARCHAR(255),
58
    LSID_LSID VARCHAR(255),
59
    LSID_NAMESPACE VARCHAR(255),
60
    LSID_OBJECT VARCHAR(255),
61
    LSID_REVISION VARCHAR(255),
62
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
63
    TITLECACHE VARCHAR(255),
64
        PROTECTEDCOLLECTORTITLECACHE BOOLEAN NOT NULL,
65
        COLLECTORTITLE VARCHAR(255),
66
        PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
67
    NOMENCLATURALTITLE VARCHAR(255),
68
    CODE VARCHAR(255),
69
    NAME VARCHAR(255),
70
    GIVENNAME VARCHAR(255),
71
        INITIALS VARCHAR(50),
72
    FAMILYNAME VARCHAR(255),
73
    LIFESPAN_END VARCHAR(255),
74
    LIFESPAN_FREETEXT VARCHAR(255),
75
    LIFESPAN_START VARCHAR(255),
76
    PREFIX VARCHAR(255),
77
    SUFFIX VARCHAR(255),
78
        HASMOREMEMBERS BOOLEAN,
79
    CREATEDBY_ID INTEGER,
80
    UPDATEDBY_ID INTEGER,
81
    ISPARTOF_ID INTEGER
82
);
83
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE;
84
CREATE INDEX PUBLIC.AGENTTITLECACHEINDEX ON PUBLIC.AGENTBASE(TITLECACHE);
85
CREATE CACHED TABLE PUBLIC.AGENTBASE_AUD(
86
    DTYPE VARCHAR(31) NOT NULL,
87
    ID INTEGER NOT NULL,
88
    REV INTEGER NOT NULL,
89
    REVTYPE TINYINT,
90
    CREATED TIMESTAMP,
91
    UUID VARCHAR(36),
92
    UPDATED TIMESTAMP,
93
    LSID_AUTHORITY VARCHAR(255),
94
    LSID_LSID VARCHAR(255),
95
    LSID_NAMESPACE VARCHAR(255),
96
    LSID_OBJECT VARCHAR(255),
97
    LSID_REVISION VARCHAR(255),
98
    PROTECTEDTITLECACHE BOOLEAN,
99
    TITLECACHE VARCHAR(255),
100
    PROTECTEDCOLLECTORTITLECACHE BOOLEAN NOT NULL,
101
        COLLECTORTITLE VARCHAR(255),
102
    NOMENCLATURALTITLE VARCHAR(255),
103
    PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
104
    GIVENNAME VARCHAR(255),
105
    INITIALS VARCHAR(50),
106
        FAMILYNAME VARCHAR(255),
107
    LIFESPAN_END VARCHAR(255),
108
    LIFESPAN_FREETEXT VARCHAR(255),
109
    LIFESPAN_START VARCHAR(255),
110
    PREFIX VARCHAR(255),
111
    SUFFIX VARCHAR(255),
112
    CODE VARCHAR(255),
113
    NAME VARCHAR(255),        
114
        HASMOREMEMBERS BOOLEAN,
115
    CREATEDBY_ID INTEGER,
116
    UPDATEDBY_ID INTEGER,
117
           ISPARTOF_ID INTEGER,
118

    
119
);
120
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AUD;
121
CREATE CACHED TABLE PUBLIC.AGENTBASE_ADDRESS(
122
    AGENTBASE_ID INTEGER NOT NULL,
123
    CONTACT_ADDRESSES_ID INTEGER NOT NULL
124
);
125
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ADDRESS;
126
CREATE CACHED TABLE PUBLIC.AGENTBASE_ADDRESS_AUD(
127
    REV INTEGER NOT NULL,
128
    AGENTBASE_ID INTEGER NOT NULL,
129
    CONTACT_ADDRESSES_ID INTEGER NOT NULL,
130
    REVTYPE TINYINT
131
);
132
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ADDRESS_AUD;
133
CREATE CACHED TABLE PUBLIC.AGENTBASE_AGENTBASE(
134
    TEAM_ID INTEGER NOT NULL,
135
    TEAMMEMBERS_ID INTEGER NOT NULL,
136
    SORTINDEX INTEGER NOT NULL
137
);
138
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AGENTBASE;
139
CREATE CACHED TABLE PUBLIC.AGENTBASE_AGENTBASE_AUD(
140
    REV INTEGER NOT NULL,
141
    TEAM_ID INTEGER NOT NULL,
142
    TEAMMEMBERS_ID INTEGER NOT NULL,
143
    SORTINDEX INTEGER NOT NULL,
144
    REVTYPE TINYINT
145
);
146
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AGENTBASE_AUD;
147
CREATE CACHED TABLE PUBLIC.AGENTBASE_ANNOTATION(
148
    AGENTBASE_ID INTEGER NOT NULL,
149
    ANNOTATIONS_ID INTEGER NOT NULL
150
);
151
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ANNOTATION;
152
CREATE CACHED TABLE PUBLIC.AGENTBASE_ANNOTATION_AUD(
153
    REV INTEGER NOT NULL,
154
    AGENTBASE_ID INTEGER NOT NULL,
155
    ANNOTATIONS_ID INTEGER NOT NULL,
156
    REVTYPE TINYINT
157
);
158
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ANNOTATION_AUD;
159
CREATE CACHED TABLE PUBLIC.AGENTBASE_CREDIT(
160
    AGENTBASE_ID INTEGER NOT NULL,
161
    CREDITS_ID INTEGER NOT NULL,
162
    SORTINDEX INTEGER NOT NULL
163
);
164
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CREDIT;
165
CREATE CACHED TABLE PUBLIC.AGENTBASE_CREDIT_AUD(
166
    REV INTEGER NOT NULL,
167
    AGENTBASE_ID INTEGER NOT NULL,
168
    CREDITS_ID INTEGER NOT NULL,
169
    SORTINDEX INTEGER NOT NULL,
170
    REVTYPE TINYINT
171
);
172
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CREDIT_AUD;
173
CREATE CACHED TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE(
174
    INSTITUTION_ID INTEGER NOT NULL,
175
    TYPES_ID INTEGER NOT NULL
176
);
177
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_DEFINEDTERMBASE;
178
CREATE CACHED TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD(
179
    REV INTEGER NOT NULL,
180
    INSTITUTION_ID INTEGER NOT NULL,
181
    TYPES_ID INTEGER NOT NULL,
182
    REVTYPE TINYINT
183
);
184
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD;
185
CREATE CACHED TABLE PUBLIC.AGENTBASE_EXTENSION(
186
    AGENTBASE_ID INTEGER NOT NULL,
187
    EXTENSIONS_ID INTEGER NOT NULL
188
);
189
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_EXTENSION;
190
CREATE CACHED TABLE PUBLIC.AGENTBASE_EXTENSION_AUD(
191
    REV INTEGER NOT NULL,
192
    AGENTBASE_ID INTEGER NOT NULL,
193
    EXTENSIONS_ID INTEGER NOT NULL,
194
    REVTYPE TINYINT
195
);
196
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_EXTENSION_AUD;
197
CREATE CACHED TABLE PUBLIC.AGENTBASE_IDENTIFIER(
198
    AGENTBASE_ID INTEGER NOT NULL,
199
    IDENTIFIERS_ID INTEGER NOT NULL,
200
    SORTINDEX INTEGER NOT NULL
201
);
202
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_IDENTIFIER;
203
CREATE CACHED TABLE PUBLIC.AGENTBASE_IDENTIFIER_AUD(
204
    REV INTEGER NOT NULL,
205
    AGENTBASE_ID INTEGER NOT NULL,
206
    IDENTIFIERS_ID INTEGER NOT NULL,
207
    SORTINDEX INTEGER NOT NULL,
208
    REVTYPE TINYINT
209
);
210
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_IDENTIFIER_AUD;
211
CREATE CACHED TABLE PUBLIC.AGENTBASE_MARKER(
212
    AGENTBASE_ID INTEGER NOT NULL,
213
    MARKERS_ID INTEGER NOT NULL
214
);
215
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MARKER;
216
CREATE CACHED TABLE PUBLIC.AGENTBASE_MARKER_AUD(
217
    REV INTEGER NOT NULL,
218
    AGENTBASE_ID INTEGER NOT NULL,
219
    MARKERS_ID INTEGER NOT NULL,
220
    REVTYPE TINYINT
221
);
222
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MARKER_AUD;
223
CREATE CACHED TABLE PUBLIC.AGENTBASE_MEDIA(
224
    AGENTBASE_ID INTEGER NOT NULL,
225
    MEDIA_ID INTEGER NOT NULL
226
);
227
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MEDIA;
228
CREATE CACHED TABLE PUBLIC.AGENTBASE_MEDIA_AUD(
229
    REV INTEGER NOT NULL,
230
    AGENTBASE_ID INTEGER NOT NULL,
231
    MEDIA_ID INTEGER NOT NULL,
232
    REVTYPE TINYINT
233
);
234
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MEDIA_AUD;
235
CREATE CACHED TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE(
236
    AGENTBASE_ID INTEGER NOT NULL,
237
    SOURCES_ID INTEGER NOT NULL
238
);
239
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ORIGINALSOURCEBASE;
240
CREATE CACHED TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD(
241
    REV INTEGER NOT NULL,
242
    AGENTBASE_ID INTEGER NOT NULL,
243
    SOURCES_ID INTEGER NOT NULL,
244
    REVTYPE TINYINT
245
);
246
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD;
247
CREATE CACHED TABLE PUBLIC.AGENTBASE_RIGHTSINFO(
248
    AGENTBASE_ID INTEGER NOT NULL,
249
    RIGHTS_ID INTEGER NOT NULL
250
);
251
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_RIGHTSINFO;
252
CREATE CACHED TABLE PUBLIC.AGENTBASE_RIGHTSINFO_AUD(
253
    REV INTEGER NOT NULL,
254
    AGENTBASE_ID INTEGER NOT NULL,
255
    RIGHTS_ID INTEGER NOT NULL,
256
    REVTYPE TINYINT
257
);
258
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_RIGHTSINFO_AUD;
259
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES(
260
    AGENTBASE_ID INTEGER NOT NULL,
261
    CONTACT_EMAILADDRESSES_ELEMENT VARCHAR(255)
262
);
263
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES;
264
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD(
265
    REV INTEGER NOT NULL,
266
    AGENTBASE_ID INTEGER NOT NULL,
267
    CONTACT_EMAILADDRESSES_ELEMENT VARCHAR(255) NOT NULL,
268
    REVTYPE TINYINT
269
);
270
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD;
271
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS(
272
    AGENTBASE_ID INTEGER NOT NULL,
273
    CONTACT_FAXNUMBERS_ELEMENT VARCHAR(255)
274
);
275
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS;
276
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD(
277
    REV INTEGER NOT NULL,
278
    AGENTBASE_ID INTEGER NOT NULL,
279
    CONTACT_FAXNUMBERS_ELEMENT VARCHAR(255) NOT NULL,
280
    REVTYPE TINYINT
281
);
282
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD;
283
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS(
284
    AGENTBASE_ID INTEGER NOT NULL,
285
    CONTACT_PHONENUMBERS_ELEMENT VARCHAR(255)
286
);
287
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS;
288
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD(
289
    REV INTEGER NOT NULL,
290
    AGENTBASE_ID INTEGER NOT NULL,
291
    CONTACT_PHONENUMBERS_ELEMENT VARCHAR(255) NOT NULL,
292
    REVTYPE TINYINT
293
);
294
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD;
295
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_URLS(
296
    AGENTBASE_ID INTEGER NOT NULL,
297
    CONTACT_URLS_ELEMENT VARCHAR(255)
298
);
299
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_URLS;
300
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_URLS_AUD(
301
    REV INTEGER NOT NULL,
302
    AGENTBASE_ID INTEGER NOT NULL,
303
    CONTACT_URLS_ELEMENT VARCHAR(255) NOT NULL,
304
    REVTYPE TINYINT
305
);
306
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_URLS_AUD;
307

    
308
CREATE TABLE AMPLIFICATION (
309
     ID INTEGER NOT NULL,
310
     CREATED TIMESTAMP,
311
     UUID VARCHAR(36),
312
     UPDATED TIMESTAMP,
313
     DESCRIPTION VARCHAR(255),
314
     TIMEPERIOD_END VARCHAR(255),
315
     TIMEPERIOD_FREETEXT VARCHAR(255),
316
     TIMEPERIOD_START VARCHAR(255),
317
     ELECTROPHORESISVOLTAGE DOUBLE,
318
     GELCONCENTRATION DOUBLE,
319
     GELRUNNINGTIME DOUBLE,
320
     LADDERUSED VARCHAR(255),
321
         LABELCACHE VARCHAR(255),
322
     CREATEDBY_ID INTEGER,
323
     UPDATEDBY_ID INTEGER,
324
     ACTOR_ID INTEGER,
325
     FORWARDPRIMER_ID INTEGER,
326
     DNAMARKER_ID INTEGER,
327
     PURIFICATION_ID INTEGER,
328
     INSTITUTION_ID INTEGER,
329
         REVERSEPRIMER_ID INTEGER,
330
     PRIMARY KEY (ID)
331
);
332

    
333
CREATE TABLE AMPLIFICATION_AUD (
334
    ID INTEGER NOT NULL,
335
    REV INTEGER NOT NULL,
336
    REVTYPE TINYINT,
337
    CREATED TIMESTAMP,
338
    UUID VARCHAR(36),
339
    UPDATED TIMESTAMP,
340
    DESCRIPTION VARCHAR(255),
341
    TIMEPERIOD_END VARCHAR(255),
342
    TIMEPERIOD_FREETEXT VARCHAR(255),
343
    TIMEPERIOD_START VARCHAR(255),
344
    ELECTROPHORESISVOLTAGE DOUBLE,
345
    GELCONCENTRATION DOUBLE,
346
    GELRUNNINGTIME DOUBLE,
347
    LADDERUSED VARCHAR(255),
348
    LABELCACHE VARCHAR(255),
349
    CREATEDBY_ID INTEGER,
350
    UPDATEDBY_ID INTEGER,
351
    ACTOR_ID INTEGER,
352
    FORWARDPRIMER_ID INTEGER,
353
    DNAMARKER_ID INTEGER,
354
    PURIFICATION_ID INTEGER,
355
    INSTITUTION_ID INTEGER,
356
        REVERSEPRIMER_ID INTEGER,
357
    PRIMARY KEY (ID)
358
);
359

    
360
CREATE TABLE AMPLIFICATION_ANNOTATION (
361
    AMPLIFICATION_ID INTEGER NOT NULL,
362
    ANNOTATIONS_ID INTEGER NOT NULL,
363
    PRIMARY KEY (AMPLIFICATION_ID, ANNOTATIONS_ID)
364
);
365

    
366
CREATE TABLE AMPLIFICATION_ANNOTATION_AUD (
367
    REV INTEGER NOT NULL,
368
    REVTYPE TINYINT,
369
    AMPLIFICATION_ID INTEGER NOT NULL,
370
    ANNOTATIONS_ID INTEGER NOT NULL
371
);
372

    
373
CREATE TABLE AMPLIFICATION_MARKER (
374
    AMPLIFICATION_ID INTEGER NOT NULL,
375
    MARKERS_ID INTEGER NOT NULL,
376
    PRIMARY KEY (AMPLIFICATION_ID, MARKERS_ID)
377
);
378

    
379
CREATE TABLE AMPLIFICATION_MARKER_AUD (
380
    REV INTEGER NOT NULL,
381
    REVTYPE TINYINT,
382
    AMPLIFICATION_ID INTEGER NOT NULL,
383
    MARKERS_ID INTEGER NOT NULL,
384
);
385

    
386
CREATE TABLE AMPLIFICATIONRESULT (
387
     ID INTEGER NOT NULL,
388
     CREATED TIMESTAMP,
389
     UUID VARCHAR(36),
390
     UPDATED TIMESTAMP,
391
     SUCCESSTEXT VARCHAR(255),
392
     SUCCESSFUL BOOLEAN,
393
     CREATEDBY_ID INTEGER,
394
     UPDATEDBY_ID INTEGER,
395
     CLONING_ID INTEGER,
396
     DNASAMPLE_ID INTEGER,
397
         AMPLIFICATION_ID INTEGER,
398
         GELPHOTO_ID INTEGER,
399
     PRIMARY KEY (ID)
400
);
401

    
402
CREATE TABLE AMPLIFICATIONRESULT_AUD (
403
     ID INTEGER NOT NULL,
404
         REV INTEGER NOT NULL,
405
     REVTYPE TINYINT,
406
     CREATED TIMESTAMP,
407
     UUID VARCHAR(36),
408
     UPDATED TIMESTAMP,
409
     SUCCESSTEXT VARCHAR(255),
410
     SUCCESSFUL BOOLEAN,
411
     CREATEDBY_ID INTEGER,
412
     UPDATEDBY_ID INTEGER,
413
     CLONING_ID INTEGER,
414
     DNASAMPLE_ID INTEGER,
415
     AMPLIFICATION_ID INTEGER,
416
         GELPHOTO_ID INTEGER,
417
     PRIMARY KEY (ID)
418
);
419

    
420
CREATE TABLE AMPLIFICATIONRESULT_ANNOTATION (
421
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
422
    ANNOTATIONS_ID INTEGER NOT NULL,
423
    PRIMARY KEY (AMPLIFICATIONRESULT_ID, ANNOTATIONS_ID)
424
);
425

    
426
CREATE TABLE AMPLIFICATIONRESULT_ANNOTATION_AUD (
427
    REV INTEGER NOT NULL,
428
    REVTYPE TINYINT,
429
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
430
    ANNOTATIONS_ID INTEGER NOT NULL
431
);
432

    
433
CREATE TABLE AMPLIFICATIONRESULT_MARKER (
434
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
435
    MARKERS_ID INTEGER NOT NULL,
436
    PRIMARY KEY (AMPLIFICATIONRESULT_ID, MARKERS_ID)
437
);
438

    
439
CREATE TABLE AMPLIFICATIONRESULT_MARKER_AUD (
440
    REV INTEGER NOT NULL,
441
    REVTYPE TINYINT,
442
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
443
    MARKERS_ID INTEGER NOT NULL,
444
);
445

    
446

    
447
CREATE CACHED TABLE PUBLIC.ANNOTATION(
448
    ID INTEGER NOT NULL,
449
    CREATED TIMESTAMP,
450
    UUID VARCHAR(36),
451
    UPDATED TIMESTAMP,
452
    TEXT CLOB,
453
    LINKBACKURI CLOB,
454
    CREATEDBY_ID INTEGER,
455
    UPDATEDBY_ID INTEGER,
456
    LANGUAGE_ID INTEGER,
457
    ANNOTATIONTYPE_ID INTEGER,
458
    COMMENTATOR_ID INTEGER
459
);
460
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION;
461
CREATE CACHED TABLE PUBLIC.ANNOTATION_AUD(
462
    ID INTEGER NOT NULL,
463
    REV INTEGER NOT NULL,
464
    REVTYPE TINYINT,
465
    CREATED TIMESTAMP,
466
    UUID VARCHAR(36),
467
    UPDATED TIMESTAMP,
468
    TEXT CLOB,
469
    LINKBACKURI CLOB,
470
    CREATEDBY_ID INTEGER,
471
    UPDATEDBY_ID INTEGER,
472
    LANGUAGE_ID INTEGER,
473
    ANNOTATIONTYPE_ID INTEGER,
474
    COMMENTATOR_ID INTEGER
475
);
476
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_AUD;
477
CREATE CACHED TABLE PUBLIC.ANNOTATION_ANNOTATION(
478
    ANNOTATION_ID INTEGER NOT NULL,
479
    ANNOTATIONS_ID INTEGER NOT NULL
480
);
481
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_ANNOTATION;
482
CREATE CACHED TABLE PUBLIC.ANNOTATION_ANNOTATION_AUD(
483
    REV INTEGER NOT NULL,
484
    ANNOTATION_ID INTEGER NOT NULL,
485
    ANNOTATIONS_ID INTEGER NOT NULL,
486
    REVTYPE TINYINT
487
);
488
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_ANNOTATION_AUD;
489
CREATE CACHED TABLE PUBLIC.ANNOTATION_MARKER(
490
    ANNOTATION_ID INTEGER NOT NULL,
491
    MARKERS_ID INTEGER NOT NULL
492
);
493
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_MARKER;
494
CREATE CACHED TABLE PUBLIC.ANNOTATION_MARKER_AUD(
495
    REV INTEGER NOT NULL,
496
    ANNOTATION_ID INTEGER NOT NULL,
497
    MARKERS_ID INTEGER NOT NULL,
498
    REVTYPE TINYINT
499
);
500
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_MARKER_AUD;
501
CREATE CACHED TABLE PUBLIC.AUDITEVENT(
502
    REVISIONNUMBER INTEGER DEFAULT (NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_10A55F0A_EE57_42DB_8046_6240A60AD0EC) NOT NULL NULL_TO_DEFAULT SEQUENCE PUBLIC.SYSTEM_SEQUENCE_10A55F0A_EE57_42DB_8046_6240A60AD0EC,
503
    DATE TIMESTAMP,
504
    TIMESTAMP BIGINT,
505
    UUID VARCHAR(255)
506
);
507
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.AUDITEVENT;
508
CREATE CACHED TABLE PUBLIC.CDM_VIEW(
509
    ID INTEGER NOT NULL,
510
    CREATED TIMESTAMP,
511
    UUID VARCHAR(36),
512
    DESCRIPTION VARCHAR(255),
513
    NAME VARCHAR(255),
514
    CREATEDBY_ID INTEGER,
515
    REFERENCE_ID INTEGER
516
);
517
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CDM_VIEW;
518
CREATE CACHED TABLE PUBLIC.CDM_VIEW_CDM_VIEW(
519
    CDM_VIEW_ID INTEGER NOT NULL,
520
    SUPERVIEWS_ID INTEGER NOT NULL
521
);
522
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CDM_VIEW_CDM_VIEW;
523
CREATE CACHED TABLE PUBLIC.CDMMETADATA(
524
    ID INTEGER NOT NULL,
525
    CREATED TIMESTAMP,
526
    UUID VARCHAR(36),
527
    PROPERTYNAME VARCHAR(20),
528
    VALUE VARCHAR(255),
529
    CREATEDBY_ID INTEGER
530
);
531
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMMETADATA;
532
CREATE CACHED TABLE PUBLIC.CDMPREFERENCE(
533
    KEY_SUBJECT VARCHAR(100),
534
    KEY_PREDICATE VARCHAR(100),
535
    VALUE VARCHAR(1023),
536
        ALLOWOVERRIDE BOOLEAN NOT NULL
537
);
538
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMPREFERENCE;
539
CREATE CACHED TABLE PUBLIC.CLASSIFICATION(
540
    ID INTEGER NOT NULL,
541
    CREATED TIMESTAMP,
542
    UUID VARCHAR(36),
543
    UPDATED TIMESTAMP,
544
    LSID_AUTHORITY VARCHAR(255),
545
    LSID_LSID VARCHAR(255),
546
    LSID_NAMESPACE VARCHAR(255),
547
    LSID_OBJECT VARCHAR(255),
548
    LSID_REVISION VARCHAR(255),
549
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
550
    TITLECACHE VARCHAR(255),
551
    MICROREFERENCE VARCHAR(255),
552
    TIMEPERIOD_START VARCHAR(255),
553
    TIMEPERIOD_FREETEXT VARCHAR(255),
554
    TIMEPERIOD_END VARCHAR(255),
555
    CREATEDBY_ID INTEGER,
556
    UPDATEDBY_ID INTEGER,
557
    NAME_ID INTEGER,
558
    REFERENCE_ID INTEGER,
559
    ROOTNODE_ID INTEGER
560
);
561
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION;
562
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_AUD(
563
    ID INTEGER NOT NULL,
564
    REV INTEGER NOT NULL,
565
    REVTYPE TINYINT,
566
    CREATED TIMESTAMP,
567
    UUID VARCHAR(36),
568
    UPDATED TIMESTAMP,
569
    LSID_AUTHORITY VARCHAR(255),
570
    LSID_LSID VARCHAR(255),
571
    LSID_NAMESPACE VARCHAR(255),
572
    LSID_OBJECT VARCHAR(255),
573
    LSID_REVISION VARCHAR(255),
574
    PROTECTEDTITLECACHE BOOLEAN,
575
    TITLECACHE VARCHAR(255),
576
    MICROREFERENCE VARCHAR(255),
577
    TIMEPERIOD_START VARCHAR(255),
578
    TIMEPERIOD_FREETEXT VARCHAR(255),
579
    TIMEPERIOD_END VARCHAR(255),
580
    CREATEDBY_ID INTEGER,
581
    UPDATEDBY_ID INTEGER,
582
    NAME_ID INTEGER,
583
    REFERENCE_ID INTEGER,
584
    ROOTNODE_ID INTEGER
585
);
586
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_AUD;
587
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION(
588
    CLASSIFICATION_ID INTEGER NOT NULL,
589
    ANNOTATIONS_ID INTEGER NOT NULL
590
);
591
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION;
592
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION_AUD(
593
    REV INTEGER NOT NULL,
594
    CLASSIFICATION_ID INTEGER NOT NULL,
595
    ANNOTATIONS_ID INTEGER NOT NULL,
596
    REVTYPE TINYINT
597
);
598
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION_AUD;
599
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT(
600
    CLASSIFICATION_ID INTEGER NOT NULL,
601
    CREDITS_ID INTEGER NOT NULL,
602
    SORTINDEX INTEGER NOT NULL
603
);
604
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT;
605
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT_AUD(
606
    REV INTEGER NOT NULL,
607
    CLASSIFICATION_ID INTEGER NOT NULL,
608
    CREDITS_ID INTEGER NOT NULL,
609
    SORTINDEX INTEGER NOT NULL,
610
    REVTYPE TINYINT
611
);
612
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT_AUD;
613

    
614
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_DESCRIPTION(
615
    CLASSIFICATION_ID INTEGER NOT NULL,
616
           DESCRIPTION_ID INTEGER NOT NULL,
617
           DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
618
);
619
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_DESCRIPTION;
620
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_DESCRIPTION_AUD(
621
    REV INTEGER NOT NULL,
622
    CLASSIFICATION_ID INTEGER NOT NULL,
623
    DESCRIPTION_ID INTEGER NOT NULL,
624
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
625
    REVTYPE TINYINT
626
);
627
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_DESCRIPTION_AUD;
628

    
629
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_EXTENSION(
630
    CLASSIFICATION_ID INTEGER NOT NULL,
631
    EXTENSIONS_ID INTEGER NOT NULL
632
);
633
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_EXTENSION;
634
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_EXTENSION_AUD(
635
    REV INTEGER NOT NULL,
636
    CLASSIFICATION_ID INTEGER NOT NULL,
637
    EXTENSIONS_ID INTEGER NOT NULL,
638
    REVTYPE TINYINT
639
);
640
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_EXTENSION_AUD;
641
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_GEOSCOPE(
642
    CLASSIFICATION_ID INTEGER NOT NULL,
643
    GEOSCOPES_ID INTEGER NOT NULL
644
);
645
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_GEOSCOPE;
646
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_GEOSCOPE_AUD(
647
    REV INTEGER NOT NULL,
648
    CLASSIFICATION_ID INTEGER NOT NULL,
649
    GEOSCOPES_ID INTEGER NOT NULL,
650
    REVTYPE TINYINT
651
);
652
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_GEOSCOPE_AUD;
653
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_IDENTIFIER(
654
    CLASSIFICATION_ID INTEGER NOT NULL,
655
    IDENTIFIERS_ID INTEGER NOT NULL,
656
    SORTINDEX INTEGER NOT NULL
657
);
658
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_IDENTIFIER;
659
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_IDENTIFIER_AUD(
660
    REV INTEGER NOT NULL,
661
    CLASSIFICATION_ID INTEGER NOT NULL,
662
    IDENTIFIERS_ID INTEGER NOT NULL,
663
    SORTINDEX INTEGER NOT NULL,
664
    REVTYPE TINYINT
665
);
666
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_IDENTIFIER_AUD;
667
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_MARKER(
668
    CLASSIFICATION_ID INTEGER NOT NULL,
669
    MARKERS_ID INTEGER NOT NULL
670
);
671
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_MARKER;
672
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_MARKER_AUD(
673
    REV INTEGER NOT NULL,
674
    CLASSIFICATION_ID INTEGER NOT NULL,
675
    MARKERS_ID INTEGER NOT NULL,
676
    REVTYPE TINYINT
677
);
678
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_MARKER_AUD;
679
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE(
680
    CLASSIFICATION_ID INTEGER NOT NULL,
681
    SOURCES_ID INTEGER NOT NULL
682
);
683
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE;
684
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD(
685
    REV INTEGER NOT NULL,
686
    CLASSIFICATION_ID INTEGER NOT NULL,
687
    SOURCES_ID INTEGER NOT NULL,
688
    REVTYPE TINYINT
689
);
690
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD;
691
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO(
692
    CLASSIFICATION_ID INTEGER NOT NULL,
693
    RIGHTS_ID INTEGER NOT NULL
694
);
695
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_RIGHTSINFO;
696
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD(
697
    REV INTEGER NOT NULL,
698
    CLASSIFICATION_ID INTEGER NOT NULL,
699
    RIGHTS_ID INTEGER NOT NULL,
700
    REVTYPE TINYINT
701
);
702
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD;
703

    
704
CREATE CACHED TABLE PUBLIC.COLLECTION(
705
    ID INTEGER NOT NULL,
706
    CREATED TIMESTAMP,
707
    UUID VARCHAR(36),
708
    UPDATED TIMESTAMP,
709
    LSID_AUTHORITY VARCHAR(255),
710
    LSID_LSID VARCHAR(255),
711
    LSID_NAMESPACE VARCHAR(255),
712
    LSID_OBJECT VARCHAR(255),
713
    LSID_REVISION VARCHAR(255),
714
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
715
    TITLECACHE VARCHAR(255),
716
    CODE VARCHAR(255),
717
    CODESTANDARD VARCHAR(255),
718
    NAME VARCHAR(255),
719
    TOWNORLOCATION VARCHAR(255),
720
    CREATEDBY_ID INTEGER,
721
    UPDATEDBY_ID INTEGER,
722
    INSTITUTE_ID INTEGER,
723
    SUPERCOLLECTION_ID INTEGER
724
);
725
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION;
726
CREATE INDEX PUBLIC.COLLECTIONTITLECACHEINDEX ON PUBLIC.COLLECTION(TITLECACHE);
727
CREATE CACHED TABLE PUBLIC.COLLECTION_AUD(
728
    ID INTEGER NOT NULL,
729
    REV INTEGER NOT NULL,
730
    REVTYPE TINYINT,
731
    CREATED TIMESTAMP,
732
    UUID VARCHAR(36),
733
    UPDATED TIMESTAMP,
734
    LSID_AUTHORITY VARCHAR(255),
735
    LSID_LSID VARCHAR(255),
736
    LSID_NAMESPACE VARCHAR(255),
737
    LSID_OBJECT VARCHAR(255),
738
    LSID_REVISION VARCHAR(255),
739
    PROTECTEDTITLECACHE BOOLEAN,
740
    TITLECACHE VARCHAR(255),
741
    CODE VARCHAR(255),
742
    CODESTANDARD VARCHAR(255),
743
    NAME VARCHAR(255),
744
    TOWNORLOCATION VARCHAR(255),
745
    CREATEDBY_ID INTEGER,
746
    UPDATEDBY_ID INTEGER,
747
    INSTITUTE_ID INTEGER,
748
    SUPERCOLLECTION_ID INTEGER
749
);
750
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_AUD;
751
CREATE CACHED TABLE PUBLIC.COLLECTION_ANNOTATION(
752
    COLLECTION_ID INTEGER NOT NULL,
753
    ANNOTATIONS_ID INTEGER NOT NULL
754
);
755
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ANNOTATION;
756
CREATE CACHED TABLE PUBLIC.COLLECTION_ANNOTATION_AUD(
757
    REV INTEGER NOT NULL,
758
    COLLECTION_ID INTEGER NOT NULL,
759
    ANNOTATIONS_ID INTEGER NOT NULL,
760
    REVTYPE TINYINT
761
);
762
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ANNOTATION_AUD;
763
CREATE CACHED TABLE PUBLIC.COLLECTION_CREDIT(
764
    COLLECTION_ID INTEGER NOT NULL,
765
    CREDITS_ID INTEGER NOT NULL,
766
    SORTINDEX INTEGER NOT NULL
767
);
768
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_CREDIT;
769
CREATE CACHED TABLE PUBLIC.COLLECTION_CREDIT_AUD(
770
    REV INTEGER NOT NULL,
771
    COLLECTION_ID INTEGER NOT NULL,
772
    CREDITS_ID INTEGER NOT NULL,
773
    SORTINDEX INTEGER NOT NULL,
774
    REVTYPE TINYINT
775
);
776
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_CREDIT_AUD;
777
CREATE CACHED TABLE PUBLIC.COLLECTION_EXTENSION(
778
    COLLECTION_ID INTEGER NOT NULL,
779
    EXTENSIONS_ID INTEGER NOT NULL
780
);
781
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_EXTENSION;
782
CREATE CACHED TABLE PUBLIC.COLLECTION_EXTENSION_AUD(
783
    REV INTEGER NOT NULL,
784
    COLLECTION_ID INTEGER NOT NULL,
785
    EXTENSIONS_ID INTEGER NOT NULL,
786
    REVTYPE TINYINT
787
);
788
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_EXTENSION_AUD;
789
CREATE CACHED TABLE PUBLIC.COLLECTION_IDENTIFIER(
790
    COLLECTION_ID INTEGER NOT NULL,
791
    IDENTIFIERS_ID INTEGER NOT NULL,
792
    SORTINDEX INTEGER NOT NULL
793
);
794
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_IDENTIFIER;
795
CREATE CACHED TABLE PUBLIC.COLLECTION_IDENTIFIER_AUD(
796
    REV INTEGER NOT NULL,
797
    COLLECTION_ID INTEGER NOT NULL,
798
    IDENTIFIERS_ID INTEGER NOT NULL,
799
    SORTINDEX INTEGER NOT NULL,
800
    REVTYPE TINYINT
801
);
802
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_IDENTIFIER_AUD;
803
CREATE CACHED TABLE PUBLIC.COLLECTION_MARKER(
804
    COLLECTION_ID INTEGER NOT NULL,
805
    MARKERS_ID INTEGER NOT NULL
806
);
807
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MARKER;
808
CREATE CACHED TABLE PUBLIC.COLLECTION_MARKER_AUD(
809
    REV INTEGER NOT NULL,
810
    COLLECTION_ID INTEGER NOT NULL,
811
    MARKERS_ID INTEGER NOT NULL,
812
    REVTYPE TINYINT
813
);
814
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MARKER_AUD;
815
CREATE CACHED TABLE PUBLIC.COLLECTION_MEDIA(
816
    COLLECTION_ID INTEGER NOT NULL,
817
    MEDIA_ID INTEGER NOT NULL
818
);
819
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MEDIA;
820
CREATE CACHED TABLE PUBLIC.COLLECTION_MEDIA_AUD(
821
    REV INTEGER NOT NULL,
822
    COLLECTION_ID INTEGER NOT NULL,
823
    MEDIA_ID INTEGER NOT NULL,
824
    REVTYPE TINYINT
825
);
826
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MEDIA_AUD;
827
CREATE CACHED TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE(
828
    COLLECTION_ID INTEGER NOT NULL,
829
    SOURCES_ID INTEGER NOT NULL
830
);
831
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ORIGINALSOURCEBASE;
832
CREATE CACHED TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD(
833
    REV INTEGER NOT NULL,
834
    COLLECTION_ID INTEGER NOT NULL,
835
    SOURCES_ID INTEGER NOT NULL,
836
    REVTYPE TINYINT
837
);
838
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD;
839
CREATE CACHED TABLE PUBLIC.COLLECTION_RIGHTSINFO(
840
    COLLECTION_ID INTEGER NOT NULL,
841
    RIGHTS_ID INTEGER NOT NULL
842
);
843
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_RIGHTSINFO;
844
CREATE CACHED TABLE PUBLIC.COLLECTION_RIGHTSINFO_AUD(
845
    REV INTEGER NOT NULL,
846
    COLLECTION_ID INTEGER NOT NULL,
847
    RIGHTS_ID INTEGER NOT NULL,
848
    REVTYPE TINYINT
849
);
850
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_RIGHTSINFO_AUD;
851
CREATE CACHED TABLE PUBLIC.CREDIT(
852
    ID INTEGER NOT NULL,
853
    CREATED TIMESTAMP,
854
    UUID VARCHAR(36),
855
    UPDATED TIMESTAMP,
856
    TEXT CLOB,
857
    ABBREVIATEDTEXT VARCHAR(255),
858
    CREATEDBY_ID INTEGER,
859
    UPDATEDBY_ID INTEGER,
860
    LANGUAGE_ID INTEGER,
861
    AGENT_ID INTEGER
862
);
863
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT;
864
CREATE CACHED TABLE PUBLIC.CREDIT_AUD(
865
    ID INTEGER NOT NULL,
866
    REV INTEGER NOT NULL,
867
    REVTYPE TINYINT,
868
    CREATED TIMESTAMP,
869
    UUID VARCHAR(36),
870
    UPDATED TIMESTAMP,
871
    TEXT CLOB,
872
    ABBREVIATEDTEXT VARCHAR(255),
873
    CREATEDBY_ID INTEGER,
874
    UPDATEDBY_ID INTEGER,
875
    LANGUAGE_ID INTEGER,
876
    AGENT_ID INTEGER
877
);
878
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_AUD;
879
CREATE CACHED TABLE PUBLIC.CREDIT_ANNOTATION(
880
    CREDIT_ID INTEGER NOT NULL,
881
    ANNOTATIONS_ID INTEGER NOT NULL
882
);
883
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_ANNOTATION;
884
CREATE CACHED TABLE PUBLIC.CREDIT_ANNOTATION_AUD(
885
    REV INTEGER NOT NULL,
886
    CREDIT_ID INTEGER NOT NULL,
887
    ANNOTATIONS_ID INTEGER NOT NULL,
888
    REVTYPE TINYINT
889
);
890
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_ANNOTATION_AUD;
891
CREATE CACHED TABLE PUBLIC.CREDIT_MARKER(
892
    CREDIT_ID INTEGER NOT NULL,
893
    MARKERS_ID INTEGER NOT NULL
894
);
895
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_MARKER;
896
CREATE CACHED TABLE PUBLIC.CREDIT_MARKER_AUD(
897
    REV INTEGER NOT NULL,
898
    CREDIT_ID INTEGER NOT NULL,
899
    MARKERS_ID INTEGER NOT NULL,
900
    REVTYPE TINYINT
901
);
902
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_MARKER_AUD;
903
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE(
904
    DTYPE VARCHAR(31) NOT NULL,
905
    ID INTEGER NOT NULL,
906
    CREATED TIMESTAMP,
907
    UUID VARCHAR(36),
908
    UPDATED TIMESTAMP,
909
    TERMTYPE VARCHAR(4),
910
    IDINVOCABULARY VARCHAR(255),
911
        SYMBOL VARCHAR(30),
912
        SYMBOL2 VARCHAR(30),
913
        INVERSESYMBOL VARCHAR(30),
914
    LSID_AUTHORITY VARCHAR(255),
915
    LSID_LSID VARCHAR(255),
916
    LSID_NAMESPACE VARCHAR(255),
917
    LSID_OBJECT VARCHAR(255),
918
    LSID_REVISION VARCHAR(255),
919
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
920
    TITLECACHE VARCHAR(255),
921
    URI CLOB,
922
    ISO639_1 VARCHAR(2),
923
    RANKCLASS VARCHAR(4) NOT NULL,
924
    ISTECHNICAL BOOLEAN,
925
    ABSENCETERM BOOLEAN NOT NULL,
926
    ORDERINDEX INTEGER,
927
    SYMMETRICAL BOOLEAN,
928
    TRANSITIVE BOOLEAN,
929
    DEFAULTCOLOR VARCHAR(255),
930
    SUPPORTSCATEGORICALDATA BOOLEAN,
931
    SUPPORTSCOMMONTAXONNAME BOOLEAN,
932
    SUPPORTSDISTRIBUTION BOOLEAN,
933
    SUPPORTSINDIVIDUALASSOCIATION BOOLEAN,
934
    SUPPORTSQUANTITATIVEDATA BOOLEAN,
935
    SUPPORTSTAXONINTERACTION BOOLEAN,
936
    SUPPORTSTEXTDATA BOOLEAN,
937
    POINTAPPROXIMATION_ERRORRADIUS INTEGER,
938
    POINTAPPROXIMATION_LATITUDE DOUBLE,
939
    POINTAPPROXIMATION_LONGITUDE DOUBLE,
940
    VALIDPERIOD_END VARCHAR(255),
941
    VALIDPERIOD_FREETEXT VARCHAR(255),
942
    VALIDPERIOD_START VARCHAR(255),
943
    ISO3166_A2 VARCHAR(2),
944
    CREATEDBY_ID INTEGER,
945
    UPDATEDBY_ID INTEGER,
946
    KINDOF_ID INTEGER,
947
    PARTOF_ID INTEGER,
948
    VOCABULARY_ID INTEGER,
949
    LEVEL_ID INTEGER,
950
    POINTAPPROXIMATION_REFERENCESYSTEM_ID INTEGER,
951
    SHAPE_ID INTEGER,
952
    TYPE_ID INTEGER,
953
        STRUCTURE_ID INTEGER,
954
        PROPERTY_ID INTEGER,
955
);
956
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE;
957
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_AUD(
958
    DTYPE VARCHAR(31) NOT NULL,
959
    ID INTEGER NOT NULL,
960
    REV INTEGER NOT NULL,
961
    REVTYPE TINYINT,
962
    CREATED TIMESTAMP,
963
    UUID VARCHAR(36),
964
    UPDATED TIMESTAMP,
965
    TERMTYPE VARCHAR(4),
966
    IDINVOCABULARY VARCHAR(255),
967
        SYMBOL VARCHAR(30),
968
        SYMBOL2 VARCHAR(30),
969
        INVERSESYMBOL VARCHAR(30),
970
    LSID_AUTHORITY VARCHAR(255),
971
    LSID_LSID VARCHAR(255),
972
    LSID_NAMESPACE VARCHAR(255),
973
    LSID_OBJECT VARCHAR(255),
974
    LSID_REVISION VARCHAR(255),
975
    PROTECTEDTITLECACHE BOOLEAN,
976
    TITLECACHE VARCHAR(255),
977
    URI CLOB,
978
    CREATEDBY_ID INTEGER,
979
    UPDATEDBY_ID INTEGER,
980
    KINDOF_ID INTEGER,
981
    PARTOF_ID INTEGER,
982
    VOCABULARY_ID INTEGER,
983
    ORDERINDEX INTEGER,
984
    ISO639_1 VARCHAR(2),
985
    RANKCLASS VARCHAR(4) NOT NULL,
986
    SUPPORTSCATEGORICALDATA BOOLEAN,
987
    SUPPORTSCOMMONTAXONNAME BOOLEAN,
988
    SUPPORTSDISTRIBUTION BOOLEAN,
989
    SUPPORTSINDIVIDUALASSOCIATION BOOLEAN,
990
    SUPPORTSQUANTITATIVEDATA BOOLEAN,
991
    SUPPORTSTAXONINTERACTION BOOLEAN,
992
    SUPPORTSTEXTDATA BOOLEAN,
993
    SYMMETRICAL BOOLEAN,
994
    TRANSITIVE BOOLEAN,
995
    ISTECHNICAL BOOLEAN,
996
    ABSENCETERM BOOLEAN NOT NULL,
997
    DEFAULTCOLOR VARCHAR(255),
998
    POINTAPPROXIMATION_ERRORRADIUS INTEGER,
999
    POINTAPPROXIMATION_LATITUDE DOUBLE,
1000
    POINTAPPROXIMATION_LONGITUDE DOUBLE,
1001
    VALIDPERIOD_END VARCHAR(255),
1002
    VALIDPERIOD_FREETEXT VARCHAR(255),
1003
    VALIDPERIOD_START VARCHAR(255),
1004
    ISO3166_A2 VARCHAR(2),
1005
         LEVEL_ID INTEGER,
1006
    POINTAPPROXIMATION_REFERENCESYSTEM_ID INTEGER,
1007
    SHAPE_ID INTEGER,
1008
    TYPE_ID INTEGER,
1009
    STRUCTURE_ID INTEGER,
1010
        PROPERTY_ID INTEGER,
1011
);
1012
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_AUD;
1013
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION(
1014
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1015
    ANNOTATIONS_ID INTEGER NOT NULL
1016
);
1017
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION;
1018
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD(
1019
    REV INTEGER NOT NULL,
1020
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1021
    ANNOTATIONS_ID INTEGER NOT NULL,
1022
    REVTYPE TINYINT
1023
);
1024
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD;
1025
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT(
1026
    COUNTRY_ID INTEGER NOT NULL,
1027
    CONTINENTS_ID INTEGER NOT NULL
1028
);
1029
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT;
1030
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD(
1031
    REV INTEGER NOT NULL,
1032
    COUNTRY_ID INTEGER NOT NULL,
1033
    CONTINENTS_ID INTEGER NOT NULL,
1034
    REVTYPE TINYINT
1035
);
1036
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD;
1037
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT(
1038
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1039
    CREDITS_ID INTEGER NOT NULL,
1040
    SORTINDEX INTEGER NOT NULL
1041
);
1042
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT;
1043
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT_AUD(
1044
    REV INTEGER NOT NULL,
1045
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1046
    CREDITS_ID INTEGER NOT NULL,
1047
    SORTINDEX INTEGER NOT NULL,
1048
    REVTYPE TINYINT
1049
);
1050
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT_AUD;
1051
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION(
1052
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1053
    EXTENSIONS_ID INTEGER NOT NULL
1054
);
1055
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION;
1056
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD(
1057
    REV INTEGER NOT NULL,
1058
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1059
    EXTENSIONS_ID INTEGER NOT NULL,
1060
    REVTYPE TINYINT
1061
);
1062
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD;
1063
                                                                                                     
1064
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_IDENTIFIER(
1065
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1066
    IDENTIFIERS_ID INTEGER NOT NULL,
1067
    SORTINDEX INTEGER NOT NULL
1068
);
1069
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_IDENTIFIER;
1070
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD(
1071
    REV INTEGER NOT NULL,
1072
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1073
    IDENTIFIERS_ID INTEGER NOT NULL,
1074
    SORTINDEX INTEGER NOT NULL,
1075
    REVTYPE TINYINT
1076
);
1077
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD;
1078

    
1079
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MARKER(
1080
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1081
    MARKERS_ID INTEGER NOT NULL
1082
);
1083
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MARKER;
1084
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MARKER_AUD(
1085
    REV INTEGER NOT NULL,
1086
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1087
    MARKERS_ID INTEGER NOT NULL,
1088
    REVTYPE TINYINT
1089
);
1090
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MARKER_AUD;
1091
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT(
1092
    FEATURE_ID INTEGER NOT NULL,
1093
    RECOMMENDEDMEASUREMENTUNITS_ID INTEGER NOT NULL
1094
);
1095
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT;
1096
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD(
1097
    REV INTEGER NOT NULL,
1098
    FEATURE_ID INTEGER NOT NULL,
1099
    RECOMMENDEDMEASUREMENTUNITS_ID INTEGER NOT NULL,
1100
    REVTYPE TINYINT
1101
);
1102
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD;
1103
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEDIA(
1104
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1105
    MEDIA_ID INTEGER NOT NULL
1106
);
1107
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEDIA;
1108
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEDIA_AUD(
1109
    REV INTEGER NOT NULL,
1110
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1111
    MEDIA_ID INTEGER NOT NULL,
1112
    REVTYPE TINYINT
1113
);
1114
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEDIA_AUD;
1115
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE(
1116
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1117
    SOURCES_ID INTEGER NOT NULL
1118
);
1119
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE;
1120
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD(
1121
    REV INTEGER NOT NULL,
1122
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1123
    SOURCES_ID INTEGER NOT NULL,
1124
    REVTYPE TINYINT
1125
);
1126
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD;
1127
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION(
1128
    FEATURE_ID INTEGER NOT NULL,
1129
    RECOMMENDEDMODIFIERENUMERATION_ID INTEGER NOT NULL
1130
);
1131
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION;
1132
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD(
1133
    REV INTEGER NOT NULL,
1134
    FEATURE_ID INTEGER NOT NULL,
1135
    RECOMMENDEDMODIFIERENUMERATION_ID INTEGER NOT NULL,
1136
    REVTYPE TINYINT
1137
);
1138
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD;
1139
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION(
1140
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1141
    REPRESENTATIONS_ID INTEGER NOT NULL
1142
);
1143
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_REPRESENTATION;
1144
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD(
1145
    REV INTEGER NOT NULL,
1146
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1147
    REPRESENTATIONS_ID INTEGER NOT NULL,
1148
    REVTYPE TINYINT
1149
);
1150
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD;
1151
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO(
1152
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1153
    RIGHTS_ID INTEGER NOT NULL
1154
);
1155
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RIGHTSINFO;
1156
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD(
1157
    REV INTEGER NOT NULL,
1158
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1159
    RIGHTS_ID INTEGER NOT NULL,
1160
    REVTYPE TINYINT
1161
);
1162
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD;
1163
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE(
1164
    FEATURE_ID INTEGER NOT NULL,
1165
    RECOMMENDEDSTATISTICALMEASURES_ID INTEGER NOT NULL
1166
);
1167
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE;
1168
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD(
1169
    REV INTEGER NOT NULL,
1170
    FEATURE_ID INTEGER NOT NULL,
1171
    RECOMMENDEDSTATISTICALMEASURES_ID INTEGER NOT NULL,
1172
    REVTYPE TINYINT
1173
);
1174
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD;
1175
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION(
1176
    FEATURE_ID INTEGER NOT NULL,
1177
    SUPPORTEDCATEGORICALENUMERATIONS_ID INTEGER NOT NULL
1178
);
1179
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION;
1180
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD(
1181
    REV INTEGER NOT NULL,
1182
    FEATURE_ID INTEGER NOT NULL,
1183
    SUPPORTEDCATEGORICALENUMERATIONS_ID INTEGER NOT NULL,
1184
    REVTYPE TINYINT
1185
);
1186
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD;
1187
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY(
1188
    NAMEDAREA_ID INTEGER NOT NULL,
1189
    COUNTRIES_ID INTEGER NOT NULL
1190
);
1191
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_COUNTRY;
1192
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD(
1193
    REV INTEGER NOT NULL,
1194
    NAMEDAREA_ID INTEGER NOT NULL,
1195
    COUNTRIES_ID INTEGER NOT NULL,
1196
    REVTYPE TINYINT
1197
);
1198
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD;
1199
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT(
1200
    ID INTEGER NOT NULL,
1201
    CREATED TIMESTAMP,
1202
    UUID VARCHAR(36),
1203
    UPDATED TIMESTAMP,
1204
    DESCRIPTION VARCHAR(255),
1205
    TIMEPERIOD_END VARCHAR(255),
1206
    TIMEPERIOD_FREETEXT VARCHAR(255),
1207
    TIMEPERIOD_START VARCHAR(255),
1208
    CREATEDBY_ID INTEGER,
1209
    UPDATEDBY_ID INTEGER,
1210
    ACTOR_ID INTEGER,
1211
    INSTITUTION_ID INTEGER,
1212
        TYPE_ID INTEGER
1213
);
1214
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT;
1215
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_AUD(
1216
    ID INTEGER NOT NULL,
1217
    REV INTEGER NOT NULL,
1218
    REVTYPE TINYINT,
1219
    CREATED TIMESTAMP,
1220
    UUID VARCHAR(36),
1221
    UPDATED TIMESTAMP,
1222
    DESCRIPTION VARCHAR(255),
1223
    TIMEPERIOD_END VARCHAR(255),
1224
    TIMEPERIOD_FREETEXT VARCHAR(255),
1225
    TIMEPERIOD_START VARCHAR(255),
1226
    CREATEDBY_ID INTEGER,
1227
    UPDATEDBY_ID INTEGER,
1228
    ACTOR_ID INTEGER,
1229
    INSTITUTION_ID INTEGER,
1230
        TYPE_ID INTEGER
1231
);
1232
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_AUD;
1233
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION(
1234
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1235
    ANNOTATIONS_ID INTEGER NOT NULL
1236
);
1237
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_ANNOTATION;
1238
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD(
1239
    REV INTEGER NOT NULL,
1240
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1241
    ANNOTATIONS_ID INTEGER NOT NULL,
1242
    REVTYPE TINYINT
1243
);
1244
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD;
1245
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_MARKER(
1246
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1247
    MARKERS_ID INTEGER NOT NULL
1248
);
1249
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_MARKER;
1250
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_MARKER_AUD(
1251
    REV INTEGER NOT NULL,
1252
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1253
    MARKERS_ID INTEGER NOT NULL,
1254
    REVTYPE TINYINT
1255
);
1256
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_MARKER_AUD;
1257
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE(
1258
    DTYPE VARCHAR(31) NOT NULL,
1259
    ID INTEGER NOT NULL,
1260
    CREATED TIMESTAMP,
1261
    UUID VARCHAR(36),
1262
    UPDATED TIMESTAMP,
1263
    LSID_AUTHORITY VARCHAR(255),
1264
    LSID_LSID VARCHAR(255),
1265
    LSID_NAMESPACE VARCHAR(255),
1266
    LSID_OBJECT VARCHAR(255),
1267
    LSID_REVISION VARCHAR(255),
1268
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
1269
    TITLECACHE VARCHAR(255),
1270
    IMAGEGALLERY BOOLEAN NOT NULL,
1271
        ISDEFAULT BOOLEAN NOT NULL,
1272
    CREATEDBY_ID INTEGER,
1273
    UPDATEDBY_ID INTEGER,
1274
    SPECIMEN_ID INTEGER,
1275
    TAXON_ID INTEGER,
1276
    TAXONNAME_ID INTEGER
1277
);
1278
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE;
1279
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_AUD(
1280
    DTYPE VARCHAR(31) NOT NULL,
1281
    ID INTEGER NOT NULL,
1282
    REV INTEGER NOT NULL,
1283
    REVTYPE TINYINT,
1284
    CREATED TIMESTAMP,
1285
    UUID VARCHAR(36),
1286
    UPDATED TIMESTAMP,
1287
    LSID_AUTHORITY VARCHAR(255),
1288
    LSID_LSID VARCHAR(255),
1289
    LSID_NAMESPACE VARCHAR(255),
1290
    LSID_OBJECT VARCHAR(255),
1291
    LSID_REVISION VARCHAR(255),
1292
    PROTECTEDTITLECACHE BOOLEAN,
1293
    TITLECACHE VARCHAR(255),
1294
    IMAGEGALLERY BOOLEAN,
1295
        ISDEFAULT BOOLEAN,
1296
    CREATEDBY_ID INTEGER,
1297
    UPDATEDBY_ID INTEGER,
1298
    SPECIMEN_ID INTEGER,
1299
    TAXON_ID INTEGER,
1300
    TAXONNAME_ID INTEGER
1301
);
1302
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_AUD;
1303
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION(
1304
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1305
    ANNOTATIONS_ID INTEGER NOT NULL
1306
);
1307
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION;
1308
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD(
1309
    REV INTEGER NOT NULL,
1310
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1311
    ANNOTATIONS_ID INTEGER NOT NULL,
1312
    REVTYPE TINYINT
1313
);
1314
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD;
1315
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT(
1316
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1317
    CREDITS_ID INTEGER NOT NULL,
1318
    SORTINDEX INTEGER NOT NULL
1319
);
1320
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT;
1321
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT_AUD(
1322
    REV INTEGER NOT NULL,
1323
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1324
    CREDITS_ID INTEGER NOT NULL,
1325
    SORTINDEX INTEGER NOT NULL,
1326
    REVTYPE TINYINT
1327
);
1328
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT_AUD;
1329
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION(
1330
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1331
    EXTENSIONS_ID INTEGER NOT NULL
1332
);
1333
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION;
1334
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD(
1335
    REV INTEGER NOT NULL,
1336
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1337
    EXTENSIONS_ID INTEGER NOT NULL,
1338
    REVTYPE TINYINT
1339
);
1340
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD;
1341

    
1342
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER(
1343
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1344
    IDENTIFIERS_ID INTEGER NOT NULL,
1345
    SORTINDEX INTEGER NOT NULL
1346
);
1347
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER;
1348
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD(
1349
    REV INTEGER NOT NULL,
1350
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1351
    IDENTIFIERS_ID INTEGER NOT NULL,
1352
    SORTINDEX INTEGER NOT NULL,
1353
    REVTYPE TINYINT
1354
);
1355
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD;
1356

    
1357
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE(
1358
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1359
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL
1360
);
1361
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE;
1362
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD(
1363
    REV INTEGER NOT NULL,
1364
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1365
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL,
1366
    REVTYPE TINYINT
1367
);
1368
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE_AUD;
1369
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE(
1370
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1371
    GEOSCOPES_ID INTEGER NOT NULL
1372
);
1373
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE;
1374
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD(
1375
    REV INTEGER NOT NULL,
1376
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1377
    GEOSCOPES_ID INTEGER NOT NULL,
1378
    REVTYPE TINYINT
1379
);
1380
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD;
1381
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER(
1382
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1383
    MARKERS_ID INTEGER NOT NULL
1384
);
1385
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER;
1386
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD(
1387
    REV INTEGER NOT NULL,
1388
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1389
    MARKERS_ID INTEGER NOT NULL,
1390
    REVTYPE TINYINT
1391
);
1392
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER_AUD;
1393
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE(
1394
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1395
    SOURCES_ID INTEGER NOT NULL
1396
);
1397
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE;
1398
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD(
1399
    REV INTEGER NOT NULL,
1400
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1401
    SOURCES_ID INTEGER NOT NULL,
1402
    REVTYPE TINYINT
1403
);
1404
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD;
1405
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE(
1406
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1407
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL
1408
);
1409
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE;
1410
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD(
1411
    REV INTEGER NOT NULL,
1412
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1413
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL,
1414
    REVTYPE TINYINT
1415
);
1416
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD;
1417
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO(
1418
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1419
    RIGHTS_ID INTEGER NOT NULL
1420
);
1421
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO;
1422
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD(
1423
    REV INTEGER NOT NULL,
1424
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1425
    RIGHTS_ID INTEGER NOT NULL,
1426
    REVTYPE TINYINT
1427
);
1428
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD;
1429
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE(
1430
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1431
    SCOPES_ID INTEGER NOT NULL
1432
);
1433
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE;
1434
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD(
1435
    REV INTEGER NOT NULL,
1436
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1437
    SCOPES_ID INTEGER NOT NULL,
1438
    REVTYPE TINYINT
1439
);
1440
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE_AUD;
1441
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE(
1442
    DTYPE VARCHAR(31) NOT NULL,
1443
    ID INTEGER NOT NULL,
1444
    CREATED TIMESTAMP,
1445
    UUID VARCHAR(36),
1446
    UPDATED TIMESTAMP,
1447
    NAME VARCHAR(255),
1448
    TIMEPERIOD_START VARCHAR(255),
1449
    TIMEPERIOD_END VARCHAR(255),
1450
    TIMEPERIOD_FREETEXT VARCHAR(255),
1451
    ORDERRELEVANT BOOLEAN,
1452
--  MINIMUM DOUBLE,
1453
--        MAXIMUM DOUBLE,
1454
--        AVERAGE DOUBLE,
1455
--        TYPCALLOWERBOUNDARY DOUBLE,
1456
--        TYPCALHIGHERBOUNDARY DOUBLE,
1457
--        VARIANCE DOUBLE,
1458
--        STANDARDDEVIATION DOUBLE,
1459
--        SINGLEVALUE DOUBLE,
1460
--        SAMPLESIZE INTEGER,
1461
        UNKNOWNDATA BOOLEAN,
1462
        SORTINDEX INTEGER,
1463
    CREATEDBY_ID INTEGER,
1464
    UPDATEDBY_ID INTEGER,
1465
    FEATURE_ID INTEGER,
1466
    INDESCRIPTION_ID INTEGER,
1467
    AREA_ID INTEGER,
1468
    LANGUAGE_ID INTEGER,
1469
    STATUS_ID INTEGER,
1470
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1471
    UNIT_ID INTEGER,
1472
    TAXON2_ID INTEGER,
1473
    FORMAT_ID INTEGER,
1474
        
1475
);
1476
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE;
1477
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD(
1478
    DTYPE VARCHAR(31) NOT NULL,
1479
    ID INTEGER NOT NULL,
1480
    REV INTEGER NOT NULL,
1481
    REVTYPE TINYINT,
1482
    CREATED TIMESTAMP,
1483
    UUID VARCHAR(36),
1484
    UPDATED TIMESTAMP,
1485
    NAME VARCHAR(255),
1486
    TIMEPERIOD_START VARCHAR(255),
1487
    TIMEPERIOD_END VARCHAR(255),
1488
    TIMEPERIOD_FREETEXT VARCHAR(255),
1489
--  MINIMUM DOUBLE,
1490
--        MAXIMUM DOUBLE,
1491
--        AVERAGE DOUBLE,
1492
--        TYPCALLOWERBOUNDARY DOUBLE,
1493
--        TYPCALHIGHERBOUNDARY DOUBLE,
1494
--        VARIANCE DOUBLE,
1495
--        STANDARDDEVIATION DOUBLE,
1496
--        SINGLEVALUE DOUBLE,
1497
--        SAMPLESIZE INTEGER,
1498
    ORDERRELEVANT BOOLEAN,
1499
        UNKNOWNDATA BOOLEAN,
1500
    SORTINDEX INTEGER,
1501
        CREATEDBY_ID INTEGER,
1502
    UPDATEDBY_ID INTEGER,
1503
    FEATURE_ID INTEGER,
1504
    INDESCRIPTION_ID INTEGER,
1505
    AREA_ID INTEGER,
1506
    STATUS_ID INTEGER,
1507
    TAXON2_ID INTEGER,
1508
    UNIT_ID INTEGER,
1509
    FORMAT_ID INTEGER,
1510
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1511
    LANGUAGE_ID INTEGER
1512
);
1513
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_AUD;
1514
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION(
1515
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1516
    ANNOTATIONS_ID INTEGER NOT NULL
1517
);
1518
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION;
1519
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD(
1520
    REV INTEGER NOT NULL,
1521
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1522
    ANNOTATIONS_ID INTEGER NOT NULL,
1523
    REVTYPE TINYINT
1524
);
1525
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD;
1526
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING(
1527
    TEXTDATA_ID INTEGER NOT NULL,
1528
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1529
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL
1530
);
1531
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING;
1532
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD(
1533
    REV INTEGER NOT NULL,
1534
    TEXTDATA_ID INTEGER NOT NULL,
1535
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1536
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL,
1537
    REVTYPE TINYINT
1538
);
1539
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD;
1540
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER(
1541
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1542
    MARKERS_ID INTEGER NOT NULL
1543
);
1544
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER;
1545
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD(
1546
    REV INTEGER NOT NULL,
1547
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1548
    MARKERS_ID INTEGER NOT NULL,
1549
    REVTYPE TINYINT
1550
);
1551
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD;
1552
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA(
1553
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1554
    MEDIA_ID INTEGER NOT NULL,
1555
    SORTINDEX INTEGER NOT NULL
1556
);
1557
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA;
1558
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD(
1559
    REV INTEGER NOT NULL,
1560
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1561
    MEDIA_ID INTEGER NOT NULL,
1562
    SORTINDEX INTEGER NOT NULL,
1563
    REVTYPE TINYINT
1564
);
1565
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD;
1566
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER(
1567
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1568
    MODIFIERS_ID INTEGER NOT NULL
1569
);
1570
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER;
1571
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD(
1572
    REV INTEGER NOT NULL,
1573
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1574
    MODIFIERS_ID INTEGER NOT NULL,
1575
    REVTYPE TINYINT
1576
);
1577
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD;
1578
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT(
1579
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1580
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1581
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
1582
);
1583
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT;
1584
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD(
1585
    REV INTEGER NOT NULL,
1586
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1587
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1588
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
1589
    REVTYPE TINYINT
1590
);
1591
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD;
1592
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE(
1593
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1594
    SOURCES_ID INTEGER NOT NULL
1595
);
1596
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE;
1597
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD(
1598
    REV INTEGER NOT NULL,
1599
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1600
    SOURCES_ID INTEGER NOT NULL,
1601
    REVTYPE TINYINT
1602
);
1603
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD;
1604
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET(
1605
    DTYPE VARCHAR(31) NOT NULL,
1606
    ID INTEGER NOT NULL,
1607
    CREATED TIMESTAMP,
1608
    UUID VARCHAR(36),
1609
    UPDATED TIMESTAMP,
1610
    PROTECTEDTITLECACHE BOOLEAN,
1611
    TITLECACHE VARCHAR(255),
1612
        LSID_AUTHORITY VARCHAR(255),
1613
    LSID_LSID VARCHAR(255),
1614
    LSID_NAMESPACE VARCHAR(255),
1615
    LSID_OBJECT VARCHAR(255),
1616
    LSID_REVISION VARCHAR(255),
1617
    CREATEDBY_ID INTEGER,
1618
    UPDATEDBY_ID INTEGER,
1619
    DESCRIPTIVESYSTEM_ID INTEGER,
1620
        MAXRANK_ID INTEGER,
1621
        MINRANK_ID INTEGER
1622
);
1623
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET;
1624
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_AUD(
1625
    DTYPE VARCHAR(31) NOT NULL,
1626
    ID INTEGER NOT NULL,
1627
    REV INTEGER NOT NULL,
1628
    REVTYPE TINYINT,
1629
    CREATED TIMESTAMP,
1630
    UUID VARCHAR(36),
1631
    UPDATED TIMESTAMP,
1632
    PROTECTEDTITLECACHE BOOLEAN,
1633
    TITLECACHE VARCHAR(255),
1634
        LSID_AUTHORITY VARCHAR(255),
1635
    LSID_LSID VARCHAR(255),
1636
    LSID_NAMESPACE VARCHAR(255),
1637
    LSID_OBJECT VARCHAR(255),
1638
    LSID_REVISION VARCHAR(255),
1639
    CREATEDBY_ID INTEGER,
1640
    UPDATEDBY_ID INTEGER,
1641
    DESCRIPTIVESYSTEM_ID INTEGER,
1642
        MAXRANK_ID INTEGER,
1643
        MINRANK_ID INTEGER
1644
);
1645
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_AUD;
1646
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ANNOTATION(
1647
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1648
    ANNOTATIONS_ID INTEGER NOT NULL
1649
);
1650
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ANNOTATION;
1651
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ANNOTATION_AUD(
1652
    REV INTEGER NOT NULL,
1653
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1654
    ANNOTATIONS_ID INTEGER NOT NULL,
1655
    REVTYPE TINYINT
1656
);
1657
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ANNOTATION_AUD;
1658
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_CREDIT(
1659
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1660
    CREDITS_ID INTEGER NOT NULL,
1661
    SORTINDEX INTEGER NOT NULL
1662
);
1663
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_CREDIT;
1664
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_CREDIT_AUD(
1665
    REV INTEGER NOT NULL,
1666
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1667
    CREDITS_ID INTEGER NOT NULL,
1668
    SORTINDEX INTEGER NOT NULL,
1669
    REVTYPE TINYINT
1670
);
1671
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_CREDIT_AUD;
1672
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE(
1673
    DESCRIPTIVEDATASETS_ID INTEGER NOT NULL,
1674
    DESCRIPTIONS_ID INTEGER NOT NULL
1675
);
1676
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE;
1677
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE_AUD(
1678
    REV INTEGER NOT NULL,
1679
    DESCRIPTIVEDATASETS_ID INTEGER NOT NULL,
1680
    DESCRIPTIONS_ID INTEGER NOT NULL,
1681
    REVTYPE TINYINT
1682
);
1683
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE_AUD;
1684
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_EXTENSION(
1685
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1686
    EXTENSIONS_ID INTEGER NOT NULL
1687
);
1688
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_EXTENSION;
1689
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTIVEDATASET_AUD(
1690
    REV INTEGER NOT NULL,
1691
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1692
    EXTENSIONS_ID INTEGER NOT NULL,
1693
    REVTYPE TINYINT
1694
);
1695
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_EXTENSION_AUD;
1696
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER(
1697
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1698
    IDENTIFIERS_ID INTEGER NOT NULL,
1699
    SORTINDEX INTEGER NOT NULL
1700
);
1701
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER;
1702
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER_AUD(
1703
    REV INTEGER NOT NULL,
1704
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1705
    IDENTIFIERS_ID INTEGER NOT NULL,
1706
    SORTINDEX INTEGER NOT NULL,
1707
    REVTYPE TINYINT
1708
);
1709
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER_AUD;
1710
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_MARKER(
1711
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1712
    MARKERS_ID INTEGER NOT NULL
1713
);
1714
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_MARKER;
1715
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_MARKER_AUD(
1716
    REV INTEGER NOT NULL,
1717
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1718
    MARKERS_ID INTEGER NOT NULL,
1719
    REVTYPE TINYINT
1720
);
1721
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_MARKER_AUD;
1722
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA(
1723
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1724
    GEOFILTER_ID INTEGER NOT NULL
1725
);
1726
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA;
1727
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA_AUD(
1728
    REV INTEGER NOT NULL,
1729
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1730
    GEOFILTER_ID INTEGER NOT NULL,
1731
    REVTYPE TINYINT
1732
);
1733
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA_AUD;
1734
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE(
1735
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1736
    SOURCES_ID INTEGER NOT NULL
1737
);
1738
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE;
1739
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE_AUD(
1740
    REV INTEGER NOT NULL,
1741
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1742
    SOURCES_ID INTEGER NOT NULL,
1743
    REVTYPE TINYINT
1744
);
1745
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE_AUD;
1746
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION(
1747
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1748
    REPRESENTATIONS_ID INTEGER NOT NULL
1749
);
1750
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION;
1751
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION_AUD(
1752
    REV INTEGER NOT NULL,
1753
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1754
    REPRESENTATIONS_ID INTEGER NOT NULL,
1755
    REVTYPE TINYINT
1756
);
1757
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION_AUD;
1758
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_RIGHTSINFO(
1759
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1760
    RIGHTS_ID INTEGER NOT NULL
1761
);
1762
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO;
1763
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_RIGHTSINFO_AUD(
1764
    REV INTEGER NOT NULL,
1765
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1766
    RIGHTS_ID INTEGER NOT NULL,
1767
    REVTYPE TINYINT
1768
);
1769
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO_AUD;
1770
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_TAXONNODE(
1771
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1772
    TAXONSUBTREEFILTER_ID INTEGER NOT NULL
1773
);
1774
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_TAXONNODE;
1775
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_TAXONNODE_AUD(
1776
    REV INTEGER NOT NULL,
1777
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1778
    TAXONSUBTREEFILTER_ID INTEGER NOT NULL,
1779
    REVTYPE TINYINT
1780
);
1781
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_TAXONNODE_AUD;
1782
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT(
1783
    ID INTEGER NOT NULL,
1784
    CREATED TIMESTAMP,
1785
    UUID VARCHAR(36),
1786
    UPDATED TIMESTAMP,
1787
    DESCRIPTION VARCHAR(255),
1788
    TIMEPERIOD_END VARCHAR(255),
1789
    TIMEPERIOD_FREETEXT VARCHAR(255),
1790
    TIMEPERIOD_START VARCHAR(255),
1791
    PREFERREDFLAG BOOLEAN NOT NULL,
1792
    CREATEDBY_ID INTEGER,
1793
    UPDATEDBY_ID INTEGER,
1794
    ACTOR_ID INTEGER,
1795
    IDENTIFIEDUNIT_ID INTEGER,
1796
    MODIFIER_ID INTEGER,
1797
    TAXON_ID INTEGER,
1798
        TAXONNAME_ID INTEGER
1799
);
1800
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT;
1801
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_AUD(
1802
    ID INTEGER NOT NULL,
1803
    REV INTEGER NOT NULL,
1804
    REVTYPE TINYINT,
1805
    CREATED TIMESTAMP,
1806
    UUID VARCHAR(36),
1807
    UPDATED TIMESTAMP,
1808
    DESCRIPTION VARCHAR(255),
1809
    TIMEPERIOD_END VARCHAR(255),
1810
    TIMEPERIOD_FREETEXT VARCHAR(255),
1811
    TIMEPERIOD_START VARCHAR(255),
1812
    PREFERREDFLAG BOOLEAN,
1813
    CREATEDBY_ID INTEGER,
1814
    UPDATEDBY_ID INTEGER,
1815
    ACTOR_ID INTEGER,
1816
    IDENTIFIEDUNIT_ID INTEGER,
1817
    MODIFIER_ID INTEGER,
1818
    TAXON_ID INTEGER,
1819
        TAXONNAME_ID INTEGER
1820
);
1821
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_AUD;
1822
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION(
1823
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1824
    ANNOTATIONS_ID INTEGER NOT NULL
1825
);
1826
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION;
1827
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD(
1828
    REV INTEGER NOT NULL,
1829
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1830
    ANNOTATIONS_ID INTEGER NOT NULL,
1831
    REVTYPE TINYINT
1832
);
1833
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD;
1834
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER(
1835
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1836
    MARKERS_ID INTEGER NOT NULL
1837
);
1838
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER;
1839
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD(
1840
    REV INTEGER NOT NULL,
1841
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1842
    MARKERS_ID INTEGER NOT NULL,
1843
    REVTYPE TINYINT
1844
);
1845
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER_AUD;
1846
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE(
1847
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1848
    SETOFREFERENCES_ID INTEGER NOT NULL
1849
);
1850
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE;
1851
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD(
1852
    REV INTEGER NOT NULL,
1853
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1854
    SETOFREFERENCES_ID INTEGER NOT NULL,
1855
    REVTYPE TINYINT
1856
);
1857

    
1858
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD;
1859
CREATE CACHED TABLE PUBLIC.DNAQUALITY(
1860
    ID INTEGER NOT NULL,
1861
    CREATED TIMESTAMP,
1862
    UUID VARCHAR(36) NOT NULL,
1863
    UPDATED TIMESTAMP,
1864
    PURIFICATIONMETHOD VARCHAR(255),
1865
    RATIOOFABSORBANCE260_230 DOUBLE,
1866
    RATIOOFABSORBANCE260_280 DOUBLE,
1867
    QUALITYCHECKDATE TIMESTAMP,
1868
    CONCENTRATION DOUBLE,
1869
    CREATEDBY_ID INTEGER,
1870
    UPDATEDBY_ID INTEGER,
1871
    CONCENTRATIONUNIT_ID INTEGER,
1872
    QUALITYTERM_ID INTEGER,
1873
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1874
);
1875
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY;
1876
CREATE CACHED TABLE PUBLIC.DNAQUALITY_AUD(
1877
    ID INTEGER NOT NULL,
1878
    REV INTEGER NOT NULL,
1879
    REVTYPE TINYINT,
1880
    CREATED TIMESTAMP,
1881
    UUID VARCHAR(36) NOT NULL,
1882
    UPDATED TIMESTAMP,
1883
    PURIFICATIONMETHOD VARCHAR(255),
1884
    RATIOOFABSORBANCE260_230 DOUBLE,
1885
    RATIOOFABSORBANCE260_280 DOUBLE,
1886
    QUALITYCHECKDATE TIMESTAMP,
1887
    CONCENTRATION DOUBLE,
1888
    CREATEDBY_ID INTEGER,
1889
    UPDATEDBY_ID INTEGER,
1890
    CONCENTRATIONUNIT_ID INTEGER,
1891
    QUALITYTERM_ID INTEGER,
1892
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1893
);
1894
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY_AUD;
1895

    
1896
CREATE CACHED TABLE PUBLIC.ENTITYVALIDATION(
1897
    ID INTEGER NOT NULL,
1898
    UUID VARCHAR(36),
1899
    CREATED TIMESTAMP,
1900
    VALIDATEDENTITYID INTEGER,
1901
    VALIDATEDENTITYUUID VARCHAR(36),
1902
    VALIDATEDENTITYCLASS VARCHAR(255),
1903
    VALIDATIONCOUNT INTEGER,
1904
    UPDATED TIMESTAMP,
1905
    USERFRIENDLYDESCRIPTION VARCHAR(255),
1906
    USERFRIENDLYTYPENAME VARCHAR(255),
1907
    CREATEDBY_ID INTEGER,
1908
    UPDATEDBY_ID INTEGER,
1909
    CRUDEVENTTYPE VARCHAR(24),
1910
    STATUS VARCHAR(16)
1911
);
1912
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYVALIDATION;
1913

    
1914
CREATE CACHED TABLE PUBLIC.ENTITYCONSTRAINTVIOLATION(
1915
    ID INTEGER NOT NULL,
1916
    UUID VARCHAR(36),
1917
    CREATED TIMESTAMP,
1918
    PROPERTYPATH VARCHAR(255),
1919
    USERFRIENDLYFIELDNAME VARCHAR(255),
1920
    INVALIDVALUE VARCHAR(255),
1921
    SEVERITY VARCHAR(24),
1922
    MESSAGE VARCHAR(255),
1923
    VALIDATOR VARCHAR(255),
1924
    VALIDATIONGROUP VARCHAR(63),
1925
    CREATEDBY_ID INTEGER,
1926
    UPDATEDBY_ID INTEGER,
1927
    ENTITYVALIDATION_ID INTEGER
1928
);
1929
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYCONSTRAINTVIOLATION;
1930

    
1931
CREATE CACHED TABLE PUBLIC.EXTENSION(
1932
    ID INTEGER NOT NULL,
1933
    CREATED TIMESTAMP,
1934
    UUID VARCHAR(36),
1935
    UPDATED TIMESTAMP,
1936
    VALUE CLOB,
1937
    CREATEDBY_ID INTEGER,
1938
    UPDATEDBY_ID INTEGER,
1939
    TYPE_ID INTEGER
1940
);
1941
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION;
1942
CREATE CACHED TABLE PUBLIC.EXTENSION_AUD(
1943
    ID INTEGER NOT NULL,
1944
    REV INTEGER NOT NULL,
1945
    REVTYPE TINYINT,
1946
    CREATED TIMESTAMP,
1947
    UUID VARCHAR(36),
1948
    UPDATED TIMESTAMP,
1949
    VALUE CLOB,
1950
    CREATEDBY_ID INTEGER,
1951
    UPDATEDBY_ID INTEGER,
1952
    TYPE_ID INTEGER
1953
);
1954
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION_AUD;
1955
CREATE CACHED TABLE PUBLIC.EXTERNALLINK(
1956
    ID INTEGER NOT NULL,
1957
    CREATED TIMESTAMP,
1958
    UUID VARCHAR(36),
1959
    UPDATED TIMESTAMP,
1960
    SIZE INTEGER,
1961
    URI CLOB,
1962
        LINKTYPE VARCHAR(10),
1963
    CREATEDBY_ID INTEGER,
1964
    UPDATEDBY_ID INTEGER,
1965
    SORTINDEX INTEGER
1966
);
1967
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART;
1968
CREATE CACHED TABLE PUBLIC.EXTERNALLINK_AUD(
1969
    ID INTEGER NOT NULL,
1970
    REV INTEGER NOT NULL,
1971
    REVTYPE TINYINT,
1972
    CREATED TIMESTAMP,
1973
    UUID VARCHAR(36),
1974
    UPDATED TIMESTAMP,
1975
    SIZE INTEGER,
1976
    URI CLOB,
1977
        LINKTYPE VARCHAR(10),
1978
    CREATEDBY_ID INTEGER,
1979
    UPDATEDBY_ID INTEGER,
1980
);
1981
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART_AUD;
1982
CREATE CACHED TABLE PUBLIC.EXTERNALLINK_LANGUAGESTRING(
1983
    EXTERNALLINK_ID INTEGER NOT NULL,
1984
    DESCRIPTION_ID INTEGER NOT NULL,
1985
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
1986
);
1987
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTERNALLINK_LANGUAGESTRING;
1988
CREATE CACHED TABLE PUBLIC.EXTERNALLINK_LANGUAGESTRING_AUD(
1989
    REV INTEGER NOT NULL,
1990
    EXTERNALLINK_ID INTEGER NOT NULL,
1991
    DESCRIPTION_ID INTEGER NOT NULL,
1992
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
1993
    REVTYPE TINYINT
1994
);
1995
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTERNALLINK_LANGUAGESTRING_AUD;
1996
CREATE CACHED TABLE PUBLIC.FEATURENODE(
1997
    ID INTEGER NOT NULL,
1998
    CREATED TIMESTAMP,
1999
    UUID VARCHAR(36),
2000
    UPDATED TIMESTAMP,
2001
    SORTINDEX INTEGER,
2002
    TREEINDEX VARCHAR(255),
2003
    CREATEDBY_ID INTEGER,
2004
    UPDATEDBY_ID INTEGER,
2005
    FEATURE_ID INTEGER,
2006
    FEATURETREE_ID INTEGER,
2007
    PARENT_ID INTEGER
2008
);
2009
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE;
2010
CREATE CACHED TABLE PUBLIC.FEATURENODE_AUD(
2011
    ID INTEGER NOT NULL,
2012
    REV INTEGER NOT NULL,
2013
    REVTYPE TINYINT,
2014
    CREATED TIMESTAMP,
2015
    UUID VARCHAR(36),
2016
    UPDATED TIMESTAMP,
2017
    SORTINDEX INTEGER,
2018
    TREEINDEX VARCHAR(255),
2019
    CREATEDBY_ID INTEGER,
2020
    UPDATEDBY_ID INTEGER,
2021
    FEATURE_ID INTEGER,
2022
    FEATURETREE_ID INTEGER,
2023
    PARENT_ID INTEGER
2024
);
2025
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_AUD;
2026
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF(
2027
    FEATURENODE_ID INTEGER NOT NULL,
2028
    INAPPLICABLEIF_ID INTEGER NOT NULL
2029
);
2030
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF;
2031
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD(
2032
    REV INTEGER NOT NULL,
2033
    FEATURENODE_ID INTEGER NOT NULL,
2034
    INAPPLICABLEIF_ID INTEGER NOT NULL,
2035
    REVTYPE TINYINT
2036
);
2037
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD;
2038
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE(
2039
    FEATURENODE_ID INTEGER NOT NULL,
2040
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL
2041
);
2042
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE;
2043
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD(
2044
    REV INTEGER NOT NULL,
2045
    FEATURENODE_ID INTEGER NOT NULL,
2046
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL,
2047
    REVTYPE TINYINT
2048
);
2049
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD;
2050
CREATE CACHED TABLE PUBLIC.FEATURETREE(
2051
    ID INTEGER NOT NULL,
2052
    CREATED TIMESTAMP,
2053
    UUID VARCHAR(36),
2054
    UPDATED TIMESTAMP,
2055
    LSID_AUTHORITY VARCHAR(255),
2056
    LSID_LSID VARCHAR(255),
2057
    LSID_NAMESPACE VARCHAR(255),
2058
    LSID_OBJECT VARCHAR(255),
2059
    LSID_REVISION VARCHAR(255),
2060
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
2061
    TITLECACHE VARCHAR(255),
2062
    CREATEDBY_ID INTEGER,
2063
    UPDATEDBY_ID INTEGER,
2064
    ROOT_ID INTEGER
2065
);
2066
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE;
2067
CREATE CACHED TABLE PUBLIC.FEATURETREE_AUD(
2068
    ID INTEGER NOT NULL,
2069
    REV INTEGER NOT NULL,
2070
    REVTYPE TINYINT,
2071
    CREATED TIMESTAMP,
2072
    UUID VARCHAR(36),
2073
    UPDATED TIMESTAMP,
2074
    LSID_AUTHORITY VARCHAR(255),
2075
    LSID_LSID VARCHAR(255),
2076
    LSID_NAMESPACE VARCHAR(255),
2077
    LSID_OBJECT VARCHAR(255),
2078
    LSID_REVISION VARCHAR(255),
2079
    PROTECTEDTITLECACHE BOOLEAN,
2080
    TITLECACHE VARCHAR(255),
2081
    CREATEDBY_ID INTEGER,
2082
    UPDATEDBY_ID INTEGER,
2083
    ROOT_ID INTEGER
2084
);
2085
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_AUD;
2086
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION(
2087
    FEATURETREE_ID INTEGER NOT NULL,
2088
    ANNOTATIONS_ID INTEGER NOT NULL
2089
);
2090
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION;
2091
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD(
2092
    REV INTEGER NOT NULL,
2093
    FEATURETREE_ID INTEGER NOT NULL,
2094
    ANNOTATIONS_ID INTEGER NOT NULL,
2095
    REVTYPE TINYINT
2096
);
2097
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION_AUD;
2098
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT(
2099
    FEATURETREE_ID INTEGER NOT NULL,
2100
    CREDITS_ID INTEGER NOT NULL,
2101
    SORTINDEX INTEGER NOT NULL
2102
);
2103
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT;
2104
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT_AUD(
2105
    REV INTEGER NOT NULL,
2106
    FEATURETREE_ID INTEGER NOT NULL,
2107
    CREDITS_ID INTEGER NOT NULL,
2108
    SORTINDEX INTEGER NOT NULL,
2109
    REVTYPE TINYINT
2110
);
2111
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT_AUD;
2112
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION(
2113
    FEATURETREE_ID INTEGER NOT NULL,
2114
    EXTENSIONS_ID INTEGER NOT NULL
2115
);
2116
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION;
2117
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION_AUD(
2118
    REV INTEGER NOT NULL,
2119
    FEATURETREE_ID INTEGER NOT NULL,
2120
    EXTENSIONS_ID INTEGER NOT NULL,
2121
    REVTYPE TINYINT
2122
);
2123
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION_AUD;
2124
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER(
2125
    FEATURETREE_ID INTEGER NOT NULL,
2126
    IDENTIFIERS_ID INTEGER NOT NULL,
2127
    SORTINDEX INTEGER NOT NULL
2128
);
2129
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER;
2130
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER_AUD(
2131
    REV INTEGER NOT NULL,
2132
    FEATURETREE_ID INTEGER NOT NULL,
2133
    IDENTIFIERS_ID INTEGER NOT NULL,
2134
    SORTINDEX INTEGER NOT NULL,
2135
    REVTYPE TINYINT
2136
);
2137
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER_AUD;
2138
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER(
2139
    FEATURETREE_ID INTEGER NOT NULL,
2140
    MARKERS_ID INTEGER NOT NULL
2141
);
2142
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER;
2143
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER_AUD(
2144
    REV INTEGER NOT NULL,
2145
    FEATURETREE_ID INTEGER NOT NULL,
2146
    MARKERS_ID INTEGER NOT NULL,
2147
    REVTYPE TINYINT
2148
);
2149
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER_AUD;
2150
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE(
2151
    FEATURETREE_ID INTEGER NOT NULL,
2152
    SOURCES_ID INTEGER NOT NULL
2153
);
2154
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE;
2155
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD(
2156
    REV INTEGER NOT NULL,
2157
    FEATURETREE_ID INTEGER NOT NULL,
2158
    SOURCES_ID INTEGER NOT NULL,
2159
    REVTYPE TINYINT
2160
);
2161
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD;
2162
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION(
2163
    FEATURETREE_ID INTEGER NOT NULL,
2164
    REPRESENTATIONS_ID INTEGER NOT NULL
2165
);
2166
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION;
2167
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD(
2168
    REV INTEGER NOT NULL,
2169
    FEATURETREE_ID INTEGER NOT NULL,
2170
    REPRESENTATIONS_ID INTEGER NOT NULL,
2171
    REVTYPE TINYINT
2172
);
2173
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION_AUD;
2174
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO(
2175
    FEATURETREE_ID INTEGER NOT NULL,
2176
    RIGHTS_ID INTEGER NOT NULL
2177
);
2178
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO;
2179
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO_AUD(
2180
    REV INTEGER NOT NULL,
2181
    FEATURETREE_ID INTEGER NOT NULL,
2182
    RIGHTS_ID INTEGER NOT NULL,
2183
    REVTYPE TINYINT
2184
);
2185
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO_AUD;
2186
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT(
2187
    ID INTEGER NOT NULL,
2188
    CREATED TIMESTAMP,
2189
    UUID VARCHAR(36),
2190
    UPDATED TIMESTAMP,
2191
    DESCRIPTION VARCHAR(255),
2192
    TIMEPERIOD_END VARCHAR(255),
2193
    TIMEPERIOD_FREETEXT VARCHAR(255),
2194
    TIMEPERIOD_START VARCHAR(255),
2195
    ABSOLUTEELEVATION INTEGER,
2196
    ABSOLUTEELEVATIONMAX INTEGER,
2197
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
2198
    COLLECTINGMETHOD VARCHAR(255),
2199
    DISTANCETOGROUND DOUBLE,
2200
    DISTANCETOGROUNDMAX DOUBLE,
2201
    DISTANCETOGROUNDTEXT VARCHAR(30),
2202
    DISTANCETOWATERSURFACE DOUBLE,
2203
    DISTANCETOWATERSURFACEMAX DOUBLE,
2204
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
2205
    EXACTLOCATION_ERRORRADIUS INTEGER,
2206
    EXACTLOCATION_LATITUDE DOUBLE,
2207
    EXACTLOCATION_LONGITUDE DOUBLE,
2208
    CREATEDBY_ID INTEGER,
2209
    UPDATEDBY_ID INTEGER,
2210
    ACTOR_ID INTEGER,
2211
    COUNTRY_ID INTEGER,
2212
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
2213
    LOCALITY_ID INTEGER
2214
);
2215
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT;
2216
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_AUD(
2217
    ID INTEGER NOT NULL,
2218
    REV INTEGER NOT NULL,
2219
    REVTYPE TINYINT,
2220
    CREATED TIMESTAMP,
2221
    UUID VARCHAR(36),
2222
    UPDATED TIMESTAMP,
2223
    DESCRIPTION VARCHAR(255),
2224
    TIMEPERIOD_END VARCHAR(255),
2225
    TIMEPERIOD_FREETEXT VARCHAR(255),
2226
    TIMEPERIOD_START VARCHAR(255),
2227
    ABSOLUTEELEVATION INTEGER,
2228
    ABSOLUTEELEVATIONMAX INTEGER,
2229
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
2230
    COLLECTINGMETHOD VARCHAR(255),
2231
    DISTANCETOGROUND DOUBLE,
2232
    DISTANCETOGROUNDMAX DOUBLE,
2233
    DISTANCETOGROUNDTEXT VARCHAR(30),
2234
    DISTANCETOWATERSURFACE DOUBLE,
2235
    DISTANCETOWATERSURFACEMAX DOUBLE,
2236
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
2237
    EXACTLOCATION_ERRORRADIUS INTEGER,
2238
    EXACTLOCATION_LATITUDE DOUBLE,
2239
    EXACTLOCATION_LONGITUDE DOUBLE,
2240
    CREATEDBY_ID INTEGER,
2241
    UPDATEDBY_ID INTEGER,
2242
    ACTOR_ID INTEGER,
2243
    COUNTRY_ID INTEGER,
2244
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
2245
    LOCALITY_ID INTEGER
2246
);
2247
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_AUD;
2248
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION(
2249
    GATHERINGEVENT_ID INTEGER NOT NULL,
2250
    ANNOTATIONS_ID INTEGER NOT NULL
2251
);
2252
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION;
2253
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD(
2254
    REV INTEGER NOT NULL,
2255
    GATHERINGEVENT_ID INTEGER NOT NULL,
2256
    ANNOTATIONS_ID INTEGER NOT NULL,
2257
    REVTYPE TINYINT
2258
);
2259
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION_AUD;
2260
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE(
2261
    GATHERINGEVENT_ID INTEGER NOT NULL,
2262
    COLLECTINGAREAS_ID INTEGER NOT NULL
2263
);
2264
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE;
2265
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD(
2266
    REV INTEGER NOT NULL,
2267
    GATHERINGEVENT_ID INTEGER NOT NULL,
2268
    COLLECTINGAREAS_ID INTEGER NOT NULL,
2269
    REVTYPE TINYINT
2270
);
2271
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD;
2272
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER(
2273
    GATHERINGEVENT_ID INTEGER NOT NULL,
2274
    MARKERS_ID INTEGER NOT NULL
2275
);
2276
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER;
2277
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD(
2278
    REV INTEGER NOT NULL,
2279
    GATHERINGEVENT_ID INTEGER NOT NULL,
2280
    MARKERS_ID INTEGER NOT NULL,
2281
    REVTYPE TINYINT
2282
);
2283
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER_AUD;
2284
CREATE CACHED TABLE PUBLIC.GRANTEDAUTHORITYIMPL(
2285
    ID INTEGER NOT NULL,
2286
    CREATED TIMESTAMP,
2287
    UUID VARCHAR(36),
2288
    AUTHORITY VARCHAR(255) NOT NULL,
2289
    CREATEDBY_ID INTEGER
2290
);
2291
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GRANTEDAUTHORITYIMPL;
2292
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP(
2293
    ID INTEGER NOT NULL,
2294
    CREATED TIMESTAMP,
2295
    UUID VARCHAR(36),
2296
    UPDATED TIMESTAMP,
2297
    CREATEDBY_ID INTEGER,
2298
    UPDATEDBY_ID INTEGER
2299
);
2300
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP;
2301
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_AUD(
2302
    ID INTEGER NOT NULL,
2303
    REV INTEGER NOT NULL,
2304
    REVTYPE TINYINT,
2305
    CREATED TIMESTAMP,
2306
    UUID VARCHAR(36),
2307
    UPDATED TIMESTAMP,
2308
    CREATEDBY_ID INTEGER,
2309
    UPDATEDBY_ID INTEGER
2310
);
2311
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_AUD;
2312
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION(
2313
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2314
    ANNOTATIONS_ID INTEGER NOT NULL
2315
);
2316
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION;
2317
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD(
2318
    REV INTEGER NOT NULL,
2319
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2320
    ANNOTATIONS_ID INTEGER NOT NULL,
2321
    REVTYPE TINYINT
2322
);
2323
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD;
2324
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER(
2325
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2326
    MARKERS_ID INTEGER NOT NULL
2327
);
2328
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER;
2329
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD(
2330
    REV INTEGER NOT NULL,
2331
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2332
    MARKERS_ID INTEGER NOT NULL,
2333
    REVTYPE TINYINT
2334
);
2335
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER_AUD;
2336
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP(
2337
    ID INTEGER NOT NULL,
2338
    CREATED TIMESTAMP,
2339
    UUID VARCHAR(36),
2340
    UPDATED TIMESTAMP,
2341
    CITATIONMICROREFERENCE VARCHAR(255),
2342
    ORIGINALNAMESTRING VARCHAR(255),
2343
    DOUBTFUL BOOLEAN NOT NULL,
2344
    RULECONSIDERED VARCHAR(255),
2345
    CREATEDBY_ID INTEGER,
2346
    UPDATEDBY_ID INTEGER,
2347
    CITATION_ID INTEGER,
2348
    RELATEDFROM_ID INTEGER,
2349
    RELATEDTO_ID INTEGER,
2350
    TYPE_ID INTEGER
2351
);
2352
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP;
2353
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD(
2354
    ID INTEGER NOT NULL,
2355
    REV INTEGER NOT NULL,
2356
    REVTYPE TINYINT,
2357
    CREATED TIMESTAMP,
2358
    UUID VARCHAR(36),
2359
    UPDATED TIMESTAMP,
2360
    CITATIONMICROREFERENCE VARCHAR(255),
2361
    ORIGINALNAMESTRING VARCHAR(255),
2362
    DOUBTFUL BOOLEAN,
2363
    RULECONSIDERED VARCHAR(255),
2364
    CREATEDBY_ID INTEGER,
2365
    UPDATEDBY_ID INTEGER,
2366
    CITATION_ID INTEGER,
2367
    RELATEDFROM_ID INTEGER,
2368
    RELATEDTO_ID INTEGER,
2369
    TYPE_ID INTEGER
2370
);
2371
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_AUD;
2372
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION(
2373
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2374
    ANNOTATIONS_ID INTEGER NOT NULL
2375
);
2376
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION;
2377
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD(
2378
    REV INTEGER NOT NULL,
2379
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2380
    ANNOTATIONS_ID INTEGER NOT NULL,
2381
    REVTYPE TINYINT
2382
);
2383
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD;
2384
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER(
2385
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2386
    MARKERS_ID INTEGER NOT NULL
2387
);
2388
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER;
2389
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD(
2390
    REV INTEGER NOT NULL,
2391
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2392
    MARKERS_ID INTEGER NOT NULL,
2393
    REVTYPE TINYINT
2394
);
2395
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD;
2396
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING(
2397
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2398
    DESCRIPTION_ID INTEGER NOT NULL,
2399
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2400
);
2401
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING;
2402
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD(
2403
    REV INTEGER NOT NULL,
2404
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2405
    DESCRIPTION_ID INTEGER NOT NULL,
2406
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2407
    REVTYPE TINYINT
2408
);
2409
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD;
2410
CREATE CACHED TABLE PUBLIC.IDENTIFIER(
2411
    ID INTEGER NOT NULL,
2412
    UUID VARCHAR(36),
2413
    CREATED TIMESTAMP,
2414
    UPDATED TIMESTAMP,
2415
    IDENTIFIER VARCHAR(800),
2416
    CREATEDBY_ID INTEGER,
2417
    UPDATEDBY_ID INTEGER,
2418
          TYPE_ID INTEGER  
2419
);
2420
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER;
2421
CREATE CACHED TABLE PUBLIC.IDENTIFIER_AUD(
2422
        ID INTEGER NOT NULL,
2423
    REV INTEGER NOT NULL,
2424
    REVTYPE TINYINT,
2425
    UUID VARCHAR(36),
2426
    CREATED TIMESTAMP,
2427
    UPDATED TIMESTAMP,
2428
    IDENTIFIER VARCHAR(800),
2429
    CREATEDBY_ID INTEGER,
2430
    UPDATEDBY_ID INTEGER,
2431
          TYPE_ID INTEGER  
2432
);
2433
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_AUD;
2434
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION(
2435
    IDENTIFIER_ID INTEGER NOT NULL,
2436
    ANNOTATIONS_ID INTEGER NOT NULL
2437
);
2438
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION;
2439
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION_AUD(
2440
    REV INTEGER NOT NULL,
2441
    IDENTIFIER_ID INTEGER NOT NULL,
2442
    ANNOTATIONS_ID INTEGER NOT NULL,
2443
    REVTYPE TINYINT
2444
);
2445
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION_AUD;
2446
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER(
2447
    IDENTIFIER_ID INTEGER NOT NULL,
2448
    MARKERS_ID INTEGER NOT NULL
2449
);
2450
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER;
2451
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER_AUD(
2452
    REV INTEGER NOT NULL,
2453
    IDENTIFIER_ID INTEGER NOT NULL,
2454
    MARKERS_ID INTEGER NOT NULL,
2455
    REVTYPE TINYINT
2456
);
2457
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER_AUD;
2458
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE(
2459
    ID INTEGER NOT NULL,
2460
    UUID VARCHAR(36),
2461
    CREATED TIMESTAMP,
2462
    UPDATED TIMESTAMP,
2463
    CREATEDBY_ID INTEGER,
2464
    UPDATEDBY_ID INTEGER,
2465
          STARTPOS INT,
2466
          ENDPOS INT,
2467
          AGENT_ID INT,
2468
          ANNOTATION_ID INT,
2469
          LANGUAGESTRING_ID INT,
2470
          MEDIA_ID INT,
2471
          OCCURRENCE_ID INT,
2472
          REFERENCE_ID INT,
2473
        SOURCE_ID INT,
2474
          TAXON_ID INT,
2475
          TAXONNAME_ID INT,
2476
        KEY_ID INT
2477
);
2478
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE;
2479
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE_AUD(
2480
    ID INTEGER NOT NULL,
2481
    REV INTEGER NOT NULL,
2482
    REVTYPE TINYINT,
2483
    UUID VARCHAR(36),
2484
    CREATED TIMESTAMP,
2485
    UPDATED TIMESTAMP,
2486
    CREATEDBY_ID INTEGER,
2487
    UPDATEDBY_ID INTEGER,
2488
          STARTPOS INT,
2489
          ENDPOS INT,
2490
          AGENT_ID INT,
2491
          ANNOTATION_ID INT,
2492
          LANGUAGESTRING_ID INT,
2493
          MEDIA_ID INT,
2494
          OCCURRENCE_ID INT,
2495
          REFERENCE_ID INT,
2496
        SOURCE_ID INT,
2497
          TAXON_ID INT,
2498
          TAXONNAME_ID INT,
2499
        KEY_ID INT
2500
);
2501
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE_AUD;
2502
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP(
2503
    ID INTEGER NOT NULL,
2504
    CREATED TIMESTAMP,
2505
    UUID VARCHAR(36),
2506
    UPDATED TIMESTAMP,
2507
    DEPARTMENT VARCHAR(255),
2508
    PERIOD_END VARCHAR(255),
2509
    PERIOD_FREETEXT VARCHAR(255),
2510
    PERIOD_START VARCHAR(255),
2511
    ROLE VARCHAR(255),
2512
    CREATEDBY_ID INTEGER,
2513
    UPDATEDBY_ID INTEGER,
2514
    INSTITUTE_ID INTEGER,
2515
    PERSON_ID INTEGER
2516
);
2517
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP;
2518
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD(
2519
    ID INTEGER NOT NULL,
2520
    REV INTEGER NOT NULL,
2521
    REVTYPE TINYINT,
2522
    CREATED TIMESTAMP,
2523
    UUID VARCHAR(36),
2524
    UPDATED TIMESTAMP,
2525
    DEPARTMENT VARCHAR(255),
2526
    PERIOD_END VARCHAR(255),
2527
    PERIOD_FREETEXT VARCHAR(255),
2528
    PERIOD_START VARCHAR(255),
2529
    ROLE VARCHAR(255),
2530
    CREATEDBY_ID INTEGER,
2531
    UPDATEDBY_ID INTEGER,
2532
    INSTITUTE_ID INTEGER,
2533
    PERSON_ID INTEGER
2534
);
2535
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP_AUD;
2536
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT(
2537
    ID INTEGER NOT NULL,
2538
    CREATED TIMESTAMP,
2539
    UUID VARCHAR(36),
2540
    UPDATED TIMESTAMP,
2541
    CREATEDBY_ID INTEGER,
2542
    UPDATEDBY_ID INTEGER
2543
);
2544
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT;
2545
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_AUD(
2546
    ID INTEGER NOT NULL,
2547
    REV INTEGER NOT NULL,
2548
    REVTYPE TINYINT,
2549
    CREATED TIMESTAMP,
2550
    UUID VARCHAR(36),
2551
    UPDATED TIMESTAMP,
2552
    CREATEDBY_ID INTEGER,
2553
    UPDATEDBY_ID INTEGER
2554
);
2555
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_AUD;
2556
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING(
2557
    KEYSTATEMENT_ID INTEGER NOT NULL,
2558
    LABEL_ID INTEGER NOT NULL,
2559
    LABEL_MAPKEY_ID INTEGER NOT NULL
2560
);
2561
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING;
2562
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD(
2563
    REV INTEGER NOT NULL,
2564
    KEYSTATEMENT_ID INTEGER NOT NULL,
2565
    LABEL_ID INTEGER NOT NULL,
2566
    LABEL_MAPKEY_ID INTEGER NOT NULL,
2567
    REVTYPE TINYINT
2568
);
2569
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD;
2570
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY(
2571
    ID INTEGER NOT NULL,
2572
    CREATED TIMESTAMP,
2573
    UUID VARCHAR(36),
2574
    AUTHORITY VARCHAR(255),
2575
    AUTHORITYWSDL CLOB,
2576
    PORT INTEGER NOT NULL,
2577
    SERVER VARCHAR(255),
2578
    URL VARCHAR(255),
2579
    CREATEDBY_ID INTEGER
2580
);
2581
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY;
2582
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES(
2583
    LSIDAUTHORITY_ID INTEGER NOT NULL,
2584
    NAMESPACES_ELEMENT VARCHAR(255),
2585
    NAMESPACES_MAPKEY VARCHAR(255) NOT NULL
2586
);
2587
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY_NAMESPACES;
2588
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING(
2589
    ID INTEGER NOT NULL,
2590
    CREATED TIMESTAMP,
2591
    UUID VARCHAR(36),
2592
    UPDATED TIMESTAMP,
2593
    TEXT CLOB,
2594
    CREATEDBY_ID INTEGER,
2595
    UPDATEDBY_ID INTEGER,
2596
    LANGUAGE_ID INTEGER
2597
);
2598
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING;
2599
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_AUD(
2600
    ID INTEGER NOT NULL,
2601
    REV INTEGER NOT NULL,
2602
    REVTYPE TINYINT,
2603
    CREATED TIMESTAMP,
2604
    UUID VARCHAR(36),
2605
    UPDATED TIMESTAMP,
2606
    TEXT CLOB,
2607
    CREATEDBY_ID INTEGER,
2608
    UPDATEDBY_ID INTEGER,
2609
    LANGUAGE_ID INTEGER
2610
);
2611
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_AUD;
2612
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION(
2613
    LANGUAGESTRING_ID INTEGER NOT NULL,
2614
    ANNOTATIONS_ID INTEGER NOT NULL
2615
);
2616
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION;
2617
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD(
2618
    REV INTEGER NOT NULL,
2619
    LANGUAGESTRING_ID INTEGER NOT NULL,
2620
    ANNOTATIONS_ID INTEGER NOT NULL,
2621
    REVTYPE TINYINT
2622
);
2623
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION_AUD;
2624
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER(
2625
    LANGUAGESTRING_ID INTEGER NOT NULL,
2626
    MARKERS_ID INTEGER NOT NULL
2627
);
2628
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER;
2629
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD(
2630
    REV INTEGER NOT NULL,
2631
    LANGUAGESTRING_ID INTEGER NOT NULL,
2632
    MARKERS_ID INTEGER NOT NULL,
2633
    REVTYPE TINYINT
2634
);
2635
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER_AUD;
2636
CREATE CACHED TABLE PUBLIC.LOCUS(
2637
    ID INTEGER NOT NULL,
2638
    CREATED TIMESTAMP,
2639
    UUID VARCHAR(36),
2640
    UPDATED TIMESTAMP,
2641
    DESCRIPTION VARCHAR(255),
2642
    NAME VARCHAR(255),
2643
    CREATEDBY_ID INTEGER,
2644
    UPDATEDBY_ID INTEGER
2645
);
2646
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS;
2647
CREATE CACHED TABLE PUBLIC.LOCUS_AUD(
2648
    ID INTEGER NOT NULL,
2649
    REV INTEGER NOT NULL,
2650
    REVTYPE TINYINT,
2651
    CREATED TIMESTAMP,
2652
    UUID VARCHAR(36),
2653
    UPDATED TIMESTAMP,
2654
    DESCRIPTION VARCHAR(255),
2655
    NAME VARCHAR(255),
2656
    CREATEDBY_ID INTEGER,
2657
    UPDATEDBY_ID INTEGER
2658
);
2659
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS_AUD;
2660
CREATE CACHED TABLE PUBLIC.MARKER(
2661
    ID INTEGER NOT NULL,
2662
    CREATED TIMESTAMP,
2663
    UUID VARCHAR(36),
2664
    UPDATED TIMESTAMP,
2665
    FLAG BOOLEAN NOT NULL,
2666
    CREATEDBY_ID INTEGER,
2667
    UPDATEDBY_ID INTEGER,
2668
    MARKERTYPE_ID INTEGER
2669
);
2670
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER;
2671
CREATE CACHED TABLE PUBLIC.MARKER_AUD(
2672
    ID INTEGER NOT NULL,
2673
    REV INTEGER NOT NULL,
2674
    REVTYPE TINYINT,
2675
    CREATED TIMESTAMP,
2676
    UUID VARCHAR(36),
2677
    UPDATED TIMESTAMP,
2678
    FLAG BOOLEAN,
2679
    CREATEDBY_ID INTEGER,
2680
    UPDATEDBY_ID INTEGER,
2681
    MARKERTYPE_ID INTEGER
2682
);
2683

    
2684
CREATE TABLE MATERIALORMETHODEVENT (
2685
    ID INTEGER NOT NULL,
2686
    DTYPE VARCHAR(255),
2687
    CREATED TIMESTAMP,
2688
    UUID VARCHAR(36),
2689
    UPDATED TIMESTAMP,
2690
    MATERIALMETHODTEXT VARCHAR(255),
2691
    DESCRIPTION VARCHAR(255),
2692
    TIMEPERIOD_END VARCHAR(255),
2693
    TIMEPERIOD_FREETEXT VARCHAR(255),
2694
    TIMEPERIOD_START VARCHAR(255),
2695
        STRAIN VARCHAR(255),
2696
    TEMPERATURE DOUBLE,
2697
    CREATEDBY_ID INTEGER,
2698
    UPDATEDBY_ID INTEGER,
2699
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2700
    ACTOR_ID INTEGER,
2701
    FORWARDPRIMER_ID INTEGER,
2702
    REVERSEPRIMER_ID INTEGER,
2703
    MEDIUM_ID INTEGER,
2704
    PRIMARY KEY (ID)
2705
);
2706

    
2707
CREATE TABLE MATERIALORMETHODEVENT_AUD (
2708
    ID INTEGER NOT NULL,
2709
    REV INTEGER NOT NULL,
2710
    REVTYPE TINYINT,
2711
        DTYPE VARCHAR(255),
2712
    CREATED TIMESTAMP,
2713
    UUID VARCHAR(36),
2714
    UPDATED TIMESTAMP,
2715
    MATERIALMETHODTEXT VARCHAR(255),
2716
    DESCRIPTION VARCHAR(255),
2717
    TIMEPERIOD_END VARCHAR(255),
2718
    TIMEPERIOD_FREETEXT VARCHAR(255),
2719
    TIMEPERIOD_START VARCHAR(255),
2720
        STRAIN VARCHAR(255),
2721
    TEMPERATURE DOUBLE,
2722
    CREATEDBY_ID INTEGER,
2723
    UPDATEDBY_ID INTEGER,
2724
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2725
    ACTOR_ID INTEGER,
2726
    FORWARDPRIMER_ID INTEGER,
2727
    REVERSEPRIMER_ID INTEGER,
2728
    MEDIUM_ID INTEGER
2729
);
2730

    
2731
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2732
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2733
    ANNOTATIONS_ID INTEGER NOT NULL,
2734
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2735
);
2736

    
2737
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2738
    REV INTEGER NOT NULL,
2739
    REVTYPE TINYINT,
2740
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2741
    ANNOTATIONS_ID INTEGER NOT NULL,
2742
);
2743

    
2744
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2745
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2746
    MARKERS_ID INTEGER NOT NULL,
2747
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2748
);
2749

    
2750
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2751
    REV INTEGER NOT NULL,
2752
    REVTYPE TINYINT,
2753
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2754
    MARKERS_ID INTEGER NOT NULL,
2755
);
2756

    
2757
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER_AUD;
2758
CREATE CACHED TABLE PUBLIC.MEDIA(
2759
    DTYPE VARCHAR(31) NOT NULL,
2760
    ID INTEGER NOT NULL,
2761
    CREATED TIMESTAMP,
2762
    UUID VARCHAR(36),
2763
    UPDATED TIMESTAMP,
2764
    LSID_AUTHORITY VARCHAR(255),
2765
    LSID_LSID VARCHAR(255),
2766
    LSID_NAMESPACE VARCHAR(255),
2767
    LSID_OBJECT VARCHAR(255),
2768
    LSID_REVISION VARCHAR(255),
2769
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
2770
    TITLECACHE VARCHAR(255),
2771
    MEDIACREATED_END VARCHAR(255),
2772
    MEDIACREATED_FREETEXT VARCHAR(255),
2773
    MEDIACREATED_START VARCHAR(255),
2774
    CITATIONMICROREFERENCE VARCHAR(255),
2775
    CREATEDBY_ID INTEGER,
2776
    UPDATEDBY_ID INTEGER,
2777
    ARTIST_ID INTEGER,
2778
    CITATION_ID INTEGER
2779
);
2780
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA;
2781
CREATE CACHED TABLE PUBLIC.MEDIAKEY_COVEREDTAXON(
2782
    MEDIAKEY_ID INTEGER NOT NULL,
2783
    COVEREDTAXA_ID INTEGER NOT NULL
2784
);
2785
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_COVEREDTAXON;
2786
CREATE CACHED TABLE PUBLIC.MEDIAKEY_COVEREDTAXON_AUD(
2787
    REV INTEGER NOT NULL,
2788
    MEDIAKEY_ID INTEGER NOT NULL,
2789
    COVEREDTAXA_ID INTEGER NOT NULL,
2790
    REVTYPE TINYINT
2791
);
2792
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_COVEREDTAXON_AUD;
2793
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA(
2794
    MEDIAKEY_ID INTEGER NOT NULL,
2795
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
2796
);
2797
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA;
2798
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA_AUD(
2799
    REV INTEGER NOT NULL,
2800
    MEDIAKEY_ID INTEGER NOT NULL,
2801
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
2802
    REVTYPE TINYINT
2803
);
2804
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA_AUD;
2805
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE(
2806
    MEDIAKEY_ID INTEGER NOT NULL,
2807
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
2808
);
2809
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE;
2810
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE_AUD(
2811
    REV INTEGER NOT NULL,
2812
    MEDIAKEY_ID INTEGER NOT NULL,
2813
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
2814
    REVTYPE TINYINT
2815
);
2816
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE_AUD;
2817
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXONSCOPE(
2818
    MEDIAKEY_ID INTEGER NOT NULL,
2819
    TAXONOMICSCOPE_ID INTEGER NOT NULL
2820
);
2821
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXONSCOPE;
2822
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXONSCOPE_AUD(
2823
    REV INTEGER NOT NULL,
2824
    MEDIAKEY_ID INTEGER NOT NULL,
2825
    TAXONOMICSCOPE_ID INTEGER NOT NULL,
2826
    REVTYPE TINYINT
2827
);
2828
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXONSCOPE_AUD;
2829
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION(
2830
    ID INTEGER NOT NULL,
2831
    CREATED TIMESTAMP,
2832
    UUID VARCHAR(36),
2833
    UPDATED TIMESTAMP,
2834
    MIMETYPE VARCHAR(255),
2835
    SUFFIX VARCHAR(255),
2836
    CREATEDBY_ID INTEGER,
2837
    UPDATEDBY_ID INTEGER,
2838
    MEDIA_ID INTEGER
2839
);
2840
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION;
2841
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART(
2842
    DTYPE VARCHAR(31) NOT NULL,
2843
    ID INTEGER NOT NULL,
2844
    CREATED TIMESTAMP,
2845
    UUID VARCHAR(36),
2846
    UPDATED TIMESTAMP,
2847
    SIZE INTEGER,
2848
    URI CLOB,
2849
    DURATION INTEGER,
2850
    HEIGHT INTEGER,
2851
    WIDTH INTEGER,
2852
    CREATEDBY_ID INTEGER,
2853
    UPDATEDBY_ID INTEGER,
2854
    REPRESENTATION_ID INTEGER NOT NULL,
2855
    SORTINDEX INTEGER
2856
);
2857
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART;
2858
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART_AUD(
2859
    DTYPE VARCHAR(31) NOT NULL,
2860
    ID INTEGER NOT NULL,
2861
    REV INTEGER NOT NULL,
2862
    REVTYPE TINYINT,
2863
    CREATED TIMESTAMP,
2864
    UUID VARCHAR(36),
2865
    UPDATED TIMESTAMP,
2866
    SIZE INTEGER,
2867
    URI CLOB,
2868
    CREATEDBY_ID INTEGER,
2869
    UPDATEDBY_ID INTEGER,
2870
    REPRESENTATION_ID INTEGER,
2871
    DURATION INTEGER,
2872
    HEIGHT INTEGER,
2873
    WIDTH INTEGER
2874
);
2875
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART_AUD;
2876
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_AUD(
2877
    ID INTEGER NOT NULL,
2878
    REV INTEGER NOT NULL,
2879
    REVTYPE TINYINT,
2880
    CREATED TIMESTAMP,
2881
    UUID VARCHAR(36),
2882
    UPDATED TIMESTAMP,
2883
    MIMETYPE VARCHAR(255),
2884
    SUFFIX VARCHAR(255),
2885
    CREATEDBY_ID INTEGER,
2886
    UPDATEDBY_ID INTEGER,
2887
    MEDIA_ID INTEGER
2888
);
2889
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_AUD;
2890
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD(
2891
    REV INTEGER NOT NULL,
2892
    REPRESENTATION_ID INTEGER NOT NULL,
2893
    ID INTEGER NOT NULL,
2894
    SORTINDEX INTEGER NOT NULL,
2895
    REVTYPE TINYINT
2896
);
2897
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD;
2898
CREATE CACHED TABLE PUBLIC.MEDIA_AUD(
2899
    DTYPE VARCHAR(31) NOT NULL,
2900
    ID INTEGER NOT NULL,
2901
    REV INTEGER NOT NULL,
2902
    REVTYPE TINYINT,
2903
    CREATED TIMESTAMP,
2904
    UUID VARCHAR(36),
2905
    UPDATED TIMESTAMP,
2906
    LSID_AUTHORITY VARCHAR(255),
2907
    LSID_LSID VARCHAR(255),
2908
    LSID_NAMESPACE VARCHAR(255),
2909
    LSID_OBJECT VARCHAR(255),
2910
    LSID_REVISION VARCHAR(255),
2911
    PROTECTEDTITLECACHE BOOLEAN,
2912
    TITLECACHE VARCHAR(255),
2913
    MEDIACREATED_END VARCHAR(255),
2914
    MEDIACREATED_FREETEXT VARCHAR(255),
2915
    MEDIACREATED_START VARCHAR(255),
2916
    CREATEDBY_ID INTEGER,
2917
    UPDATEDBY_ID INTEGER,
2918
    ARTIST_ID INTEGER,
2919
    CITATIONMICROREFERENCE VARCHAR(255),
2920
    CITATION_ID INTEGER
2921
);
2922
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_AUD;
2923
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION(
2924
    MEDIA_ID INTEGER NOT NULL,
2925
    ANNOTATIONS_ID INTEGER NOT NULL
2926
);
2927
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION;
2928
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION_AUD(
2929
    REV INTEGER NOT NULL,
2930
    MEDIA_ID INTEGER NOT NULL,
2931
    ANNOTATIONS_ID INTEGER NOT NULL,
2932
    REVTYPE TINYINT
2933
);
2934
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION_AUD;
2935
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT(
2936
    MEDIA_ID INTEGER NOT NULL,
2937
    CREDITS_ID INTEGER NOT NULL,
2938
    SORTINDEX INTEGER NOT NULL
2939
);
2940
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT;
2941
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT_AUD(
2942
    REV INTEGER NOT NULL,
2943
    MEDIA_ID INTEGER NOT NULL,
2944
    CREDITS_ID INTEGER NOT NULL,
2945
    SORTINDEX INTEGER NOT NULL,
2946
    REVTYPE TINYINT
2947
);
2948
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT_AUD;
2949
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION(
2950
    MEDIA_ID INTEGER NOT NULL,
2951
    DESCRIPTION_ID INTEGER NOT NULL,
2952
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2953
);
2954
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION;
2955
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION_AUD(
2956
    REV INTEGER NOT NULL,
2957
    MEDIA_ID INTEGER NOT NULL,
2958
    DESCRIPTION_ID INTEGER NOT NULL,
2959
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2960
    REVTYPE TINYINT
2961
);
2962
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION_AUD;
2963
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION(
2964
    MEDIA_ID INTEGER NOT NULL,
2965
    EXTENSIONS_ID INTEGER NOT NULL
2966
);
2967
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION;
2968
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION_AUD(
2969
    REV INTEGER NOT NULL,
2970
    MEDIA_ID INTEGER NOT NULL,
2971
    EXTENSIONS_ID INTEGER NOT NULL,
2972
    REVTYPE TINYINT
2973
);
2974
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION_AUD;
2975
CREATE CACHED TABLE PUBLIC.MEDIA_IDENTIFIER(
2976
    MEDIA_ID INTEGER NOT NULL,
2977
    IDENTIFIERS_ID INTEGER NOT NULL,
2978
    SORTINDEX INTEGER NOT NULL
2979
);
2980
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_IDENTIFIER;
2981
CREATE CACHED TABLE PUBLIC.MEDIA_IDENTIFIER_AUD(
2982
    REV INTEGER NOT NULL,
2983
    MEDIA_ID INTEGER NOT NULL,
2984
    IDENTIFIERS_ID INTEGER NOT NULL,
2985
    SORTINDEX INTEGER NOT NULL,
2986
    REVTYPE TINYINT
2987
);
2988
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_IDENTIFIER_AUD;
2989
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING(
2990
    MEDIA_ID INTEGER NOT NULL,
2991
    TITLE_ID INTEGER NOT NULL,
2992
    TITLE_MAPKEY_ID INTEGER NOT NULL
2993
);
2994
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING;
2995
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING_AUD(
2996
    REV INTEGER NOT NULL,
2997
    MEDIA_ID INTEGER NOT NULL,
2998
    TITLE_ID INTEGER NOT NULL,
2999
    TITLE_MAPKEY_ID INTEGER NOT NULL,
3000
    REVTYPE TINYINT
3001
);
3002
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING_AUD;
3003
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER(
3004
    MEDIA_ID INTEGER NOT NULL,
3005
    MARKERS_ID INTEGER NOT NULL
3006
);
3007
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER;
3008
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER_AUD(
3009
    REV INTEGER NOT NULL,
3010
    MEDIA_ID INTEGER NOT NULL,
3011
    MARKERS_ID INTEGER NOT NULL,
3012
    REVTYPE TINYINT
3013
);
3014
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER_AUD;
3015
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE(
3016
    MEDIA_ID INTEGER NOT NULL,
3017
    SOURCES_ID INTEGER NOT NULL
3018
);
3019
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE;
3020
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD(
3021
    REV INTEGER NOT NULL,
3022
    MEDIA_ID INTEGER NOT NULL,
3023
    SOURCES_ID INTEGER NOT NULL,
3024
    REVTYPE TINYINT
3025
);
3026
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD;
3027
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION(
3028
    MEDIAKEY_ID INTEGER NOT NULL,
3029
    KEYREPRESENTATIONS_ID INTEGER NOT NULL
3030
);
3031
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION;
3032
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION_AUD(
3033
    REV INTEGER NOT NULL,
3034
    MEDIAKEY_ID INTEGER NOT NULL,
3035
    KEYREPRESENTATIONS_ID INTEGER NOT NULL,
3036
    REVTYPE TINYINT
3037
);
3038
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION_AUD;
3039
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTSINFO(
3040
    MEDIA_ID INTEGER NOT NULL,
3041
    RIGHTS_ID INTEGER NOT NULL
3042
);
3043
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO;
3044
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTSINFO_AUD(
3045
    REV INTEGER NOT NULL,
3046
    MEDIA_ID INTEGER NOT NULL,
3047
    RIGHTS_ID INTEGER NOT NULL,
3048
    REVTYPE TINYINT
3049
);
3050
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO_AUD;
3051
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE(
3052
    PHYLOGENETICTREE_ID INTEGER NOT NULL,
3053
    USEDSEQUENCES_ID INTEGER NOT NULL
3054
);
3055
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE;
3056
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE_AUD(
3057
    REV INTEGER NOT NULL,
3058
    PHYLOGENETICTREE_ID INTEGER NOT NULL,
3059
    USEDSEQUENCES_ID INTEGER NOT NULL,
3060
    REVTYPE TINYINT
3061
);
3062
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE_AUD;
3063
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON(
3064
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3065
    COVEREDTAXA_ID INTEGER NOT NULL
3066
);
3067
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_COVEREDTAXON;
3068
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD(
3069
    REV INTEGER NOT NULL,
3070
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3071
    COVEREDTAXA_ID INTEGER NOT NULL,
3072
    REVTYPE TINYINT
3073
);
3074
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD;
3075
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA(
3076
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3077
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
3078
);
3079
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA;
3080
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD(
3081
    REV INTEGER NOT NULL,
3082
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3083
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
3084
    REVTYPE TINYINT
3085
);
3086
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD;
3087
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE(
3088
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3089
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
3090
);
3091
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE;
3092
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE_AUD(
3093
    REV INTEGER NOT NULL,
3094
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3095
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
3096
    REVTYPE TINYINT
3097
);
3098
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE_AUD;
3099
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE(
3100
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3101
    TAXONOMICSCOPE_ID INTEGER NOT NULL
3102
);
3103
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXON;
3104
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD(
3105
    REV INTEGER NOT NULL,
3106
    MULTIACCESSKEY_ID INTEGER NOT NULL,
3107
    TAXONOMICSCOPE_ID INTEGER NOT NULL,
3108
    REVTYPE TINYINT
3109
);
3110
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD;
3111
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP(
3112
    ID INTEGER NOT NULL,
3113
    CREATED TIMESTAMP,
3114
    UUID VARCHAR(36),
3115
    UPDATED TIMESTAMP,
3116
    CITATIONMICROREFERENCE VARCHAR(255),
3117
    ORIGINALNAMESTRING VARCHAR(255),
3118
    DOUBTFUL BOOLEAN NOT NULL,
3119
    RULECONSIDERED VARCHAR(255),
3120
    CREATEDBY_ID INTEGER,
3121
    UPDATEDBY_ID INTEGER,
3122
    CITATION_ID INTEGER,
3123
    RELATEDFROM_ID INTEGER,
3124
    RELATEDTO_ID INTEGER,
3125
    TYPE_ID INTEGER
3126
);
3127
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP;
3128
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_AUD(
3129
    ID INTEGER NOT NULL,
3130
    REV INTEGER NOT NULL,
3131
    REVTYPE TINYINT,
3132
    CREATED TIMESTAMP,
3133
    UUID VARCHAR(36),
3134
    UPDATED TIMESTAMP,
3135
    CITATIONMICROREFERENCE VARCHAR(255),
3136
    ORIGINALNAMESTRING VARCHAR(255),
3137
    DOUBTFUL BOOLEAN,
3138
    RULECONSIDERED VARCHAR(255),
3139
    CREATEDBY_ID INTEGER,
3140
    UPDATEDBY_ID INTEGER,
3141
    CITATION_ID INTEGER,
3142
    RELATEDFROM_ID INTEGER,
3143
    RELATEDTO_ID INTEGER,
3144
    TYPE_ID INTEGER
3145
);
3146
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_AUD;
3147
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION(
3148
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
3149
    ANNOTATIONS_ID INTEGER NOT NULL
3150
);
3151
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION;
3152
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD(
3153
    REV INTEGER NOT NULL,
3154
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
3155
    ANNOTATIONS_ID INTEGER NOT NULL,
3156
    REVTYPE TINYINT
3157
);
3158
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD;
3159
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER(
3160
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
3161
    MARKERS_ID INTEGER NOT NULL
3162
);
3163
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER;
3164
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER_AUD(
3165
    REV INTEGER NOT NULL,
3166
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
3167
    MARKERS_ID INTEGER NOT NULL,
3168
    REVTYPE TINYINT
3169
);
3170
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER_AUD;
3171
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS(
3172
    ID INTEGER NOT NULL,
3173
    CREATED TIMESTAMP,
3174
    UUID VARCHAR(36),
3175
    UPDATED TIMESTAMP,
3176
    CITATIONMICROREFERENCE VARCHAR(255),
3177
    ORIGINALNAMESTRING VARCHAR(255),
3178
    RULECONSIDERED VARCHAR(255),
3179
    CREATEDBY_ID INTEGER,
3180
    UPDATEDBY_ID INTEGER,
3181
    CITATION_ID INTEGER,
3182
    TYPE_ID INTEGER
3183
);
3184
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS;
3185
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_AUD(
3186
    ID INTEGER NOT NULL,
3187
    REV INTEGER NOT NULL,
3188
    REVTYPE TINYINT,
3189
    CREATED TIMESTAMP,
3190
    UUID VARCHAR(36),
3191
    UPDATED TIMESTAMP,
3192
    CITATIONMICROREFERENCE VARCHAR(255),
3193
    ORIGINALNAMESTRING VARCHAR(255),
3194
    RULECONSIDERED VARCHAR(255),
3195
    CREATEDBY_ID INTEGER,
3196
    UPDATEDBY_ID INTEGER,
3197
    CITATION_ID INTEGER,
3198
    TYPE_ID INTEGER
3199
);
3200
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_AUD;
3201
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION(
3202
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
3203
    ANNOTATIONS_ID INTEGER NOT NULL
3204
);
3205
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION;
3206
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD(
3207
    REV INTEGER NOT NULL,
3208
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
3209
    ANNOTATIONS_ID INTEGER NOT NULL,
3210
    REVTYPE TINYINT
3211
);
3212
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD;
3213
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER(
3214
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
3215
    MARKERS_ID INTEGER NOT NULL
3216
);
3217
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER;
3218
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD(
3219
    REV INTEGER NOT NULL,
3220
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
3221
    MARKERS_ID INTEGER NOT NULL,
3222
    REVTYPE TINYINT
3223
);
3224
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD;
3225
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE(
3226
    DTYPE VARCHAR(31) NOT NULL,
3227
    ID INTEGER NOT NULL,
3228
    CREATED TIMESTAMP,
3229
    UUID VARCHAR(36),
3230
    UPDATED TIMESTAMP,
3231
    SOURCETYPE VARCHAR(4) NOT NULL,
3232
    CITATIONMICROREFERENCE VARCHAR(255),
3233
    ORIGINALNAMESTRING VARCHAR(255),
3234
    IDINSOURCE VARCHAR(255),
3235
    IDNAMESPACE VARCHAR(255),
3236
    CREATEDBY_ID INTEGER,
3237
    UPDATEDBY_ID INTEGER,
3238
    CITATION_ID INTEGER,
3239
    NAMEUSEDINSOURCE_ID INTEGER
3240
);
3241
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE;
3242
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_AUD(
3243
    DTYPE VARCHAR(31) NOT NULL,
3244
    ID INTEGER NOT NULL,
3245
    REV INTEGER NOT NULL,
3246
    REVTYPE TINYINT,
3247
    CREATED TIMESTAMP,
3248
    UUID VARCHAR(36),
3249
    UPDATED TIMESTAMP,
3250
           SOURCETYPE VARCHAR(4) NOT NULL,
3251
    CITATIONMICROREFERENCE VARCHAR(255),
3252
    ORIGINALNAMESTRING VARCHAR(255),
3253
    IDINSOURCE VARCHAR(255),
3254
    IDNAMESPACE VARCHAR(255),
3255
    CREATEDBY_ID INTEGER,
3256
    UPDATEDBY_ID INTEGER,
3257
    CITATION_ID INTEGER,
3258
    NAMEUSEDINSOURCE_ID INTEGER
3259
);
3260
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_AUD;
3261
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION(
3262
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3263
    ANNOTATIONS_ID INTEGER NOT NULL
3264
);
3265
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION;
3266
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD(
3267
    REV INTEGER NOT NULL,
3268
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3269
    ANNOTATIONS_ID INTEGER NOT NULL,
3270
    REVTYPE TINYINT
3271
);
3272
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD;
3273
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_EXTERNALLINK(
3274
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3275
    LINKS_ID INTEGER NOT NULL
3276
);
3277
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_EXTERNALLINK;
3278
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_EXTERNALLINK_AUD(
3279
    REV INTEGER NOT NULL,
3280
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3281
    LINKS_ID INTEGER NOT NULL,
3282
    REVTYPE TINYINT
3283
);
3284
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_EXTERNALLINK_AUD;
3285
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER(
3286
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3287
    MARKERS_ID INTEGER NOT NULL
3288
);
3289
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER;
3290
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD(
3291
    REV INTEGER NOT NULL,
3292
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3293
    MARKERS_ID INTEGER NOT NULL,
3294
    REVTYPE TINYINT
3295
);
3296
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD;
3297
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP(
3298
    ID INTEGER NOT NULL,
3299
    CREATED TIMESTAMP,
3300
    UUID VARCHAR(36),
3301
    NAME VARCHAR(255) NOT NULL,
3302
    CREATEDBY_ID INTEGER
3303
);
3304
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP;
3305
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL(
3306
    GROUP_ID INTEGER NOT NULL,
3307
    GRANTEDAUTHORITIES_ID INTEGER NOT NULL
3308
);
3309
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL;
3310
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY(
3311
    ID INTEGER NOT NULL,
3312
    CREATED TIMESTAMP,
3313
    UUID VARCHAR(36),
3314
    UPDATED TIMESTAMP,
3315
    LSID_AUTHORITY VARCHAR(255),
3316
    LSID_LSID VARCHAR(255),
3317
    LSID_NAMESPACE VARCHAR(255),
3318
    LSID_OBJECT VARCHAR(255),
3319
    LSID_REVISION VARCHAR(255),
3320
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3321
    TITLECACHE VARCHAR(255),
3322
    STARTNUMBER INTEGER,
3323
    CREATEDBY_ID INTEGER,
3324
    UPDATEDBY_ID INTEGER,
3325
    ROOT_ID INTEGER
3326
);
3327
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY;
3328
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE(
3329
    ID INTEGER NOT NULL,
3330
    CREATED TIMESTAMP,
3331
    UUID VARCHAR(36),
3332
    UPDATED TIMESTAMP,
3333
    NODENUMBER INTEGER,
3334
    SORTINDEX INTEGER,
3335
    CREATEDBY_ID INTEGER,
3336
    UPDATEDBY_ID INTEGER,
3337
    FEATURE_ID INTEGER,
3338
    KEY_ID INTEGER,
3339
    OTHERNODE_ID INTEGER,
3340
    PARENT_ID INTEGER,
3341
    QUESTION_ID INTEGER,
3342
    STATEMENT_ID INTEGER,
3343
    SUBKEY_ID INTEGER,
3344
    TAXON_ID INTEGER
3345
);
3346
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE;
3347
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_AUD(
3348
    ID INTEGER NOT NULL,
3349
    REV INTEGER NOT NULL,
3350
    REVTYPE TINYINT,
3351
    CREATED TIMESTAMP,
3352
    UUID VARCHAR(36),
3353
    UPDATED TIMESTAMP,
3354
    NODENUMBER INTEGER,
3355
    SORTINDEX INTEGER,
3356
    CREATEDBY_ID INTEGER,
3357
    UPDATEDBY_ID INTEGER,
3358
    FEATURE_ID INTEGER,
3359
    KEY_ID INTEGER,
3360
    OTHERNODE_ID INTEGER,
3361
    PARENT_ID INTEGER,
3362
    QUESTION_ID INTEGER,
3363
    STATEMENT_ID INTEGER,
3364
    SUBKEY_ID INTEGER,
3365
    TAXON_ID INTEGER
3366
);
3367
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_AUD;
3368
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING(
3369
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
3370
    MODIFYINGTEXT_ID INTEGER NOT NULL,
3371
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
3372
);
3373
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING;
3374
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD(
3375
    REV INTEGER NOT NULL,
3376
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
3377
    MODIFYINGTEXT_ID INTEGER NOT NULL,
3378
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
3379
    REVTYPE TINYINT
3380
);
3381
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD;
3382
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_AUD(
3383
    ID INTEGER NOT NULL,
3384
    REV INTEGER NOT NULL,
3385
    REVTYPE TINYINT,
3386
    CREATED TIMESTAMP,
3387
    UUID VARCHAR(36),
3388
    UPDATED TIMESTAMP,
3389
    LSID_AUTHORITY VARCHAR(255),
3390
    LSID_LSID VARCHAR(255),
3391
    LSID_NAMESPACE VARCHAR(255),
3392
    LSID_OBJECT VARCHAR(255),
3393
    LSID_REVISION VARCHAR(255),
3394
    PROTECTEDTITLECACHE BOOLEAN,
3395
    TITLECACHE VARCHAR(255),
3396
    STARTNUMBER INTEGER,
3397
    CREATEDBY_ID INTEGER,
3398
    UPDATEDBY_ID INTEGER,
3399
    ROOT_ID INTEGER
3400
);
3401
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_AUD;
3402
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION(
3403
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3404
    ANNOTATIONS_ID INTEGER NOT NULL
3405
);
3406
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION;
3407
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD(
3408
    REV INTEGER NOT NULL,
3409
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3410
    ANNOTATIONS_ID INTEGER NOT NULL,
3411
    REVTYPE TINYINT
3412
);
3413
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD;
3414
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT(
3415
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3416
    CREDITS_ID INTEGER NOT NULL,
3417
    SORTINDEX INTEGER NOT NULL
3418
);
3419
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT;
3420
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT_AUD(
3421
    REV INTEGER NOT NULL,
3422
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3423
    CREDITS_ID INTEGER NOT NULL,
3424
    SORTINDEX INTEGER NOT NULL,
3425
    REVTYPE TINYINT
3426
);
3427
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT_AUD;
3428
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION(
3429
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3430
    EXTENSIONS_ID INTEGER NOT NULL
3431
);
3432
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION;
3433
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD(
3434
    REV INTEGER NOT NULL,
3435
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3436
    EXTENSIONS_ID INTEGER NOT NULL,
3437
    REVTYPE TINYINT
3438
);
3439
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD;
3440
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_IDENTIFIER(
3441
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3442
    IDENTIFIERS_ID INTEGER NOT NULL,
3443
    SORTINDEX INTEGER NOT NULL
3444
);
3445
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_IDENTIFIER;
3446
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_IDENTIFIER_AUD(
3447
    REV INTEGER NOT NULL,
3448
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3449
    IDENTIFIERS_ID INTEGER NOT NULL,
3450
    SORTINDEX INTEGER NOT NULL,
3451
    REVTYPE TINYINT
3452
);
3453
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_IDENTIFIER_AUD;
3454
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER(
3455
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3456
    MARKERS_ID INTEGER NOT NULL
3457
);
3458
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER;
3459
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER_AUD(
3460
    REV INTEGER NOT NULL,
3461
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3462
    MARKERS_ID INTEGER NOT NULL,
3463
    REVTYPE TINYINT
3464
);
3465
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER_AUD;
3466
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA(
3467
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3468
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
3469
);
3470
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA;
3471
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD(
3472
    REV INTEGER NOT NULL,
3473
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3474
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
3475
    REVTYPE TINYINT
3476
);
3477
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD;
3478
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE(
3479
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3480
    SOURCES_ID INTEGER NOT NULL
3481
);
3482
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE;
3483
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD(
3484
    REV INTEGER NOT NULL,
3485
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3486
    SOURCES_ID INTEGER NOT NULL,
3487
    REVTYPE TINYINT
3488
);
3489
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD;
3490
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO(
3491
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3492
    RIGHTS_ID INTEGER NOT NULL
3493
);
3494
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTSINFO;
3495
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD(
3496
    REV INTEGER NOT NULL,
3497
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3498
    RIGHTS_ID INTEGER NOT NULL,
3499
    REVTYPE TINYINT
3500
);
3501
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD;
3502
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE(
3503
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3504
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
3505
);
3506
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE;
3507
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE_AUD(
3508
    REV INTEGER NOT NULL,
3509
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3510
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
3511
    REVTYPE TINYINT
3512
);
3513
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE_AUD;
3514
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON(
3515
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3516
    TAXON_ID INTEGER NOT NULL
3517
);
3518
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON;
3519
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE(
3520
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3521
    COVEREDTAXA_ID INTEGER NOT NULL
3522
);
3523
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE;
3524
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD(
3525
    REV INTEGER NOT NULL,
3526
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3527
    COVEREDTAXA_ID INTEGER NOT NULL,
3528
    REVTYPE TINYINT
3529
);
3530
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD;
3531
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON_AUD(
3532
    REV INTEGER NOT NULL,
3533
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3534
    TAXON_ID INTEGER NOT NULL,
3535
    REVTYPE TINYINT
3536
);
3537
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON_AUD;
3538

    
3539
CREATE TABLE PRIMER (
3540
    ID INTEGER NOT NULL,
3541
    CREATED TIMESTAMP,
3542
    UUID VARCHAR(36),
3543
    UPDATED TIMESTAMP,
3544
    LABEL VARCHAR(255),
3545
        SEQUENCE_LENGTH INTEGER,
3546
        SEQUENCE_STRING CLOB,
3547
    CREATEDBY_ID INTEGER,
3548
    UPDATEDBY_ID INTEGER,
3549
    DNAMARKER_ID INTEGER,
3550
        PUBLISHEDIN_ID INTEGER,
3551
        PRIMARY KEY (ID)
3552
);
3553
CREATE TABLE PRIMER_AUD (
3554
    ID INTEGER NOT NULL,
3555
    CREATED TIMESTAMP,
3556
    UUID VARCHAR(36),
3557
    UPDATED TIMESTAMP,
3558
    LABEL VARCHAR(255),
3559
    SEQUENCE_LENGTH INTEGER,
3560
    SEQUENCE_STRING CLOB,
3561
    CREATEDBY_ID INTEGER,
3562
    UPDATEDBY_ID INTEGER,
3563
        DNAMARKER_ID INTEGER,
3564
        PUBLISHEDIN_ID INTEGER,
3565
);
3566

    
3567
CREATE TABLE PRIMER_ANNOTATION (
3568
    PRIMER_ID INTEGER NOT NULL,
3569
    ANNOTATIONS_ID INTEGER NOT NULL,
3570
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3571
);
3572
CREATE TABLE PRIMER_ANNOTATION_AUD (
3573
    PRIMER_ID INTEGER NOT NULL,
3574
    ANNOTATIONS_ID INTEGER NOT NULL
3575
);
3576

    
3577
CREATE TABLE PRIMER_MARKER (
3578
    PRIMER_ID INTEGER NOT NULL,
3579
    MARKERS_ID INTEGER NOT NULL,
3580
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3581
);
3582
CREATE TABLE PRIMER_MARKER_AUD (
3583
    PRIMER_ID INTEGER NOT NULL,
3584
    MARKERS_ID INTEGER NOT NULL
3585
);
3586

    
3587

    
3588
CREATE CACHED TABLE PUBLIC.REFERENCE(
3589
    ID INTEGER NOT NULL,
3590
    CREATED TIMESTAMP,
3591
    UUID VARCHAR(36),
3592
    UPDATED TIMESTAMP,
3593
    LSID_AUTHORITY VARCHAR(255),
3594
    LSID_LSID VARCHAR(255),
3595
    LSID_NAMESPACE VARCHAR(255),
3596
    LSID_OBJECT VARCHAR(255),
3597
    LSID_REVISION VARCHAR(255),
3598
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3599
    TITLECACHE VARCHAR(800),
3600
    DATEPUBLISHED_END VARCHAR(255),
3601
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3602
    DATEPUBLISHED_START VARCHAR(255),
3603
        DATEPUBLISHED_VERBATIMDATE VARCHAR(255),
3604
    EDITION VARCHAR(255),
3605
    EDITOR VARCHAR(255),
3606
    ISBN VARCHAR(255),
3607
    ISSN VARCHAR(255),
3608
    DOI VARCHAR(255),
3609
    NOMENCLATURALLYRELEVANT BOOLEAN NOT NULL,
3610
    ORGANIZATION VARCHAR(255),
3611
    PAGES VARCHAR(255),
3612
    PARSINGPROBLEM INTEGER NOT NULL,
3613
    PLACEPUBLISHED VARCHAR(255),
3614
    PROBLEMENDS INTEGER NOT NULL,
3615
    PROBLEMSTARTS INTEGER NOT NULL,
3616
    PUBLISHER VARCHAR(255),
3617
    REFERENCEABSTRACT CLOB,
3618
    SERIESPART VARCHAR(255),
3619
    TITLE CLOB,
3620
    ABBREVTITLE VARCHAR(255),
3621
    ABBREVTITLECACHE CLOB,
3622
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3623
    REFTYPE VARCHAR(4),
3624
    URI CLOB,
3625
    VOLUME VARCHAR(255),
3626
    ACCESSED TIMESTAMP,
3627
    LASTRETRIEVED TIMESTAMP,
3628
    EXTERNALID VARCHAR(255),
3629
    EXTERNALLINK CLOB,
3630
    AUTHORITYTYPE  VARCHAR(10) NOT NULL,
3631
    CREATEDBY_ID INTEGER,
3632
    UPDATEDBY_ID INTEGER,
3633
    AUTHORSHIP_ID INTEGER,
3634
    INREFERENCE_ID INTEGER,
3635
    INSTITUTION_ID INTEGER,
3636
    SCHOOL_ID INTEGER
3637
);
3638
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE;
3639
CREATE INDEX PUBLIC.REFERENCETITLECACHEINDEX ON PUBLIC.REFERENCE(TITLECACHE);
3640
CREATE CACHED TABLE PUBLIC.REFERENCE_AUD(
3641
    ID INTEGER NOT NULL,
3642
    REV INTEGER NOT NULL,
3643
    REVTYPE TINYINT,
3644
    CREATED TIMESTAMP,
3645
    UUID VARCHAR(36),
3646
    UPDATED TIMESTAMP,
3647
    LSID_AUTHORITY VARCHAR(255),
3648
    LSID_LSID VARCHAR(255),
3649
    LSID_NAMESPACE VARCHAR(255),
3650
    LSID_OBJECT VARCHAR(255),
3651
    LSID_REVISION VARCHAR(255),
3652
    PROTECTEDTITLECACHE BOOLEAN,
3653
    TITLECACHE VARCHAR(800),
3654
    DATEPUBLISHED_END VARCHAR(255),
3655
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3656
    DATEPUBLISHED_START VARCHAR(255),
3657
    DATEPUBLISHED_VERBATIMDATE VARCHAR(255),
3658
    EDITION VARCHAR(255),
3659
    EDITOR VARCHAR(255),
3660
    ISBN VARCHAR(255),
3661
    ISSN VARCHAR(255),
3662
    DOI VARCHAR(255),
3663
    NOMENCLATURALLYRELEVANT BOOLEAN,
3664
    ORGANIZATION VARCHAR(255),
3665
    PAGES VARCHAR(255),
3666
    PARSINGPROBLEM INTEGER,
3667
    PLACEPUBLISHED VARCHAR(255),
3668
    PROBLEMENDS INTEGER,
3669
    PROBLEMSTARTS INTEGER,
3670
    PUBLISHER VARCHAR(255),
3671
    REFERENCEABSTRACT CLOB,
3672
    SERIESPART VARCHAR(255),
3673
    TITLE CLOB,
3674
    ABBREVTITLE VARCHAR(255),
3675
    ABBREVTITLECACHE CLOB,
3676
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3677
    REFTYPE  VARCHAR(4),
3678
    URI CLOB,
3679
    VOLUME VARCHAR(255),
3680
    ACCESSED TIMESTAMP,
3681
    LASTRETRIEVED TIMESTAMP,
3682
    EXTERNALID VARCHAR(255),
3683
    EXTERNALLINK CLOB,
3684
    AUTHORITYTYPE  VARCHAR(10) NOT NULL,
3685
    CREATEDBY_ID INTEGER,
3686
    UPDATEDBY_ID INTEGER,
3687
    AUTHORSHIP_ID INTEGER,
3688
    INREFERENCE_ID INTEGER,
3689
    INSTITUTION_ID INTEGER,
3690
    SCHOOL_ID INTEGER
3691
);
3692
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_AUD;
3693
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION(
3694
    REFERENCE_ID INTEGER NOT NULL,
3695
    ANNOTATIONS_ID INTEGER NOT NULL
3696
);
3697
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION;
3698
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION_AUD(
3699
    REV INTEGER NOT NULL,
3700
    REFERENCE_ID INTEGER NOT NULL,
3701
    ANNOTATIONS_ID INTEGER NOT NULL,
3702
    REVTYPE TINYINT
3703
);
3704
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION_AUD;
3705
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT(
3706
    REFERENCE_ID INTEGER NOT NULL,
3707
    CREDITS_ID INTEGER NOT NULL,
3708
    SORTINDEX INTEGER NOT NULL
3709
);
3710
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT;
3711
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT_AUD(
3712
    REV INTEGER NOT NULL,
3713
    REFERENCE_ID INTEGER NOT NULL,
3714
    CREDITS_ID INTEGER NOT NULL,
3715
    SORTINDEX INTEGER NOT NULL,
3716
    REVTYPE TINYINT
3717
);
3718
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT_AUD;
3719
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION(
3720
    REFERENCE_ID INTEGER NOT NULL,
3721
    EXTENSIONS_ID INTEGER NOT NULL
3722
);
3723
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION;
3724
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION_AUD(
3725
    REV INTEGER NOT NULL,
3726
    REFERENCE_ID INTEGER NOT NULL,
3727
    EXTENSIONS_ID INTEGER NOT NULL,
3728
    REVTYPE TINYINT
3729
);
3730
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION_AUD;
3731
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER(
3732
    REFERENCE_ID INTEGER NOT NULL,
3733
    IDENTIFIERS_ID INTEGER NOT NULL,
3734
    SORTINDEX INTEGER NOT NULL
3735
);
3736
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER;
3737
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER_AUD(
3738
    REV INTEGER NOT NULL,
3739
    REFERENCE_ID INTEGER NOT NULL,
3740
    IDENTIFIERS_ID INTEGER NOT NULL,
3741
    SORTINDEX INTEGER NOT NULL,
3742
    REVTYPE TINYINT
3743
);
3744
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER_AUD;
3745
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER(
3746
    REFERENCE_ID INTEGER NOT NULL,
3747
    MARKERS_ID INTEGER NOT NULL
3748
);
3749
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER;
3750
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER_AUD(
3751
    REV INTEGER NOT NULL,
3752
    REFERENCE_ID INTEGER NOT NULL,
3753
    MARKERS_ID INTEGER NOT NULL,
3754
    REVTYPE TINYINT
3755
);
3756
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER_AUD;
3757
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA(
3758
    REFERENCE_ID INTEGER NOT NULL,
3759
    MEDIA_ID INTEGER NOT NULL
3760
);
3761
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA;
3762
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA_AUD(
3763
    REV INTEGER NOT NULL,
3764
    REFERENCE_ID INTEGER NOT NULL,
3765
    MEDIA_ID INTEGER NOT NULL,
3766
    REVTYPE TINYINT
3767
);
3768
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA_AUD;
3769
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE(
3770
    REFERENCE_ID INTEGER NOT NULL,
3771
    SOURCES_ID INTEGER NOT NULL
3772
);
3773
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE;
3774
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD(
3775
    REV INTEGER NOT NULL,
3776
    REFERENCE_ID INTEGER NOT NULL,
3777
    SOURCES_ID INTEGER NOT NULL,
3778
    REVTYPE TINYINT
3779
);
3780
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD;
3781
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO(
3782
    REFERENCE_ID INTEGER NOT NULL,
3783
    RIGHTS_ID INTEGER NOT NULL
3784
);
3785
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO;
3786
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO_AUD(
3787
    REV INTEGER NOT NULL,
3788
    REFERENCE_ID INTEGER NOT NULL,
3789
    RIGHTS_ID INTEGER NOT NULL,
3790
    REVTYPE TINYINT
3791
);
3792
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO_AUD;
3793
CREATE CACHED TABLE PUBLIC.REGISTRATION(
3794
    ID INTEGER NOT NULL,
3795
    CREATED TIMESTAMP,
3796
    UUID VARCHAR(36),
3797
    UPDATED TIMESTAMP,
3798
        IDENTIFIER VARCHAR(255),
3799
        REGISTRATIONDATE TIMESTAMP,
3800
        SPECIFICIDENTIFIER VARCHAR(255),
3801
        STATUS VARCHAR(255),
3802
    CREATEDBY_ID INTEGER,
3803
    UPDATEDBY_ID INTEGER,
3804
        INSTITUTION_ID INTEGER,
3805
        NAME_ID INTEGER,
3806
        SUBMITTER_ID INTEGER
3807
);
3808
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION;
3809
CREATE CACHED TABLE PUBLIC.REGISTRATION_AUD(
3810
    ID INTEGER NOT NULL,
3811
    REV INTEGER NOT NULL,
3812
    REVTYPE TINYINT,
3813
    CREATED TIMESTAMP,
3814
    UUID VARCHAR(36),
3815
    UPDATED TIMESTAMP,
3816
        IDENTIFIER VARCHAR(255),
3817
        REGISTRATIONDATE TIMESTAMP,
3818
        SPECIFICIDENTIFIER VARCHAR(255),
3819
        STATUS VARCHAR(255),
3820
    CREATEDBY_ID INTEGER,
3821
    UPDATEDBY_ID INTEGER,
3822
        INSTITUTION_ID INTEGER,
3823
        NAME_ID INTEGER,
3824
        SUBMITTER_ID INTEGER
3825
);
3826
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_AUD;
3827
CREATE CACHED TABLE PUBLIC.REGISTRATION_ANNOTATION(
3828
    REGISTRATION_ID INTEGER NOT NULL,
3829
    ANNOTATIONS_ID INTEGER NOT NULL
3830
);
3831
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_ANNOTATION;
3832
CREATE CACHED TABLE PUBLIC.REGISTRATION_ANNOTATION_AUD(
3833
    REV INTEGER NOT NULL,
3834
    REGISTRATION_ID INTEGER NOT NULL,
3835
    ANNOTATIONS_ID INTEGER NOT NULL,
3836
    REVTYPE TINYINT
3837
);
3838
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3839
CREATE CACHED TABLE PUBLIC.REGISTRATION_MARKER(
3840
    REGISTRATION_ID INTEGER NOT NULL,
3841
    MARKERS_ID INTEGER NOT NULL
3842
);
3843
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_MARKER;
3844
CREATE CACHED TABLE PUBLIC.REGISTRATION_MARKER_AUD(
3845
    REV INTEGER NOT NULL,
3846
    REGISTRATION_ID INTEGER NOT NULL,
3847
    MARKERS_ID INTEGER NOT NULL,
3848
    REVTYPE TINYINT
3849
);
3850
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_MARKER_AUD;
3851
CREATE CACHED TABLE PUBLIC.REGISTRATION_REGISTRATION(
3852
    REGISTRATION_ID INTEGER NOT NULL,
3853
    BLOCKEDBY_ID INTEGER NOT NULL
3854
);
3855
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_REGISTRATION;
3856
CREATE CACHED TABLE PUBLIC.REGISTRATION_REGISTRATION_AUD(
3857
    REV INTEGER NOT NULL,
3858
    REGISTRATION_ID INTEGER NOT NULL,
3859
    BLOCKEDBY_ID INTEGER NOT NULL,
3860
    REVTYPE TINYINT
3861
);
3862
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_REGISTRATION_AUD;
3863
CREATE CACHED TABLE PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE(
3864
    REGISTRATIONS_ID INTEGER NOT NULL,
3865
    TYPEDESIGNATIONS_ID INTEGER NOT NULL
3866
);
3867
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE;
3868
CREATE CACHED TABLE PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE_AUD(
3869
    REV INTEGER NOT NULL,
3870
    REGISTRATIONS_ID INTEGER NOT NULL,
3871
    TYPEDESIGNATIONS_ID INTEGER NOT NULL,
3872
    REVTYPE TINYINT
3873
);
3874
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE_AUD;
3875

    
3876
CREATE CACHED TABLE PUBLIC.TERMBASE_INVERSEREPRESENTATION(
3877
    TERM_ID INTEGER NOT NULL,
3878
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL
3879
);
3880
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.TERMBASE_INVERSEREPRESENTATION;
3881
CREATE CACHED TABLE PUBLIC.TERMBASE_INVERSEREPRESENTATION_AUD(
3882
    REV INTEGER NOT NULL,
3883
    TERM_ID INTEGER NOT NULL,
3884
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL,
3885
    REVTYPE TINYINT
3886
);
3887
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.TERMBASE_INVERSEREPRESENTATION_AUD;
3888
CREATE CACHED TABLE PUBLIC.REPRESENTATION(
3889
    ID INTEGER NOT NULL,
3890
    CREATED TIMESTAMP,
3891
    UUID VARCHAR(36),
3892
    UPDATED TIMESTAMP,
3893
    TEXT CLOB,
3894
    ABBREVIATEDLABEL VARCHAR(255),
3895
    LABEL VARCHAR(255),
3896
    CREATEDBY_ID INTEGER,
3897
    UPDATEDBY_ID INTEGER,
3898
    LANGUAGE_ID INTEGER
3899
);
3900
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION;
3901
CREATE CACHED TABLE PUBLIC.REPRESENTATION_AUD(
3902
    ID INTEGER NOT NULL,
3903
    REV INTEGER NOT NULL,
3904
    REVTYPE TINYINT,
3905
    CREATED TIMESTAMP,
3906
    UUID VARCHAR(36),
3907
    UPDATED TIMESTAMP,
3908
    TEXT CLOB,
3909
    ABBREVIATEDLABEL VARCHAR(255),
3910
    LABEL VARCHAR(255),
3911
    CREATEDBY_ID INTEGER,
3912
    UPDATEDBY_ID INTEGER,
3913
    LANGUAGE_ID INTEGER
3914
);
3915
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_AUD;
3916
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION(
3917
    REPRESENTATION_ID INTEGER NOT NULL,
3918
    ANNOTATIONS_ID INTEGER NOT NULL
3919
);
3920
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION;
3921
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD(
3922
    REV INTEGER NOT NULL,
3923
    REPRESENTATION_ID INTEGER NOT NULL,
3924
    ANNOTATIONS_ID INTEGER NOT NULL,
3925
    REVTYPE TINYINT
3926
);
3927
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3928
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER(
3929
    REPRESENTATION_ID INTEGER NOT NULL,
3930
    MARKERS_ID INTEGER NOT NULL
3931
);
3932
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER;
3933
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER_AUD(
3934
    REV INTEGER NOT NULL,
3935
    REPRESENTATION_ID INTEGER NOT NULL,
3936
    MARKERS_ID INTEGER NOT NULL,
3937
    REVTYPE TINYINT
3938
);
3939
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER_AUD;
3940
CREATE CACHED TABLE PUBLIC.RIGHTSINFO(
3941
    ID INTEGER NOT NULL,
3942
    CREATED TIMESTAMP,
3943
    UUID VARCHAR(36),
3944
    UPDATED TIMESTAMP,
3945
    TEXT CLOB,
3946
    ABBREVIATEDTEXT VARCHAR(255),
3947
    URI CLOB,
3948
    CREATEDBY_ID INTEGER,
3949
    UPDATEDBY_ID INTEGER,
3950
    LANGUAGE_ID INTEGER,
3951
    AGENT_ID INTEGER,
3952
    TYPE_ID INTEGER
3953
);
3954
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO;
3955
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_AUD(
3956
    ID INTEGER NOT NULL,
3957
    REV INTEGER NOT NULL,
3958
    REVTYPE TINYINT,
3959
    CREATED TIMESTAMP,
3960
    UUID VARCHAR(36),
3961
    UPDATED TIMESTAMP,
3962
    TEXT CLOB,
3963
    ABBREVIATEDTEXT VARCHAR(255),
3964
    URI CLOB,
3965
    CREATEDBY_ID INTEGER,
3966
    UPDATEDBY_ID INTEGER,
3967
    LANGUAGE_ID INTEGER,
3968
    AGENT_ID INTEGER,
3969
    TYPE_ID INTEGER
3970
);
3971
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_AUD;
3972
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION(
3973
    RIGHTS_ID INTEGER NOT NULL,
3974
    ANNOTATIONS_ID INTEGER NOT NULL
3975
);
3976
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION;
3977
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD(
3978
    REV INTEGER NOT NULL,
3979
    RIGHTS_ID INTEGER NOT NULL,
3980
    ANNOTATIONS_ID INTEGER NOT NULL,
3981
    REVTYPE TINYINT
3982
);
3983
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION_AUD;
3984
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER(
3985
    RIGHTS_ID INTEGER NOT NULL,
3986
    MARKERS_ID INTEGER NOT NULL
3987
);
3988
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_MARKER;
3989
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER_AUD(
3990
    REV INTEGER NOT NULL,
3991
    RIGHTS_ID INTEGER NOT NULL,
3992
    MARKERS_ID INTEGER NOT NULL,
3993
    REVTYPE TINYINT
3994
);
3995

    
3996
CREATE TABLE SEQUENCE (
3997
    ID INTEGER NOT NULL,
3998
    CREATED TIMESTAMP,
3999
    UUID VARCHAR(36),
4000
    UPDATED TIMESTAMP,
4001
    BARCODESEQUENCEPART_LENGTH INTEGER,
4002
    BARCODESEQUENCEPART_STRING CLOB,
4003
    BOLDPROCESSID VARCHAR(255),
4004
    CONSENSUSSEQUENCE_LENGTH INTEGER,
4005
    CONSENSUSSEQUENCE_STRING CLOB,
4006
    GENETICACCESSIONNUMBER VARCHAR(255),
4007
    HAPLOTYPE VARCHAR(255),
4008
    ISBARCODE BOOLEAN,
4009
    CREATEDBY_ID INTEGER,
4010
    UPDATEDBY_ID INTEGER,
4011
    CONTIGFILE_ID INTEGER,
4012
    DNASAMPLE_ID INTEGER,
4013
    DNAMARKER_ID INTEGER,
4014
    PRIMARY KEY (ID)
4015
);
4016
CREATE TABLE SEQUENCE_AUD (
4017
    ID INTEGER NOT NULL,
4018
    REV INTEGER NOT NULL,
4019
    REVTYPE TINYINT,
4020
    CREATED TIMESTAMP,
4021
    UUID VARCHAR(36),
4022
    UPDATED TIMESTAMP,
4023
    BARCODESEQUENCEPART_LENGTH INTEGER,
4024
    BARCODESEQUENCEPART_STRING CLOB,
4025
    BOLDPROCESSID VARCHAR(255),
4026
    CONSENSUSSEQUENCE_LENGTH INTEGER,
4027
    CONSENSUSSEQUENCE_STRING CLOB,
4028
    GENETICACCESSIONNUMBER VARCHAR(255),
4029
    HAPLOTYPE VARCHAR(255),
4030
    ISBARCODE BOOLEAN,
4031
    CREATEDBY_ID INTEGER,
4032
    UPDATEDBY_ID INTEGER,
4033
    CONTIGFILE_ID INTEGER,
4034
    DNASAMPLE_ID INTEGER,
4035
    DNAMARKER_ID INTEGER
4036
);
4037

    
4038
CREATE TABLE SEQUENCE_ANNOTATION (
4039
    SEQUENCE_ID INTEGER NOT NULL,
4040
    ANNOTATIONS_ID INTEGER NOT NULL,
4041
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
4042
);
4043
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
4044
    REV INTEGER NOT NULL,
4045
    REVTYPE TINYINT,
4046
    SEQUENCE_ID INTEGER NOT NULL,
4047
    ANNOTATIONS_ID INTEGER NOT NULL
4048
);
4049

    
4050
CREATE TABLE SEQUENCE_MARKER (
4051
    SEQUENCE_ID INTEGER NOT NULL,
4052
    MARKERS_ID INTEGER NOT NULL,
4053
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
4054
);
4055
CREATE TABLE SEQUENCE_MARKER_AUD (
4056
    REV INTEGER NOT NULL,
4057
    REVTYPE TINYINT,
4058
    SEQUENCE_ID INTEGER NOT NULL,
4059
    MARKERS_ID INTEGER NOT NULL
4060
);
4061
CREATE TABLE SEQUENCE_REFERENCE (
4062
    SEQUENCE_ID INTEGER NOT NULL,
4063
    CITATIONS_ID INTEGER NOT NULL,
4064
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
4065
);
4066
CREATE TABLE SEQUENCE_REFERENCE_AUD (
4067
    REV INTEGER NOT NULL,
4068
    REVTYPE TINYINT,
4069
    SEQUENCE_ID INTEGER NOT NULL,
4070
    CITATIONS_ID INTEGER NOT NULL
4071
);
4072

    
4073
CREATE TABLE SINGLEREADALIGNMENT (
4074
    ID INTEGER NOT NULL,
4075
    CREATED TIMESTAMP,
4076
    UUID VARCHAR(36),
4077
    UPDATED TIMESTAMP,
4078
        EDITEDSEQUENCE CLOB,
4079
        SHIFTS CLOB,
4080
    REVERSECOMPLEMENT BIT,
4081
        FIRSTSEQPOSITION INTEGER,
4082
        LEFTCUTPOSITION INTEGER,
4083
        RIGHTCUTPOSITION INTEGER,
4084
        CREATEDBY_ID INTEGER,
4085
    UPDATEDBY_ID INTEGER,
4086
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4087
    SINGLEREAD_ID INTEGER NOT NULL,
4088
    PRIMARY KEY (ID)
4089
);
4090

    
4091
CREATE TABLE SINGLEREADALIGNMENT_AUD (
4092
    ID INTEGER NOT NULL,
4093
    REV INTEGER NOT NULL,
4094
    REVTYPE TINYINT,
4095
    CREATED TIMESTAMP,
4096
    UUID VARCHAR(36),
4097
    UPDATED TIMESTAMP,
4098
        EDITEDSEQUENCE CLOB,
4099
        SHIFTS CLOB,
4100
    REVERSECOMPLEMENT BIT,
4101
        FIRSTSEQPOSITION INTEGER,
4102
        LEFTCUTPOSITION INTEGER,
4103
        RIGHTCUTPOSITION INTEGER,
4104
        CREATEDBY_ID INTEGER,
4105
    UPDATEDBY_ID INTEGER,
4106
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4107
    SINGLEREAD_ID INTEGER NOT NULL
4108
);
4109

    
4110
CREATE TABLE SINGLEREAD (
4111
    ID INTEGER NOT NULL,
4112
    CREATED TIMESTAMP,
4113
    UUID VARCHAR(36),
4114
    UPDATED TIMESTAMP,
4115
    DESCRIPTION VARCHAR(255),
4116
    TIMEPERIOD_END VARCHAR(255),
4117
    TIMEPERIOD_FREETEXT VARCHAR(255),
4118
    TIMEPERIOD_START VARCHAR(255),
4119
    DIRECTION VARCHAR(3),
4120
    SEQUENCE_LENGTH INTEGER,
4121
    SEQUENCE_STRING CLOB,
4122
    CREATEDBY_ID INTEGER,
4123
    UPDATEDBY_ID INTEGER,
4124
    ACTOR_ID INTEGER,
4125
    AMPLIFICATIONRESULT_ID INTEGER,
4126
    MATERIALORMETHOD_ID INTEGER,
4127
    PHEROGRAM_ID INTEGER,
4128
    PRIMER_ID INTEGER,
4129
    PRIMARY KEY (ID)
4130
);
4131
CREATE TABLE SINGLEREAD_AUD (
4132
    ID INTEGER NOT NULL,
4133
    REV INTEGER NOT NULL,
4134
    REVTYPE TINYINT,
4135
    CREATED TIMESTAMP,
4136
    UUID VARCHAR(36),
4137
    UPDATED TIMESTAMP,
4138
    DESCRIPTION VARCHAR(255),
4139
    TIMEPERIOD_END VARCHAR(255),
4140
    TIMEPERIOD_FREETEXT VARCHAR(255),
4141
    TIMEPERIOD_START VARCHAR(255),
4142
    DIRECTION VARCHAR(3),
4143
    SEQUENCE_LENGTH INTEGER,
4144
    SEQUENCE_STRING CLOB,
4145
    CREATEDBY_ID INTEGER,
4146
    UPDATEDBY_ID INTEGER,
4147
    ACTOR_ID INTEGER,
4148
    AMPLIFICATIONRESULT_ID INTEGER,
4149
    MATERIALORMETHOD_ID INTEGER,
4150
    PHEROGRAM_ID INTEGER,
4151
    PRIMER_ID INTEGER
4152
);
4153

    
4154
CREATE TABLE SINGLEREAD_ANNOTATION (
4155
    SINGLEREAD_ID INTEGER NOT NULL,
4156
    ANNOTATIONS_ID INTEGER NOT NULL,
4157
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
4158
);
4159
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
4160
    REV INTEGER NOT NULL,
4161
    REVTYPE TINYINT,
4162
    SINGLEREAD_ID INTEGER NOT NULL,
4163
    ANNOTATIONS_ID INTEGER NOT NULL
4164
);
4165

    
4166
CREATE TABLE SINGLEREAD_MARKER (
4167
    SINGLEREAD_ID INTEGER NOT NULL,
4168
    MARKERS_ID INTEGER NOT NULL,
4169
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
4170
);
4171

    
4172
CREATE TABLE SINGLEREAD_MARKER_AUD (
4173
    REV INTEGER NOT NULL,
4174
    REVTYPE TINYINT,
4175
    SINGLEREAD_ID INTEGER NOT NULL,
4176
    MARKERS_ID INTEGER NOT NULL
4177
);
4178

    
4179
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
4180
    DTYPE VARCHAR(31) NOT NULL,
4181
    ID INTEGER NOT NULL,
4182
    CREATED TIMESTAMP,
4183
    UUID VARCHAR(36),
4184
    UPDATED TIMESTAMP,
4185
    RECORDBASIS  VARCHAR(4) NOT NULL,
4186
    LSID_AUTHORITY VARCHAR(255),
4187
    LSID_LSID VARCHAR(255),
4188
    LSID_NAMESPACE VARCHAR(255),
4189
    LSID_OBJECT VARCHAR(255),
4190
    LSID_REVISION VARCHAR(255),
4191
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4192
    TITLECACHE VARCHAR(255),
4193
    PROTECTEDIDENTITYCACHE BOOLEAN,
4194
    IDENTITYCACHE VARCHAR(255),
4195
    PUBLISH BOOLEAN,
4196
    INDIVIDUALCOUNT VARCHAR(255),
4197
        PREFERREDSTABLEURI CLOB,
4198
    ACCESSIONNUMBER VARCHAR(255),
4199
    BARCODE VARCHAR(255),
4200
    CATALOGNUMBER VARCHAR(255),
4201
    COLLECTORSNUMBER VARCHAR(255),
4202
    EXSICCATUM VARCHAR(255),
4203
    ORIGINALLABELINFO CLOB,
4204
    FIELDNOTES VARCHAR(255),
4205
    FIELDNUMBER VARCHAR(255),
4206
    CREATEDBY_ID INTEGER,
4207
    UPDATEDBY_ID INTEGER,
4208
    LIFESTAGE_ID INTEGER,
4209
    SEX_ID INTEGER,
4210
    KINDOFUNIT_ID INTEGER,
4211
    COLLECTION_ID INTEGER,
4212
    DERIVEDFROM_ID INTEGER,
4213
    STOREDUNDER_ID INTEGER,
4214
    PRESERVATION_ID INTEGER,
4215
    GATHERINGEVENT_ID INTEGER,
4216
    PRIMARYCOLLECTOR_ID INTEGER,
4217
    MEDIASPECIMEN_ID INTEGER,
4218
    DNAQUALITY_ID INTEGER
4219
);
4220
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
4221
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
4222
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
4223
    DTYPE VARCHAR(31) NOT NULL,
4224
    ID INTEGER NOT NULL,
4225
    REV INTEGER NOT NULL,
4226
    REVTYPE TINYINT,
4227
    CREATED TIMESTAMP,
4228
    UUID VARCHAR(36),
4229
    UPDATED TIMESTAMP,
4230
    RECORDBASIS  VARCHAR(4) NOT NULL,
4231
    LSID_AUTHORITY VARCHAR(255),
4232
    LSID_LSID VARCHAR(255),
4233
    LSID_NAMESPACE VARCHAR(255),
4234
    LSID_OBJECT VARCHAR(255),
4235
    LSID_REVISION VARCHAR(255),
4236
    PROTECTEDTITLECACHE BOOLEAN,
4237
    TITLECACHE VARCHAR(255),
4238
    PROTECTEDIDENTITYCACHE BOOLEAN NULL,
4239
    IDENTITYCACHE VARCHAR(255),
4240
        PUBLISH BOOLEAN,
4241
    INDIVIDUALCOUNT VARCHAR(255),
4242
    PREFERREDSTABLEURI CLOB,
4243
    ACCESSIONNUMBER VARCHAR(255),
4244
    BARCODE VARCHAR(255),
4245
    CATALOGNUMBER VARCHAR(255),
4246
    COLLECTORSNUMBER VARCHAR(255),
4247
    EXSICCATUM VARCHAR(255),
4248
    ORIGINALLABELINFO CLOB,
4249
    FIELDNOTES VARCHAR(255),
4250
    FIELDNUMBER VARCHAR(255),
4251
    CREATEDBY_ID INTEGER,
4252
    UPDATEDBY_ID INTEGER,
4253
    LIFESTAGE_ID INTEGER,
4254
    SEX_ID INTEGER,
4255
    KINDOFUNIT_ID INTEGER,
4256
    COLLECTION_ID INTEGER,
4257
    DERIVEDFROM_ID INTEGER,
4258
    STOREDUNDER_ID INTEGER,
4259
    PRESERVATION_ID INTEGER,
4260
    GATHERINGEVENT_ID INTEGER,
4261
    PRIMARYCOLLECTOR_ID INTEGER,
4262
    MEDIASPECIMEN_ID INTEGER,
4263
    DNAQUALITY_ID INTEGER
4264
);
4265
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
4266
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
4267
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4268
    ANNOTATIONS_ID INTEGER NOT NULL
4269
);
4270
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
4271
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
4272
    REV INTEGER NOT NULL,
4273
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4274
    ANNOTATIONS_ID INTEGER NOT NULL,
4275
    REVTYPE TINYINT
4276
);
4277
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
4278
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
4279
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4280
    CREDITS_ID INTEGER NOT NULL,
4281
    SORTINDEX INTEGER NOT NULL
4282
);
4283
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
4284
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
4285
    REV INTEGER NOT NULL,
4286
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4287
    CREDITS_ID INTEGER NOT NULL,
4288
    SORTINDEX INTEGER NOT NULL,
4289
    REVTYPE TINYINT
4290
);
4291
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
4292
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
4293
    ORIGINALS_ID INTEGER NOT NULL,
4294
    DERIVATIONEVENTS_ID INTEGER NOT NULL
4295
);
4296
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
4297
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
4298
    REV INTEGER NOT NULL,
4299
    ORIGINALS_ID INTEGER NOT NULL,
4300
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
4301
    REVTYPE TINYINT
4302
);
4303
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
4304
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
4305
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4306
    EXTENSIONS_ID INTEGER NOT NULL
4307
);
4308
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
4309
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
4310
    REV INTEGER NOT NULL,
4311
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4312
    EXTENSIONS_ID INTEGER NOT NULL,
4313
    REVTYPE TINYINT
4314
);
4315
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;
4316

    
4317
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4318
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4319
    IDENTIFIERS_ID INTEGER NOT NULL,
4320
    SORTINDEX INTEGER NOT NULL
4321
);
4322
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4323
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4324
    REV INTEGER NOT NULL,
4325
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4326
    IDENTIFIERS_ID INTEGER NOT NULL,
4327
    SORTINDEX INTEGER NOT NULL,
4328
    REVTYPE TINYINT
4329
);
4330
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4331

    
4332
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
4333
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4334
    DEFINITION_ID INTEGER NOT NULL,
4335
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
4336
);
4337
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
4338
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
4339
    REV INTEGER NOT NULL,
4340
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4341
    DEFINITION_ID INTEGER NOT NULL,
4342
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
4343
    REVTYPE TINYINT
4344
);
4345
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
4346
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
4347
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4348
    MARKERS_ID INTEGER NOT NULL
4349
);
4350
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
4351
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
4352
    REV INTEGER NOT NULL,
4353
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT