Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (366 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
    FIRSTNAME VARCHAR(255),
71
        INITIALS VARCHAR(50),
72
    LASTNAME 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
    FIRSTNAME VARCHAR(255),
105
    INITIALS VARCHAR(50),
106
        LASTNAME 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
        INVERSESYMBOL VARCHAR(30),
913
    LSID_AUTHORITY VARCHAR(255),
914
    LSID_LSID VARCHAR(255),
915
    LSID_NAMESPACE VARCHAR(255),
916
    LSID_OBJECT VARCHAR(255),
917
    LSID_REVISION VARCHAR(255),
918
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
919
    TITLECACHE VARCHAR(255),
920
    URI CLOB,
921
    ISO639_1 VARCHAR(2),
922
    RANKCLASS VARCHAR(4) NOT NULL,
923
    ISTECHNICAL BOOLEAN,
924
    ABSENCETERM BOOLEAN NOT NULL,
925
    ORDERINDEX INTEGER,
926
    SYMMETRICAL BOOLEAN,
927
    TRANSITIVE BOOLEAN,
928
    DEFAULTCOLOR VARCHAR(255),
929
    SUPPORTSCATEGORICALDATA BOOLEAN,
930
    SUPPORTSCOMMONTAXONNAME BOOLEAN,
931
    SUPPORTSDISTRIBUTION BOOLEAN,
932
    SUPPORTSINDIVIDUALASSOCIATION BOOLEAN,
933
    SUPPORTSQUANTITATIVEDATA BOOLEAN,
934
    SUPPORTSTAXONINTERACTION BOOLEAN,
935
    SUPPORTSTEXTDATA BOOLEAN,
936
    POINTAPPROXIMATION_ERRORRADIUS INTEGER,
937
    POINTAPPROXIMATION_LATITUDE DOUBLE,
938
    POINTAPPROXIMATION_LONGITUDE DOUBLE,
939
    VALIDPERIOD_END VARCHAR(255),
940
    VALIDPERIOD_FREETEXT VARCHAR(255),
941
    VALIDPERIOD_START VARCHAR(255),
942
    ISO3166_A2 VARCHAR(2),
943
    CREATEDBY_ID INTEGER,
944
    UPDATEDBY_ID INTEGER,
945
    KINDOF_ID INTEGER,
946
    PARTOF_ID INTEGER,
947
    VOCABULARY_ID INTEGER,
948
    LEVEL_ID INTEGER,
949
    POINTAPPROXIMATION_REFERENCESYSTEM_ID INTEGER,
950
    SHAPE_ID INTEGER,
951
    TYPE_ID INTEGER,
952
        STRUCTURE_ID INTEGER,
953
        PROPERTY_ID INTEGER,
954
);
955
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE;
956
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_AUD(
957
    DTYPE VARCHAR(31) NOT NULL,
958
    ID INTEGER NOT NULL,
959
    REV INTEGER NOT NULL,
960
    REVTYPE TINYINT,
961
    CREATED TIMESTAMP,
962
    UUID VARCHAR(36),
963
    UPDATED TIMESTAMP,
964
    TERMTYPE VARCHAR(4),
965
    IDINVOCABULARY VARCHAR(255),
966
        SYMBOL VARCHAR(30),
967
        INVERSESYMBOL VARCHAR(30),
968
    LSID_AUTHORITY VARCHAR(255),
969
    LSID_LSID VARCHAR(255),
970
    LSID_NAMESPACE VARCHAR(255),
971
    LSID_OBJECT VARCHAR(255),
972
    LSID_REVISION VARCHAR(255),
973
    PROTECTEDTITLECACHE BOOLEAN,
974
    TITLECACHE VARCHAR(255),
975
    URI CLOB,
976
    CREATEDBY_ID INTEGER,
977
    UPDATEDBY_ID INTEGER,
978
    KINDOF_ID INTEGER,
979
    PARTOF_ID INTEGER,
980
    VOCABULARY_ID INTEGER,
981
    ORDERINDEX INTEGER,
982
    ISO639_1 VARCHAR(2),
983
    RANKCLASS VARCHAR(4) NOT NULL,
984
    SUPPORTSCATEGORICALDATA BOOLEAN,
985
    SUPPORTSCOMMONTAXONNAME BOOLEAN,
986
    SUPPORTSDISTRIBUTION BOOLEAN,
987
    SUPPORTSINDIVIDUALASSOCIATION BOOLEAN,
988
    SUPPORTSQUANTITATIVEDATA BOOLEAN,
989
    SUPPORTSTAXONINTERACTION BOOLEAN,
990
    SUPPORTSTEXTDATA BOOLEAN,
991
    SYMMETRICAL BOOLEAN,
992
    TRANSITIVE BOOLEAN,
993
    ISTECHNICAL BOOLEAN,
994
    ABSENCETERM BOOLEAN NOT NULL,
995
    DEFAULTCOLOR VARCHAR(255),
996
    POINTAPPROXIMATION_ERRORRADIUS INTEGER,
997
    POINTAPPROXIMATION_LATITUDE DOUBLE,
998
    POINTAPPROXIMATION_LONGITUDE DOUBLE,
999
    VALIDPERIOD_END VARCHAR(255),
1000
    VALIDPERIOD_FREETEXT VARCHAR(255),
1001
    VALIDPERIOD_START VARCHAR(255),
1002
    ISO3166_A2 VARCHAR(2),
1003
         LEVEL_ID INTEGER,
1004
    POINTAPPROXIMATION_REFERENCESYSTEM_ID INTEGER,
1005
    SHAPE_ID INTEGER,
1006
    TYPE_ID INTEGER,
1007
    STRUCTURE_ID INTEGER,
1008
        PROPERTY_ID INTEGER,
1009
);
1010
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_AUD;
1011
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION(
1012
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1013
    ANNOTATIONS_ID INTEGER NOT NULL
1014
);
1015
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION;
1016
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD(
1017
    REV INTEGER NOT NULL,
1018
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1019
    ANNOTATIONS_ID INTEGER NOT NULL,
1020
    REVTYPE TINYINT
1021
);
1022
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD;
1023
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT(
1024
    COUNTRY_ID INTEGER NOT NULL,
1025
    CONTINENTS_ID INTEGER NOT NULL
1026
);
1027
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT;
1028
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD(
1029
    REV INTEGER NOT NULL,
1030
    COUNTRY_ID INTEGER NOT NULL,
1031
    CONTINENTS_ID INTEGER NOT NULL,
1032
    REVTYPE TINYINT
1033
);
1034
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD;
1035
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT(
1036
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1037
    CREDITS_ID INTEGER NOT NULL,
1038
    SORTINDEX INTEGER NOT NULL
1039
);
1040
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT;
1041
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT_AUD(
1042
    REV INTEGER NOT NULL,
1043
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1044
    CREDITS_ID INTEGER NOT NULL,
1045
    SORTINDEX INTEGER NOT NULL,
1046
    REVTYPE TINYINT
1047
);
1048
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT_AUD;
1049
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION(
1050
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1051
    EXTENSIONS_ID INTEGER NOT NULL
1052
);
1053
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION;
1054
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD(
1055
    REV INTEGER NOT NULL,
1056
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1057
    EXTENSIONS_ID INTEGER NOT NULL,
1058
    REVTYPE TINYINT
1059
);
1060
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD;
1061
                                                                                                     
