Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

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

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

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

    
2737
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2738
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2739
    ANNOTATIONS_ID INTEGER NOT NULL,
2740
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2741
);
2742

    
2743
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2744
    REV INTEGER NOT NULL,
2745
    REVTYPE TINYINT,
2746
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2747
    ANNOTATIONS_ID INTEGER NOT NULL,
2748
);
2749

    
2750
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2751
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2752
    MARKERS_ID INTEGER NOT NULL,
2753
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2754
);
2755

    
2756
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2757
    REV INTEGER NOT NULL,
2758
    REVTYPE TINYINT,
2759
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2760
    MARKERS_ID INTEGER NOT NULL,
2761
);
2762

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

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

    
3573
CREATE TABLE PRIMER_ANNOTATION (
3574
    PRIMER_ID INTEGER NOT NULL,
3575
    ANNOTATIONS_ID INTEGER NOT NULL,
3576
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3577
);
3578
CREATE TABLE PRIMER_ANNOTATION_AUD (
3579
    PRIMER_ID INTEGER NOT NULL,
3580
    ANNOTATIONS_ID INTEGER NOT NULL
3581
);
3582

    
3583
CREATE TABLE PRIMER_MARKER (
3584
    PRIMER_ID INTEGER NOT NULL,
3585
    MARKERS_ID INTEGER NOT NULL,
3586
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3587
);
3588
CREATE TABLE PRIMER_MARKER_AUD (
3589
    PRIMER_ID INTEGER NOT NULL,
3590
    MARKERS_ID INTEGER NOT NULL
3591
);
3592

    
3593

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

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

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

    
4044
CREATE TABLE SEQUENCE_ANNOTATION (
4045
    SEQUENCE_ID INTEGER NOT NULL,
4046
    ANNOTATIONS_ID INTEGER NOT NULL,
4047
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
4048
);
4049
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
4050
    REV INTEGER NOT NULL,
4051
    REVTYPE TINYINT,
4052
    SEQUENCE_ID INTEGER NOT NULL,
4053
    ANNOTATIONS_ID INTEGER NOT NULL
4054
);
4055

    
4056
CREATE TABLE SEQUENCE_MARKER (
4057
    SEQUENCE_ID INTEGER NOT NULL,
4058
    MARKERS_ID INTEGER NOT NULL,
4059
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
4060
);
4061
CREATE TABLE SEQUENCE_MARKER_AUD (
4062
    REV INTEGER NOT NULL,
4063
    REVTYPE TINYINT,
4064
    SEQUENCE_ID INTEGER NOT NULL,
4065
    MARKERS_ID INTEGER NOT NULL
4066
);
4067
CREATE TABLE SEQUENCE_REFERENCE (
4068
    SEQUENCE_ID INTEGER NOT NULL,
4069
    CITATIONS_ID INTEGER NOT NULL,
4070
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
4071
);
4072
CREATE TABLE SEQUENCE_REFERENCE_AUD (
4073
    REV INTEGER NOT NULL,
4074
    REVTYPE TINYINT,
4075
    SEQUENCE_ID INTEGER NOT NULL,
4076
    CITATIONS_ID INTEGER NOT NULL
4077
);
4078

    
4079
CREATE TABLE SINGLEREADALIGNMENT (
4080
    ID INTEGER NOT NULL,
4081
    CREATED TIMESTAMP,
4082
    UUID VARCHAR(36),
4083
    UPDATED TIMESTAMP,
4084
        EDITEDSEQUENCE CLOB,
4085
        SHIFTS CLOB,
4086
    REVERSECOMPLEMENT BIT,
4087
        FIRSTSEQPOSITION INTEGER,
4088
        LEFTCUTPOSITION INTEGER,
4089
        RIGHTCUTPOSITION INTEGER,
4090
        CREATEDBY_ID INTEGER,
4091
    UPDATEDBY_ID INTEGER,
4092
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4093
    SINGLEREAD_ID INTEGER NOT NULL,
4094
    PRIMARY KEY (ID)
4095
);
4096

    
4097
CREATE TABLE SINGLEREADALIGNMENT_AUD (
4098
    ID INTEGER NOT NULL,
4099
    REV INTEGER NOT NULL,
4100
    REVTYPE TINYINT,
4101
    CREATED TIMESTAMP,
4102
    UUID VARCHAR(36),
4103
    UPDATED TIMESTAMP,
4104
        EDITEDSEQUENCE CLOB,
4105
        SHIFTS CLOB,
4106
    REVERSECOMPLEMENT BIT,
4107
        FIRSTSEQPOSITION INTEGER,
4108
        LEFTCUTPOSITION INTEGER,
4109
        RIGHTCUTPOSITION INTEGER,
4110
        CREATEDBY_ID INTEGER,
4111
    UPDATEDBY_ID INTEGER,
4112
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4113
    SINGLEREAD_ID INTEGER NOT NULL
4114
);
4115

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

    
4160
CREATE TABLE SINGLEREAD_ANNOTATION (
4161
    SINGLEREAD_ID INTEGER NOT NULL,
4162
    ANNOTATIONS_ID INTEGER NOT NULL,
4163
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
4164
);
4165
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
4166
    REV INTEGER NOT NULL,
4167
    REVTYPE TINYINT,
4168
    SINGLEREAD_ID INTEGER NOT NULL,
4169
    ANNOTATIONS_ID INTEGER NOT NULL
4170
);
4171

    
4172
CREATE TABLE SINGLEREAD_MARKER (
4173
    SINGLEREAD_ID INTEGER NOT NULL,
4174
    MARKERS_ID INTEGER NOT NULL,
4175
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
4176
);
4177

    
4178
CREATE TABLE SINGLEREAD_MARKER_AUD (
4179
    REV INTEGER NOT NULL,
4180
    REVTYPE TINYINT,
4181
    SINGLEREAD_ID INTEGER NOT NULL,
4182
    MARKERS_ID INTEGER NOT NULL
4183
);
4184

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

    
4323
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4324
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4325
    IDENTIFIERS_ID INTEGER NOT NULL,
4326
    SORTINDEX INTEGER NOT NULL
4327
);
4328
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4329
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4330
    REV INTEGER NOT NULL,
4331
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4332
    IDENTIFIERS_ID INTEGER NOT NULL,
4333
    SORTINDEX INTEGER NOT NULL,
4334
    REVTYPE TINYINT
4335
);
4336
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4337

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