1062
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_IDENTIFIER(
1063
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1064
    IDENTIFIERS_ID INTEGER NOT NULL,
1065
    SORTINDEX INTEGER NOT NULL
1066
);
1067
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_IDENTIFIER;
1068
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD(
1069
    REV INTEGER NOT NULL,
1070
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1071
    IDENTIFIERS_ID INTEGER NOT NULL,
1072
    SORTINDEX INTEGER NOT NULL,
1073
    REVTYPE TINYINT
1074
);
1075
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD;
1076

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

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

    
1355
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE(
1356
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1357
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL
1358
);
1359
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE;
1360
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD(
1361
    REV INTEGER NOT NULL,
1362
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1363
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL,
1364
    REVTYPE TINYINT
1365
);
1366
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE_AUD;
1367
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE(
1368
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1369
    GEOSCOPES_ID INTEGER NOT NULL
1370
);
1371
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE;
1372
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD(
1373
    REV INTEGER NOT NULL,
1374
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1375
    GEOSCOPES_ID INTEGER NOT NULL,
1376
    REVTYPE TINYINT
1377
);
1378
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD;
1379
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER(
1380
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1381
    MARKERS_ID INTEGER NOT NULL
1382
);
1383
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER;
1384
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD(
1385
    REV INTEGER NOT NULL,
1386
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1387
    MARKERS_ID INTEGER NOT NULL,
1388
    REVTYPE TINYINT
1389
);
1390
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER_AUD;
1391
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE(
1392
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1393
    SOURCES_ID INTEGER NOT NULL
1394
);
1395
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE;
1396
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD(
1397
    REV INTEGER NOT NULL,
1398
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1399
    SOURCES_ID INTEGER NOT NULL,
1400
    REVTYPE TINYINT
1401
);
1402
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD;
1403
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE(
1404
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1405
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL
1406
);
1407
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE;
1408
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD(
1409
    REV INTEGER NOT NULL,
1410
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1411
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL,
1412
    REVTYPE TINYINT
1413
);
1414
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD;
1415
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO(
1416
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1417
    RIGHTS_ID INTEGER NOT NULL
1418
);
1419
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO;
1420
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD(
1421
    REV INTEGER NOT NULL,
1422
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1423
    RIGHTS_ID INTEGER NOT NULL,
1424
    REVTYPE TINYINT
1425
);
1426
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD;
1427
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE(
1428
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1429
    SCOPES_ID INTEGER NOT NULL
1430
);
1431
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE;
1432
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD(
1433
    REV INTEGER NOT NULL,
1434
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1435
    SCOPES_ID INTEGER NOT NULL,
1436
    REVTYPE TINYINT
1437
);
1438
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE_AUD;
1439
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE(
1440
    DTYPE VARCHAR(31) NOT NULL,
1441
    ID INTEGER NOT NULL,
1442
    CREATED TIMESTAMP,
1443
    UUID VARCHAR(36),
1444
    UPDATED TIMESTAMP,
1445
    NAME VARCHAR(255),
1446
    TIMEPERIOD_START VARCHAR(255),
1447
    TIMEPERIOD_END VARCHAR(255),
1448
    TIMEPERIOD_FREETEXT VARCHAR(255),
1449
    ORDERRELEVANT BOOLEAN,
1450
--  MINIMUM DOUBLE,
1451
--        MAXIMUM DOUBLE,
1452
--        AVERAGE DOUBLE,
1453
--        TYPCALLOWERBOUNDARY DOUBLE,
1454
--        TYPCALHIGHERBOUNDARY DOUBLE,
1455
--        VARIANCE DOUBLE,
1456
--        STANDARDDEVIATION DOUBLE,
1457
--        SINGLEVALUE DOUBLE,
1458
--        SAMPLESIZE INTEGER,
1459
        UNKNOWNDATA BOOLEAN,
1460
    CREATEDBY_ID INTEGER,
1461
    UPDATEDBY_ID INTEGER,
1462
    FEATURE_ID INTEGER,
1463
    INDESCRIPTION_ID INTEGER,
1464
    AREA_ID INTEGER,
1465
    LANGUAGE_ID INTEGER,
1466
    STATUS_ID INTEGER,
1467
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1468
    UNIT_ID INTEGER,
1469
    TAXON2_ID INTEGER,
1470
    FORMAT_ID INTEGER,
1471
        
1472
);
1473
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE;
1474
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD(
1475
    DTYPE VARCHAR(31) NOT NULL,
1476
    ID INTEGER NOT NULL,
1477
    REV INTEGER NOT NULL,
1478
    REVTYPE TINYINT,
1479
    CREATED TIMESTAMP,
1480
    UUID VARCHAR(36),
1481
    UPDATED TIMESTAMP,
1482
    NAME VARCHAR(255),
1483
    TIMEPERIOD_START VARCHAR(255),
1484
    TIMEPERIOD_END VARCHAR(255),
1485
    TIMEPERIOD_FREETEXT VARCHAR(255),
1486
--  MINIMUM DOUBLE,
1487
--        MAXIMUM DOUBLE,
1488
--        AVERAGE DOUBLE,
1489
--        TYPCALLOWERBOUNDARY DOUBLE,
1490
--        TYPCALHIGHERBOUNDARY DOUBLE,
1491
--        VARIANCE DOUBLE,
1492
--        STANDARDDEVIATION DOUBLE,
1493
--        SINGLEVALUE DOUBLE,
1494
--        SAMPLESIZE INTEGER,
1495
    ORDERRELEVANT BOOLEAN,
1496
    UNKNOWNDATA BOOLEAN,
1497
    CREATEDBY_ID INTEGER,
1498
    UPDATEDBY_ID INTEGER,
1499
    FEATURE_ID INTEGER,
1500
    INDESCRIPTION_ID INTEGER,
1501
    AREA_ID INTEGER,
1502
    STATUS_ID INTEGER,
1503
    TAXON2_ID INTEGER,
1504
    UNIT_ID INTEGER,
1505
    FORMAT_ID INTEGER,
1506
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1507
    LANGUAGE_ID INTEGER
1508
);
1509
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_AUD;
1510
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION(
1511
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1512
    ANNOTATIONS_ID INTEGER NOT NULL
1513
);
1514
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION;
1515
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD(
1516
    REV INTEGER NOT NULL,
1517
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1518
    ANNOTATIONS_ID INTEGER NOT NULL,
1519
    REVTYPE TINYINT
1520
);
1521
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD;
1522
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING(
1523
    TEXTDATA_ID INTEGER NOT NULL,
1524
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1525
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL
1526
);
1527
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING;
1528
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD(
1529
    REV INTEGER NOT NULL,
1530
    TEXTDATA_ID INTEGER NOT NULL,
1531
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1532
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL,
1533
    REVTYPE TINYINT
1534
);
1535
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD;
1536
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER(
1537
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1538
    MARKERS_ID INTEGER NOT NULL
1539
);
1540
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER;
1541
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD(
1542
    REV INTEGER NOT NULL,
1543
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1544
    MARKERS_ID INTEGER NOT NULL,
1545
    REVTYPE TINYINT
1546
);
1547
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD;
1548
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA(
1549
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1550
    MEDIA_ID INTEGER NOT NULL,
1551
    SORTINDEX INTEGER NOT NULL
1552
);
1553
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA;
1554
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD(
1555
    REV INTEGER NOT NULL,
1556
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1557
    MEDIA_ID INTEGER NOT NULL,
1558
    SORTINDEX INTEGER NOT NULL,
1559
    REVTYPE TINYINT
1560
);
1561
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD;
1562
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER(
1563
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1564
    MODIFIERS_ID INTEGER NOT NULL
1565
);
1566
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER;
1567
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD(
1568
    REV INTEGER NOT NULL,
1569
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1570
    MODIFIERS_ID INTEGER NOT NULL,
1571
    REVTYPE TINYINT
1572
);
1573
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD;
1574
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT(
1575
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1576
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1577
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
1578
);
1579
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT;
1580
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD(
1581
    REV INTEGER NOT NULL,
1582
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1583
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1584
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
1585
    REVTYPE TINYINT
1586
);
1587
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD;
1588
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE(
1589
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1590
    SOURCES_ID INTEGER NOT NULL
1591
);
1592
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE;
1593
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD(
1594
    REV INTEGER NOT NULL,
1595
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1596
    SOURCES_ID INTEGER NOT NULL,
1597
    REVTYPE TINYINT
1598
);
1599
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD;
1600
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT(
1601
    ID INTEGER NOT NULL,
1602
    CREATED TIMESTAMP,
1603
    UUID VARCHAR(36),
1604
    UPDATED TIMESTAMP,
1605
    DESCRIPTION VARCHAR(255),
1606
    TIMEPERIOD_END VARCHAR(255),
1607
    TIMEPERIOD_FREETEXT VARCHAR(255),
1608
    TIMEPERIOD_START VARCHAR(255),
1609
    PREFERREDFLAG BOOLEAN NOT NULL,
1610
    CREATEDBY_ID INTEGER,
1611
    UPDATEDBY_ID INTEGER,
1612
    ACTOR_ID INTEGER,
1613
    IDENTIFIEDUNIT_ID INTEGER,
1614
    MODIFIER_ID INTEGER,
1615
    TAXON_ID INTEGER,
1616
        TAXONNAME_ID INTEGER
1617
);
1618
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT;
1619
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_AUD(
1620
    ID INTEGER NOT NULL,
1621
    REV INTEGER NOT NULL,
1622
    REVTYPE TINYINT,
1623
    CREATED TIMESTAMP,
1624
    UUID VARCHAR(36),
1625
    UPDATED TIMESTAMP,
1626
    DESCRIPTION VARCHAR(255),
1627
    TIMEPERIOD_END VARCHAR(255),
1628
    TIMEPERIOD_FREETEXT VARCHAR(255),
1629
    TIMEPERIOD_START VARCHAR(255),
1630
    PREFERREDFLAG BOOLEAN,
1631
    CREATEDBY_ID INTEGER,
1632
    UPDATEDBY_ID INTEGER,
1633
    ACTOR_ID INTEGER,
1634
    IDENTIFIEDUNIT_ID INTEGER,
1635
    MODIFIER_ID INTEGER,
1636
    TAXON_ID INTEGER,
1637
        TAXONNAME_ID INTEGER
1638
);
1639
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_AUD;
1640
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION(
1641
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1642
    ANNOTATIONS_ID INTEGER NOT NULL
1643
);
1644
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION;
1645
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD(
1646
    REV INTEGER NOT NULL,
1647
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1648
    ANNOTATIONS_ID INTEGER NOT NULL,
1649
    REVTYPE TINYINT
1650
);
1651
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD;
1652
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER(
1653
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1654
    MARKERS_ID INTEGER NOT NULL
1655
);
1656
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER;
1657
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD(
1658
    REV INTEGER NOT NULL,
1659
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1660
    MARKERS_ID INTEGER NOT NULL,
1661
    REVTYPE TINYINT
1662
);
1663
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER_AUD;
1664
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE(
1665
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1666
    SETOFREFERENCES_ID INTEGER NOT NULL
1667
);
1668
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE;
1669
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD(
1670
    REV INTEGER NOT NULL,
1671
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1672
    SETOFREFERENCES_ID INTEGER NOT NULL,
1673
    REVTYPE TINYINT
1674
);
1675

    
1676
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD;
1677
CREATE CACHED TABLE PUBLIC.DNAQUALITY(
1678
    ID INTEGER NOT NULL,
1679
    CREATED TIMESTAMP,
1680
    UUID VARCHAR(36) NOT NULL,
1681
    UPDATED TIMESTAMP,
1682
    PURIFICATIONMETHOD VARCHAR(255),
1683
    RATIOOFABSORBANCE260_230 DOUBLE,
1684
    RATIOOFABSORBANCE260_280 DOUBLE,
1685
    QUALITYCHECKDATE TIMESTAMP,
1686
    CONCENTRATION DOUBLE,
1687
    CREATEDBY_ID INTEGER,
1688
    UPDATEDBY_ID INTEGER,
1689
    CONCENTRATIONUNIT_ID INTEGER,
1690
    QUALITYTERM_ID INTEGER,
1691
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1692
);
1693
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY;
1694
CREATE CACHED TABLE PUBLIC.DNAQUALITY_AUD(
1695
    ID INTEGER NOT NULL,
1696
    REV INTEGER NOT NULL,
1697
    REVTYPE TINYINT,
1698
    CREATED TIMESTAMP,
1699
    UUID VARCHAR(36) NOT NULL,
1700
    UPDATED TIMESTAMP,
1701
    PURIFICATIONMETHOD VARCHAR(255),
1702
    RATIOOFABSORBANCE260_230 DOUBLE,
1703
    RATIOOFABSORBANCE260_280 DOUBLE,
1704
    QUALITYCHECKDATE TIMESTAMP,
1705
    CONCENTRATION DOUBLE,
1706
    CREATEDBY_ID INTEGER,
1707
    UPDATEDBY_ID INTEGER,
1708
    CONCENTRATIONUNIT_ID INTEGER,
1709
    QUALITYTERM_ID INTEGER,
1710
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1711
);
1712
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY_AUD;
1713

    
1714
CREATE CACHED TABLE PUBLIC.ENTITYVALIDATION(
1715
    ID INTEGER NOT NULL,
1716
    UUID VARCHAR(36),
1717
    CREATED TIMESTAMP,
1718
    VALIDATEDENTITYID INTEGER,
1719
    VALIDATEDENTITYUUID VARCHAR(36),
1720
    VALIDATEDENTITYCLASS VARCHAR(255),
1721
    VALIDATIONCOUNT INTEGER,
1722
    UPDATED TIMESTAMP,
1723
    USERFRIENDLYDESCRIPTION VARCHAR(255),
1724
    USERFRIENDLYTYPENAME VARCHAR(255),
1725
    CREATEDBY_ID INTEGER,
1726
    UPDATEDBY_ID INTEGER,
1727
    CRUDEVENTTYPE VARCHAR(24),
1728
    STATUS VARCHAR(16)
1729
);
1730
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYVALIDATION;
1731

    
1732
CREATE CACHED TABLE PUBLIC.ENTITYCONSTRAINTVIOLATION(
1733
    ID INTEGER NOT NULL,
1734
    UUID VARCHAR(36),
1735
    CREATED TIMESTAMP,
1736
    PROPERTYPATH VARCHAR(255),
1737
    USERFRIENDLYFIELDNAME VARCHAR(255),
1738
    INVALIDVALUE VARCHAR(255),
1739
    SEVERITY VARCHAR(24),
1740
    MESSAGE VARCHAR(255),
1741
    VALIDATOR VARCHAR(255),
1742
    VALIDATIONGROUP VARCHAR(63),
1743
    CREATEDBY_ID INTEGER,
1744
    UPDATEDBY_ID INTEGER,
1745
    ENTITYVALIDATION_ID INTEGER
1746
);
1747
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYCONSTRAINTVIOLATION;
1748

    
1749
CREATE CACHED TABLE PUBLIC.EXTENSION(
1750
    ID INTEGER NOT NULL,
1751
    CREATED TIMESTAMP,
1752
    UUID VARCHAR(36),
1753
    UPDATED TIMESTAMP,
1754
    VALUE CLOB,
1755
    CREATEDBY_ID INTEGER,
1756
    UPDATEDBY_ID INTEGER,
1757
    TYPE_ID INTEGER
1758
);
1759
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION;
1760
CREATE CACHED TABLE PUBLIC.EXTENSION_AUD(
1761
    ID INTEGER NOT NULL,
1762
    REV INTEGER NOT NULL,
1763
    REVTYPE TINYINT,
1764
    CREATED TIMESTAMP,
1765
    UUID VARCHAR(36),
1766
    UPDATED TIMESTAMP,
1767
    VALUE CLOB,
1768
    CREATEDBY_ID INTEGER,
1769
    UPDATEDBY_ID INTEGER,
1770
    TYPE_ID INTEGER
1771
);
1772
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION_AUD;
1773
CREATE CACHED TABLE PUBLIC.FEATURENODE(
1774
    ID INTEGER NOT NULL,
1775
    CREATED TIMESTAMP,
1776
    UUID VARCHAR(36),
1777
    UPDATED TIMESTAMP,
1778
    SORTINDEX INTEGER,
1779
    TREEINDEX VARCHAR(255),
1780
    CREATEDBY_ID INTEGER,
1781
    UPDATEDBY_ID INTEGER,
1782
    FEATURE_ID INTEGER,
1783
    FEATURETREE_ID INTEGER,
1784
    PARENT_ID INTEGER
1785
);
1786
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE;
1787
CREATE CACHED TABLE PUBLIC.FEATURENODE_AUD(
1788
    ID INTEGER NOT NULL,
1789
    REV INTEGER NOT NULL,
1790
    REVTYPE TINYINT,
1791
    CREATED TIMESTAMP,
1792
    UUID VARCHAR(36),
1793
    UPDATED TIMESTAMP,
1794
    SORTINDEX INTEGER,
1795
    TREEINDEX VARCHAR(255),
1796
    CREATEDBY_ID INTEGER,
1797
    UPDATEDBY_ID INTEGER,
1798
    FEATURE_ID INTEGER,
1799
    FEATURETREE_ID INTEGER,
1800
    PARENT_ID INTEGER
1801
);
1802
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_AUD;
1803
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF(
1804
    FEATURENODE_ID INTEGER NOT NULL,
1805
    INAPPLICABLEIF_ID INTEGER NOT NULL
1806
);
1807
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF;
1808
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD(
1809
    REV INTEGER NOT NULL,
1810
    FEATURENODE_ID INTEGER NOT NULL,
1811
    INAPPLICABLEIF_ID INTEGER NOT NULL,
1812
    REVTYPE TINYINT
1813
);
1814
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD;
1815
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE(
1816
    FEATURENODE_ID INTEGER NOT NULL,
1817
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL
1818
);
1819
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE;
1820
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD(
1821
    REV INTEGER NOT NULL,
1822
    FEATURENODE_ID INTEGER NOT NULL,
1823
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL,
1824
    REVTYPE TINYINT
1825
);
1826
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD;
1827
CREATE CACHED TABLE PUBLIC.FEATURETREE(
1828
    ID INTEGER NOT NULL,
1829
    CREATED TIMESTAMP,
1830
    UUID VARCHAR(36),
1831
    UPDATED TIMESTAMP,
1832
    LSID_AUTHORITY VARCHAR(255),
1833
    LSID_LSID VARCHAR(255),
1834
    LSID_NAMESPACE VARCHAR(255),
1835
    LSID_OBJECT VARCHAR(255),
1836
    LSID_REVISION VARCHAR(255),
1837
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
1838
    TITLECACHE VARCHAR(255),
1839
    CREATEDBY_ID INTEGER,
1840
    UPDATEDBY_ID INTEGER,
1841
    ROOT_ID INTEGER
1842
);
1843
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE;
1844
CREATE CACHED TABLE PUBLIC.FEATURETREE_AUD(
1845
    ID INTEGER NOT NULL,
1846
    REV INTEGER NOT NULL,
1847
    REVTYPE TINYINT,
1848
    CREATED TIMESTAMP,
1849
    UUID VARCHAR(36),
1850
    UPDATED TIMESTAMP,
1851
    LSID_AUTHORITY VARCHAR(255),
1852
    LSID_LSID VARCHAR(255),
1853
    LSID_NAMESPACE VARCHAR(255),
1854
    LSID_OBJECT VARCHAR(255),
1855
    LSID_REVISION VARCHAR(255),
1856
    PROTECTEDTITLECACHE BOOLEAN,
1857
    TITLECACHE VARCHAR(255),
1858
    CREATEDBY_ID INTEGER,
1859
    UPDATEDBY_ID INTEGER,
1860
    ROOT_ID INTEGER
1861
);
1862
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_AUD;
1863
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION(
1864
    FEATURETREE_ID INTEGER NOT NULL,
1865
    ANNOTATIONS_ID INTEGER NOT NULL
1866
);
1867
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION;
1868
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD(
1869
    REV INTEGER NOT NULL,
1870
    FEATURETREE_ID INTEGER NOT NULL,
1871
    ANNOTATIONS_ID INTEGER NOT NULL,
1872
    REVTYPE TINYINT
1873
);
1874
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION_AUD;
1875
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT(
1876
    FEATURETREE_ID INTEGER NOT NULL,
1877
    CREDITS_ID INTEGER NOT NULL,
1878
    SORTINDEX INTEGER NOT NULL
1879
);
1880
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT;
1881
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT_AUD(
1882
    REV INTEGER NOT NULL,
1883
    FEATURETREE_ID INTEGER NOT NULL,
1884
    CREDITS_ID INTEGER NOT NULL,
1885
    SORTINDEX INTEGER NOT NULL,
1886
    REVTYPE TINYINT
1887
);
1888
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT_AUD;
1889
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION(
1890
    FEATURETREE_ID INTEGER NOT NULL,
1891
    EXTENSIONS_ID INTEGER NOT NULL
1892
);
1893
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION;
1894
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION_AUD(
1895
    REV INTEGER NOT NULL,
1896
    FEATURETREE_ID INTEGER NOT NULL,
1897
    EXTENSIONS_ID INTEGER NOT NULL,
1898
    REVTYPE TINYINT
1899
);
1900
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION_AUD;
1901
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER(
1902
    FEATURETREE_ID INTEGER NOT NULL,
1903
    IDENTIFIERS_ID INTEGER NOT NULL,
1904
    SORTINDEX INTEGER NOT NULL
1905
);
1906
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER;
1907
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER_AUD(
1908
    REV INTEGER NOT NULL,
1909
    FEATURETREE_ID INTEGER NOT NULL,
1910
    IDENTIFIERS_ID INTEGER NOT NULL,
1911
    SORTINDEX INTEGER NOT NULL,
1912
    REVTYPE TINYINT
1913
);
1914
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER_AUD;
1915
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER(
1916
    FEATURETREE_ID INTEGER NOT NULL,
1917
    MARKERS_ID INTEGER NOT NULL
1918
);
1919
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER;
1920
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER_AUD(
1921
    REV INTEGER NOT NULL,
1922
    FEATURETREE_ID INTEGER NOT NULL,
1923
    MARKERS_ID INTEGER NOT NULL,
1924
    REVTYPE TINYINT
1925
);
1926
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER_AUD;
1927
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE(
1928
    FEATURETREE_ID INTEGER NOT NULL,
1929
    SOURCES_ID INTEGER NOT NULL
1930
);
1931
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE;
1932
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD(
1933
    REV INTEGER NOT NULL,
1934
    FEATURETREE_ID INTEGER NOT NULL,
1935
    SOURCES_ID INTEGER NOT NULL,
1936
    REVTYPE TINYINT
1937
);
1938
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD;
1939
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION(
1940
    FEATURETREE_ID INTEGER NOT NULL,
1941
    REPRESENTATIONS_ID INTEGER NOT NULL
1942
);
1943
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION;
1944
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD(
1945
    REV INTEGER NOT NULL,
1946
    FEATURETREE_ID INTEGER NOT NULL,
1947
    REPRESENTATIONS_ID INTEGER NOT NULL,
1948
    REVTYPE TINYINT
1949
);
1950
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION_AUD;
1951
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO(
1952
    FEATURETREE_ID INTEGER NOT NULL,
1953
    RIGHTS_ID INTEGER NOT NULL
1954
);
1955
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO;
1956
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO_AUD(
1957
    REV INTEGER NOT NULL,
1958
    FEATURETREE_ID INTEGER NOT NULL,
1959
    RIGHTS_ID INTEGER NOT NULL,
1960
    REVTYPE TINYINT
1961
);
1962
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO_AUD;
1963
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT(
1964
    ID INTEGER NOT NULL,
1965
    CREATED TIMESTAMP,
1966
    UUID VARCHAR(36),
1967
    UPDATED TIMESTAMP,
1968
    DESCRIPTION VARCHAR(255),
1969
    TIMEPERIOD_END VARCHAR(255),
1970
    TIMEPERIOD_FREETEXT VARCHAR(255),
1971
    TIMEPERIOD_START VARCHAR(255),
1972
    ABSOLUTEELEVATION INTEGER,
1973
    ABSOLUTEELEVATIONMAX INTEGER,
1974
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
1975
    COLLECTINGMETHOD VARCHAR(255),
1976
    DISTANCETOGROUND DOUBLE,
1977
    DISTANCETOGROUNDMAX DOUBLE,
1978
    DISTANCETOGROUNDTEXT VARCHAR(30),
1979
    DISTANCETOWATERSURFACE DOUBLE,
1980
    DISTANCETOWATERSURFACEMAX DOUBLE,
1981
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
1982
    EXACTLOCATION_ERRORRADIUS INTEGER,
1983
    EXACTLOCATION_LATITUDE DOUBLE,
1984
    EXACTLOCATION_LONGITUDE DOUBLE,
1985
    CREATEDBY_ID INTEGER,
1986
    UPDATEDBY_ID INTEGER,
1987
    ACTOR_ID INTEGER,
1988
    COUNTRY_ID INTEGER,
1989
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
1990
    LOCALITY_ID INTEGER
1991
);
1992
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT;
1993
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_AUD(
1994
    ID INTEGER NOT NULL,
1995
    REV INTEGER NOT NULL,
1996
    REVTYPE TINYINT,
1997
    CREATED TIMESTAMP,
1998
    UUID VARCHAR(36),
1999
    UPDATED TIMESTAMP,
2000
    DESCRIPTION VARCHAR(255),
2001
    TIMEPERIOD_END VARCHAR(255),
2002
    TIMEPERIOD_FREETEXT VARCHAR(255),
2003
    TIMEPERIOD_START VARCHAR(255),
2004
    ABSOLUTEELEVATION INTEGER,
2005
    ABSOLUTEELEVATIONMAX INTEGER,
2006
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
2007
    COLLECTINGMETHOD VARCHAR(255),
2008
    DISTANCETOGROUND DOUBLE,
2009
    DISTANCETOGROUNDMAX DOUBLE,
2010
    DISTANCETOGROUNDTEXT VARCHAR(30),
2011
    DISTANCETOWATERSURFACE DOUBLE,
2012
    DISTANCETOWATERSURFACEMAX DOUBLE,
2013
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
2014
    EXACTLOCATION_ERRORRADIUS INTEGER,
2015
    EXACTLOCATION_LATITUDE DOUBLE,
2016
    EXACTLOCATION_LONGITUDE DOUBLE,
2017
    CREATEDBY_ID INTEGER,
2018
    UPDATEDBY_ID INTEGER,
2019
    ACTOR_ID INTEGER,
2020
    COUNTRY_ID INTEGER,
2021
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
2022
    LOCALITY_ID INTEGER
2023
);
2024
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_AUD;
2025
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION(
2026
    GATHERINGEVENT_ID INTEGER NOT NULL,
2027
    ANNOTATIONS_ID INTEGER NOT NULL
2028
);
2029
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION;
2030
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD(
2031
    REV INTEGER NOT NULL,
2032
    GATHERINGEVENT_ID INTEGER NOT NULL,
2033
    ANNOTATIONS_ID INTEGER NOT NULL,
2034
    REVTYPE TINYINT
2035
);
2036
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION_AUD;
2037
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE(
2038
    GATHERINGEVENT_ID INTEGER NOT NULL,
2039
    COLLECTINGAREAS_ID INTEGER NOT NULL
2040
);
2041
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE;
2042
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD(
2043
    REV INTEGER NOT NULL,
2044
    GATHERINGEVENT_ID INTEGER NOT NULL,
2045
    COLLECTINGAREAS_ID INTEGER NOT NULL,
2046
    REVTYPE TINYINT
2047
);
2048
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD;
2049
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER(
2050
    GATHERINGEVENT_ID INTEGER NOT NULL,
2051
    MARKERS_ID INTEGER NOT NULL
2052
);
2053
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER;
2054
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD(
2055
    REV INTEGER NOT NULL,
2056
    GATHERINGEVENT_ID INTEGER NOT NULL,
2057
    MARKERS_ID INTEGER NOT NULL,
2058
    REVTYPE TINYINT
2059
);
2060
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER_AUD;
2061
CREATE CACHED TABLE PUBLIC.GRANTEDAUTHORITYIMPL(
2062
    ID INTEGER NOT NULL,
2063
    CREATED TIMESTAMP,
2064
    UUID VARCHAR(36),
2065
    AUTHORITY VARCHAR(255) NOT NULL,
2066
    CREATEDBY_ID INTEGER
2067
);
2068
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GRANTEDAUTHORITYIMPL;
2069
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP(
2070
    ID INTEGER NOT NULL,
2071
    CREATED TIMESTAMP,
2072
    UUID VARCHAR(36),
2073
    UPDATED TIMESTAMP,
2074
    CREATEDBY_ID INTEGER,
2075
    UPDATEDBY_ID INTEGER
2076
);
2077
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP;
2078
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_AUD(
2079
    ID INTEGER NOT NULL,
2080
    REV INTEGER NOT NULL,
2081
    REVTYPE TINYINT,
2082
    CREATED TIMESTAMP,
2083
    UUID VARCHAR(36),
2084
    UPDATED TIMESTAMP,
2085
    CREATEDBY_ID INTEGER,
2086
    UPDATEDBY_ID INTEGER
2087
);
2088
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_AUD;
2089
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION(
2090
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2091
    ANNOTATIONS_ID INTEGER NOT NULL
2092
);
2093
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION;
2094
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD(
2095
    REV INTEGER NOT NULL,
2096
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2097
    ANNOTATIONS_ID INTEGER NOT NULL,
2098
    REVTYPE TINYINT
2099
);
2100
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD;
2101
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER(
2102
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2103
    MARKERS_ID INTEGER NOT NULL
2104
);
2105
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER;
2106
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD(
2107
    REV INTEGER NOT NULL,
2108
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2109
    MARKERS_ID INTEGER NOT NULL,
2110
    REVTYPE TINYINT
2111
);
2112
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER_AUD;
2113
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP(
2114
    ID INTEGER NOT NULL,
2115
    CREATED TIMESTAMP,
2116
    UUID VARCHAR(36),
2117
    UPDATED TIMESTAMP,
2118
    CITATIONMICROREFERENCE VARCHAR(255),
2119
    ORIGINALNAMESTRING VARCHAR(255),
2120
    DOUBTFUL BOOLEAN NOT NULL,
2121
    RULECONSIDERED VARCHAR(255),
2122
    CREATEDBY_ID INTEGER,
2123
    UPDATEDBY_ID INTEGER,
2124
    CITATION_ID INTEGER,
2125
    RELATEDFROM_ID INTEGER,
2126
    RELATEDTO_ID INTEGER,
2127
    TYPE_ID INTEGER
2128
);
2129
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP;
2130
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD(
2131
    ID INTEGER NOT NULL,
2132
    REV INTEGER NOT NULL,
2133
    REVTYPE TINYINT,
2134
    CREATED TIMESTAMP,
2135
    UUID VARCHAR(36),
2136
    UPDATED TIMESTAMP,
2137
    CITATIONMICROREFERENCE VARCHAR(255),
2138
    ORIGINALNAMESTRING VARCHAR(255),
2139
    DOUBTFUL BOOLEAN,
2140
    RULECONSIDERED VARCHAR(255),
2141
    CREATEDBY_ID INTEGER,
2142
    UPDATEDBY_ID INTEGER,
2143
    CITATION_ID INTEGER,
2144
    RELATEDFROM_ID INTEGER,
2145
    RELATEDTO_ID INTEGER,
2146
    TYPE_ID INTEGER
2147
);
2148
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_AUD;
2149
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION(
2150
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2151
    ANNOTATIONS_ID INTEGER NOT NULL
2152
);
2153
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION;
2154
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD(
2155
    REV INTEGER NOT NULL,
2156
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2157
    ANNOTATIONS_ID INTEGER NOT NULL,
2158
    REVTYPE TINYINT
2159
);
2160
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD;
2161
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER(
2162
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2163
    MARKERS_ID INTEGER NOT NULL
2164
);
2165
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER;
2166
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD(
2167
    REV INTEGER NOT NULL,
2168
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2169
    MARKERS_ID INTEGER NOT NULL,
2170
    REVTYPE TINYINT
2171
);
2172
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD;
2173
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING(
2174
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2175
    DESCRIPTION_ID INTEGER NOT NULL,
2176
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2177
);
2178
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING;
2179
CREATE CACHED TABLE PUBLIC.IDENTIFIER(
2180
    ID INTEGER NOT NULL,
2181
    UUID VARCHAR(36),
2182
    CREATED TIMESTAMP,
2183
    UPDATED TIMESTAMP,
2184
    IDENTIFIER VARCHAR(800),
2185
    CREATEDBY_ID INTEGER,
2186
    UPDATEDBY_ID INTEGER,
2187
          TYPE_ID INTEGER  
2188
);
2189
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER;
2190
CREATE CACHED TABLE PUBLIC.IDENTIFIER_AUD(
2191
        ID INTEGER NOT NULL,
2192
    REV INTEGER NOT NULL,
2193
    REVTYPE TINYINT,
2194
    UUID VARCHAR(36),
2195
    CREATED TIMESTAMP,
2196
    UPDATED TIMESTAMP,
2197
    IDENTIFIER VARCHAR(800),
2198
    CREATEDBY_ID INTEGER,
2199
    UPDATEDBY_ID INTEGER,
2200
          TYPE_ID INTEGER  
2201
);
2202
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_AUD;
2203
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION(
2204
    IDENTIFIER_ID INTEGER NOT NULL,
2205
    ANNOTATIONS_ID INTEGER NOT NULL
2206
);
2207
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION;
2208
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION_AUD(
2209
    REV INTEGER NOT NULL,
2210
    IDENTIFIER_ID INTEGER NOT NULL,
2211
    ANNOTATIONS_ID INTEGER NOT NULL,
2212
    REVTYPE TINYINT
2213
);
2214
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION_AUD;
2215
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER(
2216
    IDENTIFIER_ID INTEGER NOT NULL,
2217
    MARKERS_ID INTEGER NOT NULL
2218
);
2219
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER;
2220
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER_AUD(
2221
    REV INTEGER NOT NULL,
2222
    IDENTIFIER_ID INTEGER NOT NULL,
2223
    MARKERS_ID INTEGER NOT NULL,
2224
    REVTYPE TINYINT
2225
);
2226
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER_AUD;
2227
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE(
2228
    ID INTEGER NOT NULL,
2229
    UUID VARCHAR(36),
2230
    CREATED TIMESTAMP,
2231
    UPDATED TIMESTAMP,
2232
    CREATEDBY_ID INTEGER,
2233
    UPDATEDBY_ID INTEGER,
2234
          STARTPOS INT,
2235
          ENDPOS INT,
2236
          AGENT_ID INT,
2237
          ANNOTATION_ID INT,
2238
          LANGUAGESTRING_ID INT,
2239
          MEDIA_ID INT,
2240
          OCCURRENCE_ID INT,
2241
          REFERENCE_ID INT,
2242
          TAXON_ID INT,
2243
          TAXONNAME_ID INT,
2244
        KEY_ID INT
2245
);
2246
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE;
2247
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE_AUD(
2248
    ID INTEGER NOT NULL,
2249
    REV INTEGER NOT NULL,
2250
    REVTYPE TINYINT,
2251
    UUID VARCHAR(36),
2252
    CREATED TIMESTAMP,
2253
    UPDATED TIMESTAMP,
2254
    CREATEDBY_ID INTEGER,
2255
    UPDATEDBY_ID INTEGER,
2256
          STARTPOS INT,
2257
          ENDPOS INT,
2258
          AGENT_ID INT,
2259
          ANNOTATION_ID INT,
2260
          LANGUAGESTRING_ID INT,
2261
          MEDIA_ID INT,
2262
          OCCURRENCE_ID INT,
2263
          REFERENCE_ID INT,
2264
          TAXON_ID INT,
2265
          TAXONNAME_ID INT,
2266
        KEY_ID INT
2267
);
2268
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE_AUD;
2269

    
2270
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD(
2271
    REV INTEGER NOT NULL,
2272
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2273
    DESCRIPTION_ID INTEGER NOT NULL,
2274
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2275
    REVTYPE TINYINT
2276
);
2277
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD;
2278
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP(
2279
    ID INTEGER NOT NULL,
2280
    CREATED TIMESTAMP,
2281
    UUID VARCHAR(36),
2282
    UPDATED TIMESTAMP,
2283
    DEPARTMENT VARCHAR(255),
2284
    PERIOD_END VARCHAR(255),
2285
    PERIOD_FREETEXT VARCHAR(255),
2286
    PERIOD_START VARCHAR(255),
2287
    ROLE VARCHAR(255),
2288
    CREATEDBY_ID INTEGER,
2289
    UPDATEDBY_ID INTEGER,
2290
    INSTITUTE_ID INTEGER,
2291
    PERSON_ID INTEGER
2292
);
2293
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP;
2294
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD(
2295
    ID INTEGER NOT NULL,
2296
    REV INTEGER NOT NULL,
2297
    REVTYPE TINYINT,
2298
    CREATED TIMESTAMP,
2299
    UUID VARCHAR(36),
2300
    UPDATED TIMESTAMP,
2301
    DEPARTMENT VARCHAR(255),
2302
    PERIOD_END VARCHAR(255),
2303
    PERIOD_FREETEXT VARCHAR(255),
2304
    PERIOD_START VARCHAR(255),
2305
    ROLE VARCHAR(255),
2306
    CREATEDBY_ID INTEGER,
2307
    UPDATEDBY_ID INTEGER,
2308
    INSTITUTE_ID INTEGER,
2309
    PERSON_ID INTEGER
2310
);
2311
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP_AUD;
2312
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT(
2313
    ID INTEGER NOT NULL,
2314
    CREATED TIMESTAMP,
2315
    UUID VARCHAR(36),
2316
    UPDATED TIMESTAMP,
2317
    CREATEDBY_ID INTEGER,
2318
    UPDATEDBY_ID INTEGER
2319
);
2320
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT;
2321
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_AUD(
2322
    ID INTEGER NOT NULL,
2323
    REV INTEGER NOT NULL,
2324
    REVTYPE TINYINT,
2325
    CREATED TIMESTAMP,
2326
    UUID VARCHAR(36),
2327
    UPDATED TIMESTAMP,
2328
    CREATEDBY_ID INTEGER,
2329
    UPDATEDBY_ID INTEGER
2330
);
2331
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_AUD;
2332
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING(
2333
    KEYSTATEMENT_ID INTEGER NOT NULL,
2334
    LABEL_ID INTEGER NOT NULL,
2335
    LABEL_MAPKEY_ID INTEGER NOT NULL
2336
);
2337
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING;
2338
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD(
2339
    REV INTEGER NOT NULL,
2340
    KEYSTATEMENT_ID INTEGER NOT NULL,
2341
    LABEL_ID INTEGER NOT NULL,
2342
    LABEL_MAPKEY_ID INTEGER NOT NULL,
2343
    REVTYPE TINYINT
2344
);
2345
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD;
2346
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY(
2347
    ID INTEGER NOT NULL,
2348
    CREATED TIMESTAMP,
2349
    UUID VARCHAR(36),
2350
    AUTHORITY VARCHAR(255),
2351
    AUTHORITYWSDL CLOB,
2352
    PORT INTEGER NOT NULL,
2353
    SERVER VARCHAR(255),
2354
    URL VARCHAR(255),
2355
    CREATEDBY_ID INTEGER
2356
);
2357
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY;
2358
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES(
2359
    LSIDAUTHORITY_ID INTEGER NOT NULL,
2360
    NAMESPACES_ELEMENT VARCHAR(255),
2361
    NAMESPACES_MAPKEY VARCHAR(255) NOT NULL
2362
);
2363
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY_NAMESPACES;
2364
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING(
2365
    ID INTEGER NOT NULL,
2366
    CREATED TIMESTAMP,
2367
    UUID VARCHAR(36),
2368
    UPDATED TIMESTAMP,
2369
    TEXT CLOB,
2370
    CREATEDBY_ID INTEGER,
2371
    UPDATEDBY_ID INTEGER,
2372
    LANGUAGE_ID INTEGER
2373
);
2374
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING;
2375
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_AUD(
2376
    ID INTEGER NOT NULL,
2377
    REV INTEGER NOT NULL,
2378
    REVTYPE TINYINT,
2379
    CREATED TIMESTAMP,
2380
    UUID VARCHAR(36),
2381
    UPDATED TIMESTAMP,
2382
    TEXT CLOB,
2383
    CREATEDBY_ID INTEGER,
2384
    UPDATEDBY_ID INTEGER,
2385
    LANGUAGE_ID INTEGER
2386
);
2387
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_AUD;
2388
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION(
2389
    LANGUAGESTRING_ID INTEGER NOT NULL,
2390
    ANNOTATIONS_ID INTEGER NOT NULL
2391
);
2392
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION;
2393
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD(
2394
    REV INTEGER NOT NULL,
2395
    LANGUAGESTRING_ID INTEGER NOT NULL,
2396
    ANNOTATIONS_ID INTEGER NOT NULL,
2397
    REVTYPE TINYINT
2398
);
2399
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION_AUD;
2400
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER(
2401
    LANGUAGESTRING_ID INTEGER NOT NULL,
2402
    MARKERS_ID INTEGER NOT NULL
2403
);
2404
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER;
2405
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD(
2406
    REV INTEGER NOT NULL,
2407
    LANGUAGESTRING_ID INTEGER NOT NULL,
2408
    MARKERS_ID INTEGER NOT NULL,
2409
    REVTYPE TINYINT
2410
);
2411
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER_AUD;
2412
CREATE CACHED TABLE PUBLIC.LOCUS(
2413
    ID INTEGER NOT NULL,
2414
    CREATED TIMESTAMP,
2415
    UUID VARCHAR(36),
2416
    UPDATED TIMESTAMP,
2417
    DESCRIPTION VARCHAR(255),
2418
    NAME VARCHAR(255),
2419
    CREATEDBY_ID INTEGER,
2420
    UPDATEDBY_ID INTEGER
2421
);
2422
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS;
2423
CREATE CACHED TABLE PUBLIC.LOCUS_AUD(
2424
    ID INTEGER NOT NULL,
2425
    REV INTEGER NOT NULL,
2426
    REVTYPE TINYINT,
2427
    CREATED TIMESTAMP,
2428
    UUID VARCHAR(36),
2429
    UPDATED TIMESTAMP,
2430
    DESCRIPTION VARCHAR(255),
2431
    NAME VARCHAR(255),
2432
    CREATEDBY_ID INTEGER,
2433
    UPDATEDBY_ID INTEGER
2434
);
2435
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS_AUD;
2436
CREATE CACHED TABLE PUBLIC.MARKER(
2437
    ID INTEGER NOT NULL,
2438
    CREATED TIMESTAMP,
2439
    UUID VARCHAR(36),
2440
    UPDATED TIMESTAMP,
2441
    FLAG BOOLEAN NOT NULL,
2442
    CREATEDBY_ID INTEGER,
2443
    UPDATEDBY_ID INTEGER,
2444
    MARKERTYPE_ID INTEGER
2445
);
2446
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER;
2447
CREATE CACHED TABLE PUBLIC.MARKER_AUD(
2448
    ID INTEGER NOT NULL,
2449
    REV INTEGER NOT NULL,
2450
    REVTYPE TINYINT,
2451
    CREATED TIMESTAMP,
2452
    UUID VARCHAR(36),
2453
    UPDATED TIMESTAMP,
2454
    FLAG BOOLEAN,
2455
    CREATEDBY_ID INTEGER,
2456
    UPDATEDBY_ID INTEGER,
2457
    MARKERTYPE_ID INTEGER
2458
);
2459

    
2460
CREATE TABLE MATERIALORMETHODEVENT (
2461
    ID INTEGER NOT NULL,
2462
    DTYPE VARCHAR(255),
2463
    CREATED TIMESTAMP,
2464
    UUID VARCHAR(36),
2465
    UPDATED TIMESTAMP,
2466
    MATERIALMETHODTEXT VARCHAR(255),
2467
    DESCRIPTION VARCHAR(255),
2468
    TIMEPERIOD_END VARCHAR(255),
2469
    TIMEPERIOD_FREETEXT VARCHAR(255),
2470
    TIMEPERIOD_START VARCHAR(255),
2471
        STRAIN VARCHAR(255),
2472
    TEMPERATURE DOUBLE,
2473
    CREATEDBY_ID INTEGER,
2474
    UPDATEDBY_ID INTEGER,
2475
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2476
    ACTOR_ID INTEGER,
2477
    FORWARDPRIMER_ID INTEGER,
2478
    REVERSEPRIMER_ID INTEGER,
2479
    MEDIUM_ID INTEGER,
2480
    PRIMARY KEY (ID)
2481
);
2482

    
2483
CREATE TABLE MATERIALORMETHODEVENT_AUD (
2484
    ID INTEGER NOT NULL,
2485
    REV INTEGER NOT NULL,
2486
    REVTYPE TINYINT,
2487
        DTYPE VARCHAR(255),
2488
    CREATED TIMESTAMP,
2489
    UUID VARCHAR(36),
2490
    UPDATED TIMESTAMP,
2491
    MATERIALMETHODTEXT VARCHAR(255),
2492
    DESCRIPTION VARCHAR(255),
2493
    TIMEPERIOD_END VARCHAR(255),
2494
    TIMEPERIOD_FREETEXT VARCHAR(255),
2495
    TIMEPERIOD_START VARCHAR(255),
2496
        STRAIN VARCHAR(255),
2497
    TEMPERATURE DOUBLE,
2498
    CREATEDBY_ID INTEGER,
2499
    UPDATEDBY_ID INTEGER,
2500
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2501
    ACTOR_ID INTEGER,
2502
    FORWARDPRIMER_ID INTEGER,
2503
    REVERSEPRIMER_ID INTEGER,
2504
    MEDIUM_ID INTEGER
2505
);
2506

    
2507
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2508
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2509
    ANNOTATIONS_ID INTEGER NOT NULL,
2510
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2511
);
2512

    
2513
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2514
    REV INTEGER NOT NULL,
2515
    REVTYPE TINYINT,
2516
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2517
    ANNOTATIONS_ID INTEGER NOT NULL,
2518
);
2519

    
2520
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2521
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2522
    MARKERS_ID INTEGER NOT NULL,
2523
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2524
);
2525

    
2526
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2527
    REV INTEGER NOT NULL,
2528
    REVTYPE TINYINT,
2529
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2530
    MARKERS_ID INTEGER NOT NULL,
2531
);
2532

    
2533
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER_AUD;
2534
CREATE CACHED TABLE PUBLIC.MEDIA(
2535
    DTYPE VARCHAR(31) NOT NULL,
2536
    ID INTEGER NOT NULL,
2537
    CREATED TIMESTAMP,
2538
    UUID VARCHAR(36),
2539
    UPDATED TIMESTAMP,
2540
    LSID_AUTHORITY VARCHAR(255),
2541
    LSID_LSID VARCHAR(255),
2542
    LSID_NAMESPACE VARCHAR(255),
2543
    LSID_OBJECT VARCHAR(255),
2544
    LSID_REVISION VARCHAR(255),
2545
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
2546
    TITLECACHE VARCHAR(255),
2547
    MEDIACREATED TIMESTAMP,
2548
    CITATIONMICROREFERENCE VARCHAR(255),
2549
    CREATEDBY_ID INTEGER,
2550
    UPDATEDBY_ID INTEGER,
2551
    ARTIST_ID INTEGER,
2552
    CITATION_ID INTEGER
2553
);
2554
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA;
2555
CREATE CACHED TABLE PUBLIC.MEDIAKEY_COVEREDTAXON(
2556
    MEDIAKEY_ID INTEGER NOT NULL,
2557
    COVEREDTAXA_ID INTEGER NOT NULL
2558
);
2559
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_COVEREDTAXON;
2560
CREATE CACHED TABLE PUBLIC.MEDIAKEY_COVEREDTAXON_AUD(
2561
    REV INTEGER NOT NULL,
2562
    MEDIAKEY_ID INTEGER NOT NULL,
2563
    COVEREDTAXA_ID INTEGER NOT NULL,
2564
    REVTYPE TINYINT
2565
);
2566
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_COVEREDTAXON_AUD;
2567
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA(
2568
    MEDIAKEY_ID INTEGER NOT NULL,
2569
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
2570
);
2571
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA;
2572
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA_AUD(
2573
    REV INTEGER NOT NULL,
2574
    MEDIAKEY_ID INTEGER NOT NULL,
2575
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
2576
    REVTYPE TINYINT
2577
);
2578
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA_AUD;
2579
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE(
2580
    MEDIAKEY_ID INTEGER NOT NULL,
2581
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
2582
);
2583
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE;
2584
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE_AUD(
2585
    REV INTEGER NOT NULL,
2586
    MEDIAKEY_ID INTEGER NOT NULL,
2587
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
2588
    REVTYPE TINYINT
2589
);
2590
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE_AUD;
2591
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXONSCOPE(
2592
    MEDIAKEY_ID INTEGER NOT NULL,
2593
    TAXONOMICSCOPE_ID INTEGER NOT NULL
2594
);
2595
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXONSCOPE;
2596
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXONSCOPE_AUD(
2597
    REV INTEGER NOT NULL,
2598
    MEDIAKEY_ID INTEGER NOT NULL,
2599
    TAXONOMICSCOPE_ID INTEGER NOT NULL,
2600
    REVTYPE TINYINT
2601
);
2602
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXONSCOPE_AUD;
2603
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION(
2604
    ID INTEGER NOT NULL,
2605
    CREATED TIMESTAMP,
2606
    UUID VARCHAR(36),
2607
    UPDATED TIMESTAMP,
2608
    MIMETYPE VARCHAR(255),
2609
    SUFFIX VARCHAR(255),
2610
    CREATEDBY_ID INTEGER,
2611
    UPDATEDBY_ID INTEGER,
2612
    MEDIA_ID INTEGER
2613
);
2614
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION;
2615
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART(
2616
    DTYPE VARCHAR(31) NOT NULL,
2617
    ID INTEGER NOT NULL,
2618
    CREATED TIMESTAMP,
2619
    UUID VARCHAR(36),
2620
    UPDATED TIMESTAMP,
2621
    SIZE INTEGER,
2622
    URI CLOB,
2623
    DURATION INTEGER,
2624
    HEIGHT INTEGER,
2625
    WIDTH INTEGER,
2626
    CREATEDBY_ID INTEGER,
2627
    UPDATEDBY_ID INTEGER,
2628
    REPRESENTATION_ID INTEGER NOT NULL,
2629
    SORTINDEX INTEGER
2630
);
2631
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART;
2632
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART_AUD(
2633
    DTYPE VARCHAR(31) NOT NULL,
2634
    ID INTEGER NOT NULL,
2635
    REV INTEGER NOT NULL,
2636
    REVTYPE TINYINT,
2637
    CREATED TIMESTAMP,
2638
    UUID VARCHAR(36),
2639
    UPDATED TIMESTAMP,
2640
    SIZE INTEGER,
2641
    URI CLOB,
2642
    CREATEDBY_ID INTEGER,
2643
    UPDATEDBY_ID INTEGER,
2644
    REPRESENTATION_ID INTEGER,
2645
    DURATION INTEGER,
2646
    HEIGHT INTEGER,
2647
    WIDTH INTEGER
2648
);
2649
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART_AUD;
2650
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_AUD(
2651
    ID INTEGER NOT NULL,
2652
    REV INTEGER NOT NULL,
2653
    REVTYPE TINYINT,
2654
    CREATED TIMESTAMP,
2655
    UUID VARCHAR(36),
2656
    UPDATED TIMESTAMP,
2657
    MIMETYPE VARCHAR(255),
2658
    SUFFIX VARCHAR(255),
2659
    CREATEDBY_ID INTEGER,
2660
    UPDATEDBY_ID INTEGER,
2661
    MEDIA_ID INTEGER
2662
);
2663
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_AUD;
2664
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD(
2665
    REV INTEGER NOT NULL,
2666
    REPRESENTATION_ID INTEGER NOT NULL,
2667
    ID INTEGER NOT NULL,
2668
    SORTINDEX INTEGER NOT NULL,
2669
    REVTYPE TINYINT
2670
);
2671
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD;
2672
CREATE CACHED TABLE PUBLIC.MEDIA_AUD(
2673
    DTYPE VARCHAR(31) NOT NULL,
2674
    ID INTEGER NOT NULL,
2675
    REV INTEGER NOT NULL,
2676
    REVTYPE TINYINT,
2677
    CREATED TIMESTAMP,
2678
    UUID VARCHAR(36),
2679
    UPDATED TIMESTAMP,
2680
    LSID_AUTHORITY VARCHAR(255),
2681
    LSID_LSID VARCHAR(255),
2682
    LSID_NAMESPACE VARCHAR(255),
2683
    LSID_OBJECT VARCHAR(255),
2684
    LSID_REVISION VARCHAR(255),
2685
    PROTECTEDTITLECACHE BOOLEAN,
2686
    TITLECACHE VARCHAR(255),
2687
    MEDIACREATED TIMESTAMP,
2688
    CREATEDBY_ID INTEGER,
2689
    UPDATEDBY_ID INTEGER,
2690
    ARTIST_ID INTEGER,
2691
    CITATIONMICROREFERENCE VARCHAR(255),
2692
    CITATION_ID INTEGER
2693
);
2694
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_AUD;
2695
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION(
2696
    MEDIA_ID INTEGER NOT NULL,
2697
    ANNOTATIONS_ID INTEGER NOT NULL
2698
);
2699
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION;
2700
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION_AUD(
2701
    REV INTEGER NOT NULL,
2702
    MEDIA_ID INTEGER NOT NULL,
2703
    ANNOTATIONS_ID INTEGER NOT NULL,
2704
    REVTYPE TINYINT
2705
);
2706
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION_AUD;
2707
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT(
2708
    MEDIA_ID INTEGER NOT NULL,
2709
    CREDITS_ID INTEGER NOT NULL,
2710
    SORTINDEX INTEGER NOT NULL
2711
);
2712
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT;
2713
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT_AUD(
2714
    REV INTEGER NOT NULL,
2715
    MEDIA_ID INTEGER NOT NULL,
2716
    CREDITS_ID INTEGER NOT NULL,
2717
    SORTINDEX INTEGER NOT NULL,
2718
    REVTYPE TINYINT
2719
);
2720
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT_AUD;
2721
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION(
2722
    MEDIA_ID INTEGER NOT NULL,
2723
    DESCRIPTION_ID INTEGER NOT NULL,
2724
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2725
);
2726
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION;
2727
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION_AUD(
2728
    REV INTEGER NOT NULL,
2729
    MEDIA_ID INTEGER NOT NULL,
2730
    DESCRIPTION_ID INTEGER NOT NULL,
2731
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2732
    REVTYPE TINYINT
2733
);
2734
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION_AUD;
2735
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION(
2736
    MEDIA_ID INTEGER NOT NULL,
2737
    EXTENSIONS_ID INTEGER NOT NULL
2738
);
2739
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION;
2740
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION_AUD(
2741
    REV INTEGER NOT NULL,
2742
    MEDIA_ID INTEGER NOT NULL,
2743
    EXTENSIONS_ID INTEGER NOT NULL,
2744
    REVTYPE TINYINT
2745
);
2746
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION_AUD;
2747
CREATE CACHED TABLE PUBLIC.MEDIA_IDENTIFIER(
2748
    MEDIA_ID INTEGER NOT NULL,
2749
    IDENTIFIERS_ID INTEGER NOT NULL,
2750
    SORTINDEX INTEGER NOT NULL
2751
);
2752
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_IDENTIFIER;
2753
CREATE CACHED TABLE PUBLIC.MEDIA_IDENTIFIER_AUD(
2754
    REV INTEGER NOT NULL,
2755
    MEDIA_ID INTEGER NOT NULL,
2756
    IDENTIFIERS_ID INTEGER NOT NULL,
2757
    SORTINDEX INTEGER NOT NULL,
2758
    REVTYPE TINYINT
2759
);
2760
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_IDENTIFIER_AUD;
2761
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING(
2762
    MEDIA_ID INTEGER NOT NULL,
2763
    TITLE_ID INTEGER NOT NULL,
2764
    TITLE_MAPKEY_ID INTEGER NOT NULL
2765
);
2766
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING;
2767
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING_AUD(
2768
    REV INTEGER NOT NULL,
2769
    MEDIA_ID INTEGER NOT NULL,
2770
    TITLE_ID INTEGER NOT NULL,
2771
    TITLE_MAPKEY_ID INTEGER NOT NULL,
2772
    REVTYPE TINYINT
2773
);
2774
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING_AUD;
2775
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER(
2776
    MEDIA_ID INTEGER NOT NULL,
2777
    MARKERS_ID INTEGER NOT NULL
2778
);
2779
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER;
2780
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER_AUD(
2781
    REV INTEGER NOT NULL,
2782
    MEDIA_ID INTEGER NOT NULL,
2783
    MARKERS_ID INTEGER NOT NULL,
2784
    REVTYPE TINYINT
2785
);
2786
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER_AUD;
2787
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE(
2788
    MEDIA_ID INTEGER NOT NULL,
2789
    SOURCES_ID INTEGER NOT NULL
2790
);
2791
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE;
2792
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD(
2793
    REV INTEGER NOT NULL,
2794
    MEDIA_ID INTEGER NOT NULL,
2795
    SOURCES_ID INTEGER NOT NULL,
2796
    REVTYPE TINYINT
2797
);
2798
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD;
2799
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION(
2800
    MEDIAKEY_ID INTEGER NOT NULL,
2801
    KEYREPRESENTATIONS_ID INTEGER NOT NULL
2802
);
2803
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION;
2804
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION_AUD(
2805
    REV INTEGER NOT NULL,
2806
    MEDIAKEY_ID INTEGER NOT NULL,
2807
    KEYREPRESENTATIONS_ID INTEGER NOT NULL,
2808
    REVTYPE TINYINT
2809
);
2810
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION_AUD;
2811
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTSINFO(
2812
    MEDIA_ID INTEGER NOT NULL,
2813
    RIGHTS_ID INTEGER NOT NULL
2814
);
2815
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO;
2816
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTSINFO_AUD(
2817
    REV INTEGER NOT NULL,
2818
    MEDIA_ID INTEGER NOT NULL,
2819
    RIGHTS_ID INTEGER NOT NULL,
2820
    REVTYPE TINYINT
2821
);
2822
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO_AUD;
2823
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE(
2824
    PHYLOGENETICTREE_ID INTEGER NOT NULL,
2825
    USEDSEQUENCES_ID INTEGER NOT NULL
2826
);
2827
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE;
2828
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE_AUD(
2829
    REV INTEGER NOT NULL,
2830
    PHYLOGENETICTREE_ID INTEGER NOT NULL,
2831
    USEDSEQUENCES_ID INTEGER NOT NULL,
2832
    REVTYPE TINYINT
2833
);
2834
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE_AUD;
2835
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON(
2836
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2837
    COVEREDTAXA_ID INTEGER NOT NULL
2838
);
2839
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_COVEREDTAXON;
2840
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD(
2841
    REV INTEGER NOT NULL,
2842
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2843
    COVEREDTAXA_ID INTEGER NOT NULL,
2844
    REVTYPE TINYINT
2845
);
2846
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD;
2847
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA(
2848
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2849
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
2850
);
2851
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA;
2852
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD(
2853
    REV INTEGER NOT NULL,
2854
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2855
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
2856
    REVTYPE TINYINT
2857
);
2858
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD;
2859
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE(
2860
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2861
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
2862
);
2863
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE;
2864
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE_AUD(
2865
    REV INTEGER NOT NULL,
2866
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2867
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
2868
    REVTYPE TINYINT
2869
);
2870
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE_AUD;
2871
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE(
2872
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2873
    TAXONOMICSCOPE_ID INTEGER NOT NULL
2874
);
2875
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXON;
2876
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD(
2877
    REV INTEGER NOT NULL,
2878
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2879
    TAXONOMICSCOPE_ID INTEGER NOT NULL,
2880
    REVTYPE TINYINT
2881
);
2882
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD;
2883
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP(
2884
    ID INTEGER NOT NULL,
2885
    CREATED TIMESTAMP,
2886
    UUID VARCHAR(36),
2887
    UPDATED TIMESTAMP,
2888
    CITATIONMICROREFERENCE VARCHAR(255),
2889
    ORIGINALNAMESTRING VARCHAR(255),
2890
    DOUBTFUL BOOLEAN NOT NULL,
2891
    RULECONSIDERED VARCHAR(255),
2892
    CREATEDBY_ID INTEGER,
2893
    UPDATEDBY_ID INTEGER,
2894
    CITATION_ID INTEGER,
2895
    RELATEDFROM_ID INTEGER,
2896
    RELATEDTO_ID INTEGER,
2897
    TYPE_ID INTEGER
2898
);
2899
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP;
2900
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_AUD(
2901
    ID INTEGER NOT NULL,
2902
    REV INTEGER NOT NULL,
2903
    REVTYPE TINYINT,
2904
    CREATED TIMESTAMP,
2905
    UUID VARCHAR(36),
2906
    UPDATED TIMESTAMP,
2907
    CITATIONMICROREFERENCE VARCHAR(255),
2908
    ORIGINALNAMESTRING VARCHAR(255),
2909
    DOUBTFUL BOOLEAN,
2910
    RULECONSIDERED VARCHAR(255),
2911
    CREATEDBY_ID INTEGER,
2912
    UPDATEDBY_ID INTEGER,
2913
    CITATION_ID INTEGER,
2914
    RELATEDFROM_ID INTEGER,
2915
    RELATEDTO_ID INTEGER,
2916
    TYPE_ID INTEGER
2917
);
2918
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_AUD;
2919
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION(
2920
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2921
    ANNOTATIONS_ID INTEGER NOT NULL
2922
);
2923
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION;
2924
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD(
2925
    REV INTEGER NOT NULL,
2926
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2927
    ANNOTATIONS_ID INTEGER NOT NULL,
2928
    REVTYPE TINYINT
2929
);
2930
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD;
2931
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER(
2932
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2933
    MARKERS_ID INTEGER NOT NULL
2934
);
2935
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER;
2936
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER_AUD(
2937
    REV INTEGER NOT NULL,
2938
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2939
    MARKERS_ID INTEGER NOT NULL,
2940
    REVTYPE TINYINT
2941
);
2942
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER_AUD;
2943
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS(
2944
    ID INTEGER NOT NULL,
2945
    CREATED TIMESTAMP,
2946
    UUID VARCHAR(36),
2947
    UPDATED TIMESTAMP,
2948
    CITATIONMICROREFERENCE VARCHAR(255),
2949
    ORIGINALNAMESTRING VARCHAR(255),
2950
    RULECONSIDERED VARCHAR(255),
2951
    CREATEDBY_ID INTEGER,
2952
    UPDATEDBY_ID INTEGER,
2953
    CITATION_ID INTEGER,
2954
    TYPE_ID INTEGER
2955
);
2956
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS;
2957
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_AUD(
2958
    ID INTEGER NOT NULL,
2959
    REV INTEGER NOT NULL,
2960
    REVTYPE TINYINT,
2961
    CREATED TIMESTAMP,
2962
    UUID VARCHAR(36),
2963
    UPDATED TIMESTAMP,
2964
    CITATIONMICROREFERENCE VARCHAR(255),
2965
    ORIGINALNAMESTRING VARCHAR(255),
2966
    RULECONSIDERED VARCHAR(255),
2967
    CREATEDBY_ID INTEGER,
2968
    UPDATEDBY_ID INTEGER,
2969
    CITATION_ID INTEGER,
2970
    TYPE_ID INTEGER
2971
);
2972
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_AUD;
2973
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION(
2974
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2975
    ANNOTATIONS_ID INTEGER NOT NULL
2976
);
2977
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION;
2978
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD(
2979
    REV INTEGER NOT NULL,
2980
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2981
    ANNOTATIONS_ID INTEGER NOT NULL,
2982
    REVTYPE TINYINT
2983
);
2984
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD;
2985
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER(
2986
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2987
    MARKERS_ID INTEGER NOT NULL
2988
);
2989
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER;
2990
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD(
2991
    REV INTEGER NOT NULL,
2992
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2993
    MARKERS_ID INTEGER NOT NULL,
2994
    REVTYPE TINYINT
2995
);
2996
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD;
2997
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE(
2998
    DTYPE VARCHAR(31) NOT NULL,
2999
    ID INTEGER NOT NULL,
3000
    CREATED TIMESTAMP,
3001
    UUID VARCHAR(36),
3002
    UPDATED TIMESTAMP,
3003
    SOURCETYPE VARCHAR(4) NOT NULL,
3004
    CITATIONMICROREFERENCE VARCHAR(255),
3005
    ORIGINALNAMESTRING VARCHAR(255),
3006
    IDINSOURCE VARCHAR(255),
3007
    IDNAMESPACE VARCHAR(255),
3008
    CREATEDBY_ID INTEGER,
3009
    UPDATEDBY_ID INTEGER,
3010
    CITATION_ID INTEGER,
3011
    NAMEUSEDINSOURCE_ID INTEGER
3012
);
3013
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE;
3014
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_AUD(
3015
    DTYPE VARCHAR(31) NOT NULL,
3016
    ID INTEGER NOT NULL,
3017
    REV INTEGER NOT NULL,
3018
    REVTYPE TINYINT,
3019
    CREATED TIMESTAMP,
3020
    UUID VARCHAR(36),
3021
    UPDATED TIMESTAMP,
3022
           SOURCETYPE VARCHAR(4) NOT NULL,
3023
    CITATIONMICROREFERENCE VARCHAR(255),
3024
    ORIGINALNAMESTRING VARCHAR(255),
3025
    IDINSOURCE VARCHAR(255),
3026
    IDNAMESPACE VARCHAR(255),
3027
    CREATEDBY_ID INTEGER,
3028
    UPDATEDBY_ID INTEGER,
3029
    CITATION_ID INTEGER,
3030
    NAMEUSEDINSOURCE_ID INTEGER
3031
);
3032
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_AUD;
3033
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION(
3034
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3035
    ANNOTATIONS_ID INTEGER NOT NULL
3036
);
3037
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION;
3038
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD(
3039
    REV INTEGER NOT NULL,
3040
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3041
    ANNOTATIONS_ID INTEGER NOT NULL,
3042
    REVTYPE TINYINT
3043
);
3044
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD;
3045
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER(
3046
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3047
    MARKERS_ID INTEGER NOT NULL
3048
);
3049
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER;
3050
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD(
3051
    REV INTEGER NOT NULL,
3052
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
3053
    MARKERS_ID INTEGER NOT NULL,
3054
    REVTYPE TINYINT
3055
);
3056
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD;
3057
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP(
3058
    ID INTEGER NOT NULL,
3059
    CREATED TIMESTAMP,
3060
    UUID VARCHAR(36),
3061
    NAME VARCHAR(255) NOT NULL,
3062
    CREATEDBY_ID INTEGER
3063
);
3064
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP;
3065
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL(
3066
    GROUP_ID INTEGER NOT NULL,
3067
    GRANTEDAUTHORITIES_ID INTEGER NOT NULL
3068
);
3069
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL;
3070
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY(
3071
    ID INTEGER NOT NULL,
3072
    CREATED TIMESTAMP,
3073
    UUID VARCHAR(36),
3074
    UPDATED TIMESTAMP,
3075
    LSID_AUTHORITY VARCHAR(255),
3076
    LSID_LSID VARCHAR(255),
3077
    LSID_NAMESPACE VARCHAR(255),
3078
    LSID_OBJECT VARCHAR(255),
3079
    LSID_REVISION VARCHAR(255),
3080
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3081
    TITLECACHE VARCHAR(255),
3082
    STARTNUMBER INTEGER,
3083
    CREATEDBY_ID INTEGER,
3084
    UPDATEDBY_ID INTEGER,
3085
    ROOT_ID INTEGER
3086
);
3087
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY;
3088
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE(
3089
    ID INTEGER NOT NULL,
3090
    CREATED TIMESTAMP,
3091
    UUID VARCHAR(36),
3092
    UPDATED TIMESTAMP,
3093
    NODENUMBER INTEGER,
3094
    SORTINDEX INTEGER,
3095
    CREATEDBY_ID INTEGER,
3096
    UPDATEDBY_ID INTEGER,
3097
    FEATURE_ID INTEGER,
3098
    KEY_ID INTEGER,
3099
    OTHERNODE_ID INTEGER,
3100
    PARENT_ID INTEGER,
3101
    QUESTION_ID INTEGER,
3102
    STATEMENT_ID INTEGER,
3103
    SUBKEY_ID INTEGER,
3104
    TAXON_ID INTEGER
3105
);
3106
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE;
3107
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_AUD(
3108
    ID INTEGER NOT NULL,
3109
    REV INTEGER NOT NULL,
3110
    REVTYPE TINYINT,
3111
    CREATED TIMESTAMP,
3112
    UUID VARCHAR(36),
3113
    UPDATED TIMESTAMP,
3114
    NODENUMBER INTEGER,
3115
    SORTINDEX INTEGER,
3116
    CREATEDBY_ID INTEGER,
3117
    UPDATEDBY_ID INTEGER,
3118
    FEATURE_ID INTEGER,
3119
    KEY_ID INTEGER,
3120
    OTHERNODE_ID INTEGER,
3121
    PARENT_ID INTEGER,
3122
    QUESTION_ID INTEGER,
3123
    STATEMENT_ID INTEGER,
3124
    SUBKEY_ID INTEGER,
3125
    TAXON_ID INTEGER
3126
);
3127
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_AUD;
3128
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING(
3129
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
3130
    MODIFYINGTEXT_ID INTEGER NOT NULL,
3131
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
3132
);
3133
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING;
3134
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD(
3135
    REV INTEGER NOT NULL,
3136
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
3137
    MODIFYINGTEXT_ID INTEGER NOT NULL,
3138
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
3139
    REVTYPE TINYINT
3140
);
3141
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD;
3142
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_AUD(
3143
    ID INTEGER NOT NULL,
3144
    REV INTEGER NOT NULL,
3145
    REVTYPE TINYINT,
3146
    CREATED TIMESTAMP,
3147
    UUID VARCHAR(36),
3148
    UPDATED TIMESTAMP,
3149
    LSID_AUTHORITY VARCHAR(255),
3150
    LSID_LSID VARCHAR(255),
3151
    LSID_NAMESPACE VARCHAR(255),
3152
    LSID_OBJECT VARCHAR(255),
3153
    LSID_REVISION VARCHAR(255),
3154
    PROTECTEDTITLECACHE BOOLEAN,
3155
    TITLECACHE VARCHAR(255),
3156
    STARTNUMBER INTEGER,
3157
    CREATEDBY_ID INTEGER,
3158
    UPDATEDBY_ID INTEGER,
3159
    ROOT_ID INTEGER
3160
);
3161
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_AUD;
3162
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION(
3163
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3164
    ANNOTATIONS_ID INTEGER NOT NULL
3165
);
3166
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION;
3167
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD(
3168
    REV INTEGER NOT NULL,
3169
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3170
    ANNOTATIONS_ID INTEGER NOT NULL,
3171
    REVTYPE TINYINT
3172
);
3173
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD;
3174
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT(
3175
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3176
    CREDITS_ID INTEGER NOT NULL,
3177
    SORTINDEX INTEGER NOT NULL
3178
);
3179
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT;
3180
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT_AUD(
3181
    REV INTEGER NOT NULL,
3182
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3183
    CREDITS_ID INTEGER NOT NULL,
3184
    SORTINDEX INTEGER NOT NULL,
3185
    REVTYPE TINYINT
3186
);
3187
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT_AUD;
3188
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION(
3189
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3190
    EXTENSIONS_ID INTEGER NOT NULL
3191
);
3192
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION;
3193
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD(
3194
    REV INTEGER NOT NULL,
3195
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3196
    EXTENSIONS_ID INTEGER NOT NULL,
3197
    REVTYPE TINYINT
3198
);
3199
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD;
3200
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_IDENTIFIER(
3201
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3202
    IDENTIFIERS_ID INTEGER NOT NULL,
3203
    SORTINDEX INTEGER NOT NULL
3204
);
3205
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_IDENTIFIER;
3206
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_IDENTIFIER_AUD(
3207
    REV INTEGER NOT NULL,
3208
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3209
    IDENTIFIERS_ID INTEGER NOT NULL,
3210
    SORTINDEX INTEGER NOT NULL,
3211
    REVTYPE TINYINT
3212
);
3213
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_IDENTIFIER_AUD;
3214
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER(
3215
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3216
    MARKERS_ID INTEGER NOT NULL
3217
);
3218
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER;
3219
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER_AUD(
3220
    REV INTEGER NOT NULL,
3221
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3222
    MARKERS_ID INTEGER NOT NULL,
3223
    REVTYPE TINYINT
3224
);
3225
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER_AUD;
3226
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA(
3227
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3228
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
3229
);
3230
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA;
3231
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD(
3232
    REV INTEGER NOT NULL,
3233
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3234
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
3235
    REVTYPE TINYINT
3236
);
3237
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD;
3238
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE(
3239
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3240
    SOURCES_ID INTEGER NOT NULL
3241
);
3242
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE;
3243
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD(
3244
    REV INTEGER NOT NULL,
3245
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3246
    SOURCES_ID INTEGER NOT NULL,
3247
    REVTYPE TINYINT
3248
);
3249
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD;
3250
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO(
3251
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3252
    RIGHTS_ID INTEGER NOT NULL
3253
);
3254
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTSINFO;
3255
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD(
3256
    REV INTEGER NOT NULL,
3257
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3258
    RIGHTS_ID INTEGER NOT NULL,
3259
    REVTYPE TINYINT
3260
);
3261
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD;
3262
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE(
3263
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3264
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
3265
);
3266
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE;
3267
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE_AUD(
3268
    REV INTEGER NOT NULL,
3269
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3270
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
3271
    REVTYPE TINYINT
3272
);
3273
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE_AUD;
3274
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON(
3275
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3276
    TAXON_ID INTEGER NOT NULL
3277
);
3278
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON;
3279
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE(
3280
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3281
    COVEREDTAXA_ID INTEGER NOT NULL
3282
);
3283
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE;
3284
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD(
3285
    REV INTEGER NOT NULL,
3286
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3287
    COVEREDTAXA_ID INTEGER NOT NULL,
3288
    REVTYPE TINYINT
3289
);
3290
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD;
3291
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON_AUD(
3292
    REV INTEGER NOT NULL,
3293
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
3294
    TAXON_ID INTEGER NOT NULL,
3295
    REVTYPE TINYINT
3296
);
3297
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON_AUD;
3298

    
3299
CREATE TABLE PRIMER (
3300
    ID INTEGER NOT NULL,
3301
    CREATED TIMESTAMP,
3302
    UUID VARCHAR(36),
3303
    UPDATED TIMESTAMP,
3304
    LABEL VARCHAR(255),
3305
        SEQUENCE_LENGTH INTEGER,
3306
        SEQUENCE_STRING CLOB,
3307
    CREATEDBY_ID INTEGER,
3308
    UPDATEDBY_ID INTEGER,
3309
    DNAMARKER_ID INTEGER,
3310
        PUBLISHEDIN_ID INTEGER,
3311
        PRIMARY KEY (ID)
3312
);
3313
CREATE TABLE PRIMER_AUD (
3314
    ID INTEGER NOT NULL,
3315
    CREATED TIMESTAMP,
3316
    UUID VARCHAR(36),
3317
    UPDATED TIMESTAMP,
3318
    LABEL VARCHAR(255),
3319
    SEQUENCE_LENGTH INTEGER,
3320
    SEQUENCE_STRING CLOB,
3321
    CREATEDBY_ID INTEGER,
3322
    UPDATEDBY_ID INTEGER,
3323
        DNAMARKER_ID INTEGER,
3324
        PUBLISHEDIN_ID INTEGER,
3325
);
3326

    
3327
CREATE TABLE PRIMER_ANNOTATION (
3328
    PRIMER_ID INTEGER NOT NULL,
3329
    ANNOTATIONS_ID INTEGER NOT NULL,
3330
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3331
);
3332
CREATE TABLE PRIMER_ANNOTATION_AUD (
3333
    PRIMER_ID INTEGER NOT NULL,
3334
    ANNOTATIONS_ID INTEGER NOT NULL
3335
);
3336

    
3337
CREATE TABLE PRIMER_MARKER (
3338
    PRIMER_ID INTEGER NOT NULL,
3339
    MARKERS_ID INTEGER NOT NULL,
3340
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3341
);
3342
CREATE TABLE PRIMER_MARKER_AUD (
3343
    PRIMER_ID INTEGER NOT NULL,
3344
    MARKERS_ID INTEGER NOT NULL
3345
);
3346

    
3347

    
3348
CREATE CACHED TABLE PUBLIC.REFERENCE(
3349
    DTYPE VARCHAR(31) NOT NULL,
3350
    ID INTEGER NOT NULL,
3351
    CREATED TIMESTAMP,
3352
    UUID VARCHAR(36),
3353
    UPDATED TIMESTAMP,
3354
    LSID_AUTHORITY VARCHAR(255),
3355
    LSID_LSID VARCHAR(255),
3356
    LSID_NAMESPACE VARCHAR(255),
3357
    LSID_OBJECT VARCHAR(255),
3358
    LSID_REVISION VARCHAR(255),
3359
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3360
    TITLECACHE VARCHAR(800),
3361
    DATEPUBLISHED_END VARCHAR(255),
3362
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3363
    DATEPUBLISHED_START VARCHAR(255),
3364
    EDITION VARCHAR(255),
3365
    EDITOR VARCHAR(255),
3366
    ISBN VARCHAR(255),
3367
    ISSN VARCHAR(255),
3368
    DOI VARCHAR(255),
3369
    NOMENCLATURALLYRELEVANT BOOLEAN NOT NULL,
3370
    ORGANIZATION VARCHAR(255),
3371
    PAGES VARCHAR(255),
3372
    PARSINGPROBLEM INTEGER NOT NULL,
3373
    PLACEPUBLISHED VARCHAR(255),
3374
    PROBLEMENDS INTEGER NOT NULL,
3375
    PROBLEMSTARTS INTEGER NOT NULL,
3376
    PUBLISHER VARCHAR(255),
3377
    REFERENCEABSTRACT CLOB,
3378
    SERIESPART VARCHAR(255),
3379
    TITLE CLOB,
3380
    ABBREVTITLE VARCHAR(255),
3381
    ABBREVTITLECACHE CLOB,
3382
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3383
    REFTYPE VARCHAR(4),
3384
    URI CLOB,
3385
    VOLUME VARCHAR(255),
3386
    ACCESSED TIMESTAMP,
3387
    LASTRETRIEVED TIMESTAMP,
3388
    EXTERNALID VARCHAR(255),
3389
    EXTERNALLINK CLOB,
3390
    AUTHORITYTYPE  VARCHAR(10) NOT NULL,
3391
    CREATEDBY_ID INTEGER,
3392
    UPDATEDBY_ID INTEGER,
3393
    AUTHORSHIP_ID INTEGER,
3394
    INREFERENCE_ID INTEGER,
3395
    INSTITUTION_ID INTEGER,
3396
    SCHOOL_ID INTEGER
3397
);
3398
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE;
3399
CREATE INDEX PUBLIC.REFERENCETITLECACHEINDEX ON PUBLIC.REFERENCE(TITLECACHE);
3400
CREATE CACHED TABLE PUBLIC.REFERENCE_AUD(
3401
    DTYPE VARCHAR(31) NOT NULL,
3402
    ID INTEGER NOT NULL,
3403
    REV INTEGER NOT NULL,
3404
    REVTYPE TINYINT,
3405
    CREATED TIMESTAMP,
3406
    UUID VARCHAR(36),
3407
    UPDATED TIMESTAMP,
3408
    LSID_AUTHORITY VARCHAR(255),
3409
    LSID_LSID VARCHAR(255),
3410
    LSID_NAMESPACE VARCHAR(255),
3411
    LSID_OBJECT VARCHAR(255),
3412
    LSID_REVISION VARCHAR(255),
3413
    PROTECTEDTITLECACHE BOOLEAN,
3414
    TITLECACHE VARCHAR(800),
3415
    DATEPUBLISHED_END VARCHAR(255),
3416
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3417
    DATEPUBLISHED_START VARCHAR(255),
3418
    EDITION VARCHAR(255),
3419
    EDITOR VARCHAR(255),
3420
    ISBN VARCHAR(255),
3421
    ISSN VARCHAR(255),
3422
    DOI VARCHAR(255),
3423
    NOMENCLATURALLYRELEVANT BOOLEAN,
3424
    ORGANIZATION VARCHAR(255),
3425
    PAGES VARCHAR(255),
3426
    PARSINGPROBLEM INTEGER,
3427
    PLACEPUBLISHED VARCHAR(255),
3428
    PROBLEMENDS INTEGER,
3429
    PROBLEMSTARTS INTEGER,
3430
    PUBLISHER VARCHAR(255),
3431
    REFERENCEABSTRACT CLOB,
3432
    SERIESPART VARCHAR(255),
3433
    TITLE CLOB,
3434
    ABBREVTITLE VARCHAR(255),
3435
    ABBREVTITLECACHE CLOB,
3436
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3437
    REFTYPE  VARCHAR(4),
3438
    URI CLOB,
3439
    VOLUME VARCHAR(255),
3440
    ACCESSED TIMESTAMP,
3441
    LASTRETRIEVED TIMESTAMP,
3442
    EXTERNALID VARCHAR(255),
3443
    EXTERNALLINK CLOB,
3444
    AUTHORITYTYPE  VARCHAR(10) NOT NULL,
3445
    CREATEDBY_ID INTEGER,
3446
    UPDATEDBY_ID INTEGER,
3447
    AUTHORSHIP_ID INTEGER,
3448
    INREFERENCE_ID INTEGER,
3449
    INSTITUTION_ID INTEGER,
3450
    SCHOOL_ID INTEGER
3451
);
3452
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_AUD;
3453
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION(
3454
    REFERENCE_ID INTEGER NOT NULL,
3455
    ANNOTATIONS_ID INTEGER NOT NULL
3456
);
3457
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION;
3458
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION_AUD(
3459
    REV INTEGER NOT NULL,
3460
    REFERENCE_ID INTEGER NOT NULL,
3461
    ANNOTATIONS_ID INTEGER NOT NULL,
3462
    REVTYPE TINYINT
3463
);
3464
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION_AUD;
3465
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT(
3466
    REFERENCE_ID INTEGER NOT NULL,
3467
    CREDITS_ID INTEGER NOT NULL,
3468
    SORTINDEX INTEGER NOT NULL
3469
);
3470
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT;
3471
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT_AUD(
3472
    REV INTEGER NOT NULL,
3473
    REFERENCE_ID INTEGER NOT NULL,
3474
    CREDITS_ID INTEGER NOT NULL,
3475
    SORTINDEX INTEGER NOT NULL,
3476
    REVTYPE TINYINT
3477
);
3478
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT_AUD;
3479
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION(
3480
    REFERENCE_ID INTEGER NOT NULL,
3481
    EXTENSIONS_ID INTEGER NOT NULL
3482
);
3483
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION;
3484
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION_AUD(
3485
    REV INTEGER NOT NULL,
3486
    REFERENCE_ID INTEGER NOT NULL,
3487
    EXTENSIONS_ID INTEGER NOT NULL,
3488
    REVTYPE TINYINT
3489
);
3490
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION_AUD;
3491
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER(
3492
    REFERENCE_ID INTEGER NOT NULL,
3493
    IDENTIFIERS_ID INTEGER NOT NULL,
3494
    SORTINDEX INTEGER NOT NULL
3495
);
3496
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER;
3497
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER_AUD(
3498
    REV INTEGER NOT NULL,
3499
    REFERENCE_ID INTEGER NOT NULL,
3500
    IDENTIFIERS_ID INTEGER NOT NULL,
3501
    SORTINDEX INTEGER NOT NULL,
3502
    REVTYPE TINYINT
3503
);
3504
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER_AUD;
3505
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER(
3506
    REFERENCE_ID INTEGER NOT NULL,
3507
    MARKERS_ID INTEGER NOT NULL
3508
);
3509
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER;
3510
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER_AUD(
3511
    REV INTEGER NOT NULL,
3512
    REFERENCE_ID INTEGER NOT NULL,
3513
    MARKERS_ID INTEGER NOT NULL,
3514
    REVTYPE TINYINT
3515
);
3516
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER_AUD;
3517
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA(
3518
    REFERENCE_ID INTEGER NOT NULL,
3519
    MEDIA_ID INTEGER NOT NULL
3520
);
3521
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA;
3522
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA_AUD(
3523
    REV INTEGER NOT NULL,
3524
    REFERENCE_ID INTEGER NOT NULL,
3525
    MEDIA_ID INTEGER NOT NULL,
3526
    REVTYPE TINYINT
3527
);
3528
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA_AUD;
3529
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE(
3530
    REFERENCE_ID INTEGER NOT NULL,
3531
    SOURCES_ID INTEGER NOT NULL
3532
);
3533
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE;
3534
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD(
3535
    REV INTEGER NOT NULL,
3536
    REFERENCE_ID INTEGER NOT NULL,
3537
    SOURCES_ID INTEGER NOT NULL,
3538
    REVTYPE TINYINT
3539
);
3540
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD;
3541
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO(
3542
    REFERENCE_ID INTEGER NOT NULL,
3543
    RIGHTS_ID INTEGER NOT NULL
3544
);
3545
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO;
3546
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO_AUD(
3547
    REV INTEGER NOT NULL,
3548
    REFERENCE_ID INTEGER NOT NULL,
3549
    RIGHTS_ID INTEGER NOT NULL,
3550
    REVTYPE TINYINT
3551
);
3552
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO_AUD;
3553
CREATE CACHED TABLE PUBLIC.REGISTRATION(
3554
    ID INTEGER NOT NULL,
3555
    CREATED TIMESTAMP,
3556
    UUID VARCHAR(36),
3557
    UPDATED TIMESTAMP,
3558
        IDENTIFIER VARCHAR(255),
3559
        REGISTRATIONDATE TIMESTAMP,
3560
        SPECIFICIDENTIFIER VARCHAR(255),
3561
        STATUS VARCHAR(255),
3562
    CREATEDBY_ID INTEGER,
3563
    UPDATEDBY_ID INTEGER,
3564
        INSTITUTION_ID INTEGER,
3565
        NAME_ID INTEGER,
3566
        SUBMITTER_ID INTEGER
3567
);
3568
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION;
3569
CREATE CACHED TABLE PUBLIC.REGISTRATION_AUD(
3570
    ID INTEGER NOT NULL,
3571
    REV INTEGER NOT NULL,
3572
    REVTYPE TINYINT,
3573
    CREATED TIMESTAMP,
3574
    UUID VARCHAR(36),
3575
    UPDATED TIMESTAMP,
3576
        IDENTIFIER VARCHAR(255),
3577
        REGISTRATIONDATE TIMESTAMP,
3578
        SPECIFICIDENTIFIER VARCHAR(255),
3579
        STATUS VARCHAR(255),
3580
    CREATEDBY_ID INTEGER,
3581
    UPDATEDBY_ID INTEGER,
3582
        INSTITUTION_ID INTEGER,
3583
        NAME_ID INTEGER,
3584
        SUBMITTER_ID INTEGER
3585
);
3586
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_AUD;
3587
CREATE CACHED TABLE PUBLIC.REGISTRATION_ANNOTATION(
3588
    REGISTRATION_ID INTEGER NOT NULL,
3589
    ANNOTATIONS_ID INTEGER NOT NULL
3590
);
3591
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_ANNOTATION;
3592
CREATE CACHED TABLE PUBLIC.REGISTRATION_ANNOTATION_AUD(
3593
    REV INTEGER NOT NULL,
3594
    REGISTRATION_ID INTEGER NOT NULL,
3595
    ANNOTATIONS_ID INTEGER NOT NULL,
3596
    REVTYPE TINYINT
3597
);
3598
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3599
CREATE CACHED TABLE PUBLIC.REGISTRATION_MARKER(
3600
    REGISTRATION_ID INTEGER NOT NULL,
3601
    MARKERS_ID INTEGER NOT NULL
3602
);
3603
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_MARKER;
3604
CREATE CACHED TABLE PUBLIC.REGISTRATION_MARKER_AUD(
3605
    REV INTEGER NOT NULL,
3606
    REGISTRATION_ID INTEGER NOT NULL,
3607
    MARKERS_ID INTEGER NOT NULL,
3608
    REVTYPE TINYINT
3609
);
3610
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_MARKER_AUD;
3611
CREATE CACHED TABLE PUBLIC.REGISTRATION_REGISTRATION(
3612
    REGISTRATION_ID INTEGER NOT NULL,
3613
    BLOCKEDBY_ID INTEGER NOT NULL
3614
);
3615
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_REGISTRATION;
3616
CREATE CACHED TABLE PUBLIC.REGISTRATION_REGISTRATION_AUD(
3617
    REV INTEGER NOT NULL,
3618
    REGISTRATION_ID INTEGER NOT NULL,
3619
    BLOCKEDBY_ID INTEGER NOT NULL,
3620
    REVTYPE TINYINT
3621
);
3622
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_REGISTRATION_AUD;
3623
CREATE CACHED TABLE PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE(
3624
    REGISTRATIONS_ID INTEGER NOT NULL,
3625
    TYPEDESIGNATIONS_ID INTEGER NOT NULL
3626
);
3627
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE;
3628
CREATE CACHED TABLE PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE_AUD(
3629
    REV INTEGER NOT NULL,
3630
    REGISTRATIONS_ID INTEGER NOT NULL,
3631
    TYPEDESIGNATIONS_ID INTEGER NOT NULL,
3632
    REVTYPE TINYINT
3633
);
3634
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE_AUD;
3635

    
3636
CREATE CACHED TABLE PUBLIC.TERMBASE_INVERSEREPRESENTATION(
3637
    TERM_ID INTEGER NOT NULL,
3638
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL
3639
);
3640
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.TERMBASE_INVERSEREPRESENTATION;
3641
CREATE CACHED TABLE PUBLIC.TERMBASE_INVERSEREPRESENTATION_AUD(
3642
    REV INTEGER NOT NULL,
3643
    TERM_ID INTEGER NOT NULL,
3644
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL,
3645
    REVTYPE TINYINT
3646
);
3647
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.TERMBASE_INVERSEREPRESENTATION_AUD;
3648
CREATE CACHED TABLE PUBLIC.REPRESENTATION(
3649
    ID INTEGER NOT NULL,
3650
    CREATED TIMESTAMP,
3651
    UUID VARCHAR(36),
3652
    UPDATED TIMESTAMP,
3653
    TEXT CLOB,
3654
    ABBREVIATEDLABEL VARCHAR(255),
3655
    LABEL VARCHAR(255),
3656
    CREATEDBY_ID INTEGER,
3657
    UPDATEDBY_ID INTEGER,
3658
    LANGUAGE_ID INTEGER
3659
);
3660
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION;
3661
CREATE CACHED TABLE PUBLIC.REPRESENTATION_AUD(
3662
    ID INTEGER NOT NULL,
3663
    REV INTEGER NOT NULL,
3664
    REVTYPE TINYINT,
3665
    CREATED TIMESTAMP,
3666
    UUID VARCHAR(36),
3667
    UPDATED TIMESTAMP,
3668
    TEXT CLOB,
3669
    ABBREVIATEDLABEL VARCHAR(255),
3670
    LABEL VARCHAR(255),
3671
    CREATEDBY_ID INTEGER,
3672
    UPDATEDBY_ID INTEGER,
3673
    LANGUAGE_ID INTEGER
3674
);
3675
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_AUD;
3676
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION(
3677
    REPRESENTATION_ID INTEGER NOT NULL,
3678
    ANNOTATIONS_ID INTEGER NOT NULL
3679
);
3680
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION;
3681
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD(
3682
    REV INTEGER NOT NULL,
3683
    REPRESENTATION_ID INTEGER NOT NULL,
3684
    ANNOTATIONS_ID INTEGER NOT NULL,
3685
    REVTYPE TINYINT
3686
);
3687
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3688
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER(
3689
    REPRESENTATION_ID INTEGER NOT NULL,
3690
    MARKERS_ID INTEGER NOT NULL
3691
);
3692
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER;
3693
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER_AUD(
3694
    REV INTEGER NOT NULL,
3695
    REPRESENTATION_ID INTEGER NOT NULL,
3696
    MARKERS_ID INTEGER NOT NULL,
3697
    REVTYPE TINYINT
3698
);
3699
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER_AUD;
3700
CREATE CACHED TABLE PUBLIC.RIGHTSINFO(
3701
    ID INTEGER NOT NULL,
3702
    CREATED TIMESTAMP,
3703
    UUID VARCHAR(36),
3704
    UPDATED TIMESTAMP,
3705
    TEXT CLOB,
3706
    ABBREVIATEDTEXT VARCHAR(255),
3707
    URI CLOB,
3708
    CREATEDBY_ID INTEGER,
3709
    UPDATEDBY_ID INTEGER,
3710
    LANGUAGE_ID INTEGER,
3711
    AGENT_ID INTEGER,
3712
    TYPE_ID INTEGER
3713
);
3714
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO;
3715
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_AUD(
3716
    ID INTEGER NOT NULL,
3717
    REV INTEGER NOT NULL,
3718
    REVTYPE TINYINT,
3719
    CREATED TIMESTAMP,
3720
    UUID VARCHAR(36),
3721
    UPDATED TIMESTAMP,
3722
    TEXT CLOB,
3723
    ABBREVIATEDTEXT VARCHAR(255),
3724
    URI CLOB,
3725
    CREATEDBY_ID INTEGER,
3726
    UPDATEDBY_ID INTEGER,
3727
    LANGUAGE_ID INTEGER,
3728
    AGENT_ID INTEGER,
3729
    TYPE_ID INTEGER
3730
);
3731
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_AUD;
3732
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION(
3733
    RIGHTS_ID INTEGER NOT NULL,
3734
    ANNOTATIONS_ID INTEGER NOT NULL
3735
);
3736
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION;
3737
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD(
3738
    REV INTEGER NOT NULL,
3739
    RIGHTS_ID INTEGER NOT NULL,
3740
    ANNOTATIONS_ID INTEGER NOT NULL,
3741
    REVTYPE TINYINT
3742
);
3743
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION_AUD;
3744
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER(
3745
    RIGHTS_ID INTEGER NOT NULL,
3746
    MARKERS_ID INTEGER NOT NULL
3747
);
3748
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_MARKER;
3749
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER_AUD(
3750
    REV INTEGER NOT NULL,
3751
    RIGHTS_ID INTEGER NOT NULL,
3752
    MARKERS_ID INTEGER NOT NULL,
3753
    REVTYPE TINYINT
3754
);
3755

    
3756
CREATE TABLE SEQUENCE (
3757
    ID INTEGER NOT NULL,
3758
    CREATED TIMESTAMP,
3759
    UUID VARCHAR(36),
3760
    UPDATED TIMESTAMP,
3761
    BARCODESEQUENCEPART_LENGTH INTEGER,
3762
    BARCODESEQUENCEPART_STRING CLOB,
3763
    BOLDPROCESSID VARCHAR(255),
3764
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3765
    CONSENSUSSEQUENCE_STRING CLOB,
3766
    GENETICACCESSIONNUMBER VARCHAR(255),
3767
    HAPLOTYPE VARCHAR(255),
3768
    ISBARCODE BOOLEAN,
3769
    CREATEDBY_ID INTEGER,
3770
    UPDATEDBY_ID INTEGER,
3771
    CONTIGFILE_ID INTEGER,
3772
    DNASAMPLE_ID INTEGER,
3773
    DNAMARKER_ID INTEGER,
3774
    PRIMARY KEY (ID)
3775
);
3776
CREATE TABLE SEQUENCE_AUD (
3777
    ID INTEGER NOT NULL,
3778
    REV INTEGER NOT NULL,
3779
    REVTYPE TINYINT,
3780
    CREATED TIMESTAMP,
3781
    UUID VARCHAR(36),
3782
    UPDATED TIMESTAMP,
3783
    BARCODESEQUENCEPART_LENGTH INTEGER,
3784
    BARCODESEQUENCEPART_STRING CLOB,
3785
    BOLDPROCESSID VARCHAR(255),
3786
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3787
    CONSENSUSSEQUENCE_STRING CLOB,
3788
    GENETICACCESSIONNUMBER VARCHAR(255),
3789
    HAPLOTYPE VARCHAR(255),
3790
    ISBARCODE BOOLEAN,
3791
    CREATEDBY_ID INTEGER,
3792
    UPDATEDBY_ID INTEGER,
3793
    CONTIGFILE_ID INTEGER,
3794
    DNASAMPLE_ID INTEGER,
3795
    DNAMARKER_ID INTEGER
3796
);
3797

    
3798
CREATE TABLE SEQUENCE_ANNOTATION (
3799
    SEQUENCE_ID INTEGER NOT NULL,
3800
    ANNOTATIONS_ID INTEGER NOT NULL,
3801
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3802
);
3803
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3804
    REV INTEGER NOT NULL,
3805
    REVTYPE TINYINT,
3806
    SEQUENCE_ID INTEGER NOT NULL,
3807
    ANNOTATIONS_ID INTEGER NOT NULL
3808
);
3809

    
3810
CREATE TABLE SEQUENCE_MARKER (
3811
    SEQUENCE_ID INTEGER NOT NULL,
3812
    MARKERS_ID INTEGER NOT NULL,
3813
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3814
);
3815
CREATE TABLE SEQUENCE_MARKER_AUD (
3816
    REV INTEGER NOT NULL,
3817
    REVTYPE TINYINT,
3818
    SEQUENCE_ID INTEGER NOT NULL,
3819
    MARKERS_ID INTEGER NOT NULL
3820
);
3821
CREATE TABLE SEQUENCE_REFERENCE (
3822
    SEQUENCE_ID INTEGER NOT NULL,
3823
    CITATIONS_ID INTEGER NOT NULL,
3824
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3825
);
3826
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3827
    REV INTEGER NOT NULL,
3828
    REVTYPE TINYINT,
3829
    SEQUENCE_ID INTEGER NOT NULL,
3830
    CITATIONS_ID INTEGER NOT NULL
3831
);
3832

    
3833
CREATE TABLE SINGLEREADALIGNMENT (
3834
    ID INTEGER NOT NULL,
3835
    CREATED TIMESTAMP,
3836
    UUID VARCHAR(36),
3837
    UPDATED TIMESTAMP,
3838
        EDITEDSEQUENCE CLOB,
3839
        SHIFTS CLOB,
3840
    REVERSECOMPLEMENT BIT,
3841
        FIRSTSEQPOSITION INTEGER,
3842
        LEFTCUTPOSITION INTEGER,
3843
        RIGHTCUTPOSITION INTEGER,
3844
        CREATEDBY_ID INTEGER,
3845
    UPDATEDBY_ID INTEGER,
3846
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3847
    SINGLEREAD_ID INTEGER NOT NULL,
3848
    PRIMARY KEY (ID)
3849
);
3850

    
3851
CREATE TABLE SINGLEREADALIGNMENT_AUD (
3852
    ID INTEGER NOT NULL,
3853
    REV INTEGER NOT NULL,
3854
    REVTYPE TINYINT,
3855
    CREATED TIMESTAMP,
3856
    UUID VARCHAR(36),
3857
    UPDATED TIMESTAMP,
3858
        EDITEDSEQUENCE CLOB,
3859
        SHIFTS CLOB,
3860
    REVERSECOMPLEMENT BIT,
3861
        FIRSTSEQPOSITION INTEGER,
3862
        LEFTCUTPOSITION INTEGER,
3863
        RIGHTCUTPOSITION INTEGER,
3864
        CREATEDBY_ID INTEGER,
3865
    UPDATEDBY_ID INTEGER,
3866
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3867
    SINGLEREAD_ID INTEGER NOT NULL
3868
);
3869

    
3870
CREATE TABLE SINGLEREAD (
3871
    ID INTEGER NOT NULL,
3872
    CREATED TIMESTAMP,
3873
    UUID VARCHAR(36),
3874
    UPDATED TIMESTAMP,
3875
    DESCRIPTION VARCHAR(255),
3876
    TIMEPERIOD_END VARCHAR(255),
3877
    TIMEPERIOD_FREETEXT VARCHAR(255),
3878
    TIMEPERIOD_START VARCHAR(255),
3879
    DIRECTION VARCHAR(3),
3880
    SEQUENCE_LENGTH INTEGER,
3881
    SEQUENCE_STRING CLOB,
3882
    CREATEDBY_ID INTEGER,
3883
    UPDATEDBY_ID INTEGER,
3884
    ACTOR_ID INTEGER,
3885
    AMPLIFICATIONRESULT_ID INTEGER,
3886
    MATERIALORMETHOD_ID INTEGER,
3887
    PHEROGRAM_ID INTEGER,
3888
    PRIMER_ID INTEGER,
3889
    PRIMARY KEY (ID)
3890
);
3891
CREATE TABLE SINGLEREAD_AUD (
3892
    ID INTEGER NOT NULL,
3893
    REV INTEGER NOT NULL,
3894
    REVTYPE TINYINT,
3895
    CREATED TIMESTAMP,
3896
    UUID VARCHAR(36),
3897
    UPDATED TIMESTAMP,
3898
    DESCRIPTION VARCHAR(255),
3899
    TIMEPERIOD_END VARCHAR(255),
3900
    TIMEPERIOD_FREETEXT VARCHAR(255),
3901
    TIMEPERIOD_START VARCHAR(255),
3902
    DIRECTION VARCHAR(3),
3903
    SEQUENCE_LENGTH INTEGER,
3904
    SEQUENCE_STRING CLOB,
3905
    CREATEDBY_ID INTEGER,
3906
    UPDATEDBY_ID INTEGER,
3907
    ACTOR_ID INTEGER,
3908
    AMPLIFICATIONRESULT_ID INTEGER,
3909
    MATERIALORMETHOD_ID INTEGER,
3910
    PHEROGRAM_ID INTEGER,
3911
    PRIMER_ID INTEGER
3912
);
3913

    
3914
CREATE TABLE SINGLEREAD_ANNOTATION (
3915
    SINGLEREAD_ID INTEGER NOT NULL,
3916
    ANNOTATIONS_ID INTEGER NOT NULL,
3917
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
3918
);
3919
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
3920
    REV INTEGER NOT NULL,
3921
    REVTYPE TINYINT,
3922
    SINGLEREAD_ID INTEGER NOT NULL,
3923
    ANNOTATIONS_ID INTEGER NOT NULL
3924
);
3925

    
3926
CREATE TABLE SINGLEREAD_MARKER (
3927
    SINGLEREAD_ID INTEGER NOT NULL,
3928
    MARKERS_ID INTEGER NOT NULL,
3929
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
3930
);
3931

    
3932
CREATE TABLE SINGLEREAD_MARKER_AUD (
3933
    REV INTEGER NOT NULL,
3934
    REVTYPE TINYINT,
3935
    SINGLEREAD_ID INTEGER NOT NULL,
3936
    MARKERS_ID INTEGER NOT NULL
3937
);
3938

    
3939
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
3940
    DTYPE VARCHAR(31) NOT NULL,
3941
    ID INTEGER NOT NULL,
3942
    CREATED TIMESTAMP,
3943
    UUID VARCHAR(36),
3944
    UPDATED TIMESTAMP,
3945
    RECORDBASIS  VARCHAR(4) NOT NULL,
3946
    LSID_AUTHORITY VARCHAR(255),
3947
    LSID_LSID VARCHAR(255),
3948
    LSID_NAMESPACE VARCHAR(255),
3949
    LSID_OBJECT VARCHAR(255),
3950
    LSID_REVISION VARCHAR(255),
3951
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3952
    TITLECACHE VARCHAR(255),
3953
    PROTECTEDIDENTITYCACHE BOOLEAN,
3954
    IDENTITYCACHE VARCHAR(255),
3955
    PUBLISH BOOLEAN,
3956
    INDIVIDUALCOUNT INTEGER,
3957
        PREFERREDSTABLEURI CLOB,
3958
    ACCESSIONNUMBER VARCHAR(255),
3959
    BARCODE VARCHAR(255),
3960
    CATALOGNUMBER VARCHAR(255),
3961
    COLLECTORSNUMBER VARCHAR(255),
3962
    EXSICCATUM VARCHAR(255),
3963
    ORIGINALLABELINFO CLOB,
3964
    FIELDNOTES VARCHAR(255),
3965
    FIELDNUMBER VARCHAR(255),
3966
    CREATEDBY_ID INTEGER,
3967
    UPDATEDBY_ID INTEGER,
3968
    LIFESTAGE_ID INTEGER,
3969
    SEX_ID INTEGER,
3970
    KINDOFUNIT_ID INTEGER,
3971
    COLLECTION_ID INTEGER,
3972
    DERIVEDFROM_ID INTEGER,
3973
    STOREDUNDER_ID INTEGER,
3974
    PRESERVATION_ID INTEGER,
3975
    GATHERINGEVENT_ID INTEGER,
3976
    PRIMARYCOLLECTOR_ID INTEGER,
3977
    MEDIASPECIMEN_ID INTEGER,
3978
    DNAQUALITY_ID INTEGER
3979
);
3980
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
3981
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
3982
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
3983
    DTYPE VARCHAR(31) NOT NULL,
3984
    ID INTEGER NOT NULL,
3985
    REV INTEGER NOT NULL,
3986
    REVTYPE TINYINT,
3987
    CREATED TIMESTAMP,
3988
    UUID VARCHAR(36),
3989
    UPDATED TIMESTAMP,
3990
    RECORDBASIS  VARCHAR(4) NOT NULL,
3991
    LSID_AUTHORITY VARCHAR(255),
3992
    LSID_LSID VARCHAR(255),
3993
    LSID_NAMESPACE VARCHAR(255),
3994
    LSID_OBJECT VARCHAR(255),
3995
    LSID_REVISION VARCHAR(255),
3996
    PROTECTEDTITLECACHE BOOLEAN,
3997
    TITLECACHE VARCHAR(255),
3998
    PROTECTEDIDENTITYCACHE BOOLEAN NULL,
3999
    IDENTITYCACHE VARCHAR(255),
4000
        PUBLISH BOOLEAN,
4001
    INDIVIDUALCOUNT INTEGER,
4002
    PREFERREDSTABLEURI CLOB,
4003
    ACCESSIONNUMBER VARCHAR(255),
4004
    BARCODE VARCHAR(255),
4005
    CATALOGNUMBER VARCHAR(255),
4006
    COLLECTORSNUMBER VARCHAR(255),
4007
    EXSICCATUM VARCHAR(255),
4008
    ORIGINALLABELINFO CLOB,
4009
    FIELDNOTES VARCHAR(255),
4010
    FIELDNUMBER VARCHAR(255),
4011
    CREATEDBY_ID INTEGER,
4012
    UPDATEDBY_ID INTEGER,
4013
    LIFESTAGE_ID INTEGER,
4014
    SEX_ID INTEGER,
4015
    KINDOFUNIT_ID INTEGER,
4016
    COLLECTION_ID INTEGER,
4017
    DERIVEDFROM_ID INTEGER,
4018
    STOREDUNDER_ID INTEGER,
4019
    PRESERVATION_ID INTEGER,
4020
    GATHERINGEVENT_ID INTEGER,
4021
    PRIMARYCOLLECTOR_ID INTEGER,
4022
    MEDIASPECIMEN_ID INTEGER,
4023
    DNAQUALITY_ID INTEGER
4024
);
4025
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
4026
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
4027
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4028
    ANNOTATIONS_ID INTEGER NOT NULL
4029
);
4030
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
4031
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
4032
    REV INTEGER NOT NULL,
4033
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4034
    ANNOTATIONS_ID INTEGER NOT NULL,
4035
    REVTYPE TINYINT
4036
);
4037
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
4038
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
4039
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4040
    CREDITS_ID INTEGER NOT NULL,
4041
    SORTINDEX INTEGER NOT NULL
4042
);
4043
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
4044
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
4045
    REV INTEGER NOT NULL,
4046
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4047
    CREDITS_ID INTEGER NOT NULL,
4048
    SORTINDEX INTEGER NOT NULL,
4049
    REVTYPE TINYINT
4050
);
4051
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
4052
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
4053
    ORIGINALS_ID INTEGER NOT NULL,
4054
    DERIVATIONEVENTS_ID INTEGER NOT NULL
4055
);
4056
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
4057
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
4058
    REV INTEGER NOT NULL,
4059
    ORIGINALS_ID INTEGER NOT NULL,
4060
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
4061
    REVTYPE TINYINT
4062
);
4063
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
4064
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
4065
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4066
    EXTENSIONS_ID INTEGER NOT NULL
4067
);
4068
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
4069
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
4070
    REV INTEGER NOT NULL,
4071
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4072
    EXTENSIONS_ID INTEGER NOT NULL,
4073
    REVTYPE TINYINT
4074
);
4075
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;
4076

    
4077
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4078
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4079
    IDENTIFIERS_ID INTEGER NOT NULL,
4080
    SORTINDEX INTEGER NOT NULL
4081
);
4082
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4083
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4084
    REV INTEGER NOT NULL,
4085
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4086
    IDENTIFIERS_ID INTEGER NOT NULL,
4087
    SORTINDEX INTEGER NOT NULL,
4088
    REVTYPE TINYINT
4089
);
4090
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4091

    
4092
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
4093
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4094
    DEFINITION_ID INTEGER NOT NULL,
4095
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
4096
);
4097
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
4098
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
4099
    REV INTEGER NOT NULL,
4100
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4101
    DEFINITION_ID INTEGER NOT NULL,
4102
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
4103
    REVTYPE TINYINT
4104
);
4105
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
4106
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
4107
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4108
    MARKERS_ID INTEGER NOT NULL
4109
);
4110
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
4111
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
4112
    REV INTEGER NOT NULL,
4113
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4114
    MARKERS_ID INTEGER NOT NULL,
4115
    REVTYPE TINYINT
4116
);
4117
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
4118
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
4119
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4120
    SOURCES_ID INTEGER NOT NULL
4121
);
4122
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
4123
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
4124
    REV INTEGER NOT NULL,
4125
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4126
    SOURCES_ID INTEGER NOT NULL,
4127
    REVTYPE TINYINT
4128
);
4129
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
4130
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO(
4131
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4132
    RIGHTS_ID INTEGER NOT NULL
4133
);
4134
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO;
4135
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD(
4136
    REV INTEGER NOT NULL,
4137
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4138
    RIGHTS_ID INTEGER NOT NULL,
4139
    REVTYPE TINYINT
4140
);
4141
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD;
4142

    
4143
CREATE CACHED TABLE PUBLIC.STATEDATA(
4144
    ID INTEGER NOT NULL,
4145
    CREATED TIMESTAMP,
4146
    UUID VARCHAR(36),
4147
    UPDATED TIMESTAMP,
4148
    CREATEDBY_ID INTEGER,
4149
    UPDATEDBY_ID INTEGER,
4150
        CATEGORICALDATA_ID INTEGER,
4151
    STATE_ID INTEGER
4152
);
4153
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA;
4154
CREATE CACHED TABLE PUBLIC.STATEDATA_AUD(
4155
    ID INTEGER NOT NULL,
4156
    REV INTEGER NOT NULL,
4157
    REVTYPE TINYINT,
4158
    CREATED TIMESTAMP,
4159
    UUID VARCHAR(36),
4160
    UPDATED TIMESTAMP,
4161
    CREATEDBY_ID INTEGER,
4162
    UPDATEDBY_ID INTEGER,
4163
        CATEGORICALDATA_ID INTEGER,
4164
    STATE_ID INTEGER
4165
);
4166
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_AUD;
4167
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE(
4168
    STATEDATA_ID INTEGER NOT NULL,
4169
    MODIFIERS_ID INTEGER NOT NULL
4170
);
4171
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE;
4172
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD(
4173
    REV INTEGER NOT NULL,
4174
    STATEDATA_ID INTEGER NOT NULL,
4175
    MODIFIERS_ID INTEGER NOT NULL,
4176
    REVTYPE TINYINT
4177
);
4178
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD;
4179
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING(
4180
    STATEDATA_ID INTEGER NOT NULL,
4181
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4182
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
4183
);
4184
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING;
4185
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD(
4186
    REV INTEGER NOT NULL,
4187
    STATEDATA_ID INTEGER NOT NULL,
4188
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4189
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
4190
    REVTYPE TINYINT
4191
);
4192
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING_AUD;
4193
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE(
4194
    ID INTEGER NOT NULL,
4195
    CREATED TIMESTAMP,
4196
    UUID VARCHAR(36),
4197
    UPDATED TIMESTAMP,
4198
    VALUE DOUBLE NOT NULL,
4199
    CREATEDBY_ID INTEGER,
4200
    UPDATEDBY_ID INTEGER,
4201
        QUANTITATIVEDATA_ID INTEGER,
4202
    TYPE_ID INTEGER
4203
);
4204
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE;
4205
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD(
4206
    ID INTEGER NOT NULL,
4207
    REV INTEGER NOT NULL,
4208
    REVTYPE TINYINT,
4209
    CREATED TIMESTAMP,
4210
    UUID VARCHAR(36),
4211
    UPDATED TIMESTAMP,
4212
    VALUE DOUBLE,
4213
    CREATEDBY_ID INTEGER,
4214
    UPDATEDBY_ID INTEGER,
4215
        QUANTITATIVEDATA_ID INTEGER,
4216
    TYPE_ID INTEGER
4217
);
4218
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_AUD;
4219
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE(
4220
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4221
    MODIFIERS_ID INTEGER NOT NULL
4222
);
4223
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE;
4224
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD(
4225
    REV INTEGER NOT NULL,
4226
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4227
    MODIFIERS_ID INTEGER NOT NULL,
4228
    REVTYPE TINYINT
4229
);
4230
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD;
4231
CREATE CACHED TABLE PUBLIC.TAXONBASE(
4232
    DTYPE VARCHAR(31) NOT NULL,
4233
    ID INTEGER NOT NULL,
4234
    CREATED TIMESTAMP,
4235
    UUID VARCHAR(36),
4236
    UPDATED TIMESTAMP,
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
        SECMICROREFERENCE VARCHAR(255),
4243
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4244
    TITLECACHE VARCHAR(255),
4245
    APPENDEDPHRASE VARCHAR(255),
4246
    DOUBTFUL BOOLEAN NOT NULL,
4247
    PUBLISH BOOLEAN,
4248
    USENAMECACHE BOOLEAN NOT NULL,
4249
    EXCLUDED BOOLEAN,
4250
    TAXONSTATUSUNKNOWN BOOLEAN,
4251
    UNPLACED BOOLEAN,
4252
        PARTIAL BOOLEAN NOT NULL,
4253
    PROPARTE BOOLEAN NOT NULL,
4254
    CREATEDBY_ID INTEGER,
4255
    UPDATEDBY_ID INTEGER,
4256
    NAME_ID INTEGER,
4257
    SEC_ID INTEGER,
4258
        ACCEPTEDTAXON_ID INTEGER,
4259
        TYPE_ID INTEGER
4260
);
4261
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE;
4262
CREATE INDEX PUBLIC.TAXONBASETITLECACHEINDEX ON PUBLIC.TAXONBASE(TITLECACHE);
4263
CREATE CACHED TABLE PUBLIC.TAXONBASE_AUD(
4264
    DTYPE VARCHAR(31) NOT NULL,
4265
    ID INTEGER NOT NULL,
4266
    REV INTEGER NOT NULL,
4267
    REVTYPE TINYINT,
4268
    CREATED TIMESTAMP,
4269
    UUID VARCHAR(36),
4270
    UPDATED TIMESTAMP,
4271
    LSID_AUTHORITY VARCHAR(255),
4272
    LSID_LSID VARCHAR(255),
4273
    LSID_NAMESPACE VARCHAR(255),
4274
    LSID_OBJECT VARCHAR(255),
4275
    LSID_REVISION VARCHAR(255),
4276
    PROTECTEDTITLECACHE BOOLEAN,
4277
    TITLECACHE VARCHAR(255),
4278
    APPENDEDPHRASE VARCHAR(255),
4279
        SECMICROREFERENCE VARCHAR(255),
4280
    DOUBTFUL BOOLEAN,
4281
    PUBLISH BOOLEAN,
4282
        PARTIAL BOOLEAN NOT NULL,
4283
    PROPARTE BOOLEAN NOT NULL,
4284
    USENAMECACHE BOOLEAN,
4285
    CREATEDBY_ID INTEGER,
4286
    UPDATEDBY_ID INTEGER,
4287
    NAME_ID INTEGER,
4288
    SEC_ID INTEGER,
4289
    EXCLUDED BOOLEAN,
4290
    TAXONSTATUSUNKNOWN BOOLEAN,
4291
    UNPLACED BOOLEAN,
4292
        ACCEPTEDTAXON_ID INTEGER,
4293
        TYPE_ID INTEGER
4294
);
4295
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_AUD;
4296
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION(
4297
    TAXONBASE_ID INTEGER NOT NULL,
4298
    ANNOTATIONS_ID INTEGER NOT NULL
4299
);
4300
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION;
4301
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION_AUD(
4302
    REV INTEGER NOT NULL,
4303
    TAXONBASE_ID INTEGER NOT NULL,
4304
    ANNOTATIONS_ID INTEGER NOT NULL,
4305
    REVTYPE TINYINT
4306
);
4307
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION_AUD;
4308
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT(
4309
    TAXONBASE_ID INTEGER NOT NULL,
4310
    CREDITS_ID INTEGER NOT NULL,
4311
    SORTINDEX INTEGER NOT NULL
4312
);
4313
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT;
4314
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT_AUD(
4315
    REV INTEGER NOT NULL,
4316
    TAXONBASE_ID INTEGER NOT NULL,
4317
    CREDITS_ID INTEGER NOT NULL,
4318
    SORTINDEX INTEGER NOT NULL,
4319
    REVTYPE TINYINT
4320
);
4321
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT_AUD;
4322
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION(
4323
    TAXONBASE_ID INTEGER NOT NULL,
4324
    EXTENSIONS_ID INTEGER NOT NULL
4325
);
4326
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION;
4327
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION_AUD(
4328
    REV INTEGER NOT NULL,
4329
    TAXONBASE_ID INTEGER NOT NULL,
4330
    EXTENSIONS_ID INTEGER NOT NULL,
4331
    REVTYPE TINYINT
4332
);
4333
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION_AUD;
4334
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER(
4335
    TAXONBASE_ID INTEGER NOT NULL,
4336
    IDENTIFIERS_ID INTEGER NOT NULL,
4337
    SORTINDEX INTEGER NOT NULL
4338
);
4339
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER;
4340
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER_AUD(
4341
    REV INTEGER NOT NULL,
4342
    TAXONBASE_ID INTEGER NOT NULL,
4343
    IDENTIFIERS_ID INTEGER NOT NULL,
4344
    SORTINDEX INTEGER NOT NULL,
4345
    REVTYPE TINYINT
4346
);
4347
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER_AUD;
4348
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER(
4349
    TAXONBASE_ID INTEGER NOT NULL,
4350
    MARKERS_ID INTEGER NOT NULL
4351
);
4352
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER;
4353
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER_AUD(
4354
    REV INTEGER NOT NULL,
4355
    TAXONBASE_ID INTEGER NOT NULL,
4356
    MARKERS_ID INTEGER NOT NULL,
4357
    REVTYPE TINYINT
4358
);
4359
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER_AUD;
4360
CREATE CACHED TABLE