Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdmlib / cdmlib-io / src / test / resources / dbscripts / 001-cdm.h2.sql @ 99375cb9

History | View | Annotate | Download (356 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
    CODE VARCHAR(255),
65
    NAME VARCHAR(255),
66
    NOMENCLATURALTITLE VARCHAR(255),
67
    FIRSTNAME VARCHAR(255),
68
    LASTNAME VARCHAR(255),
69
    LIFESPAN_END VARCHAR(255),
70
    LIFESPAN_FREETEXT VARCHAR(255),
71
    LIFESPAN_START VARCHAR(255),
72
    PREFIX VARCHAR(255),
73
    SUFFIX VARCHAR(255),
74
    PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
75
    CREATEDBY_ID INTEGER,
76
    UPDATEDBY_ID INTEGER,
77
    ISPARTOF_ID INTEGER
78
);
79
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE;
80
CREATE INDEX PUBLIC.AGENTTITLECACHEINDEX ON PUBLIC.AGENTBASE(TITLECACHE);
81
CREATE CACHED TABLE PUBLIC.AGENTBASE_AUD(
82
    DTYPE VARCHAR(31) NOT NULL,
83
    ID INTEGER NOT NULL,
84
    REV INTEGER NOT NULL,
85
    REVTYPE TINYINT,
86
    CREATED TIMESTAMP,
87
    UUID VARCHAR(36),
88
    UPDATED TIMESTAMP,
89
    LSID_AUTHORITY VARCHAR(255),
90
    LSID_LSID VARCHAR(255),
91
    LSID_NAMESPACE VARCHAR(255),
92
    LSID_OBJECT VARCHAR(255),
93
    LSID_REVISION VARCHAR(255),
94
    PROTECTEDTITLECACHE BOOLEAN,
95
    TITLECACHE VARCHAR(255),
96
    CREATEDBY_ID INTEGER,
97
    UPDATEDBY_ID INTEGER,
98
    NOMENCLATURALTITLE VARCHAR(255),
99
    PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
100
    FIRSTNAME VARCHAR(255),
101
    LASTNAME VARCHAR(255),
102
    LIFESPAN_END VARCHAR(255),
103
    LIFESPAN_FREETEXT VARCHAR(255),
104
    LIFESPAN_START VARCHAR(255),
105
    PREFIX VARCHAR(255),
106
    SUFFIX VARCHAR(255),
107
    CODE VARCHAR(255),
108
    NAME VARCHAR(255),
109
    ISPARTOF_ID INTEGER
110
);
111
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AUD;
112
CREATE CACHED TABLE PUBLIC.AGENTBASE_ADDRESS(
113
    AGENTBASE_ID INTEGER NOT NULL,
114
    CONTACT_ADDRESSES_ID INTEGER NOT NULL
115
);
116
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ADDRESS;
117
CREATE CACHED TABLE PUBLIC.AGENTBASE_ADDRESS_AUD(
118
    REV INTEGER NOT NULL,
119
    AGENTBASE_ID INTEGER NOT NULL,
120
    CONTACT_ADDRESSES_ID INTEGER NOT NULL,
121
    REVTYPE TINYINT
122
);
123
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ADDRESS_AUD;
124
CREATE CACHED TABLE PUBLIC.AGENTBASE_AGENTBASE(
125
    AGENTBASE_ID INTEGER NOT NULL,
126
    TEAMMEMBERS_ID INTEGER NOT NULL,
127
    SORTINDEX INTEGER NOT NULL
128
);
129
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AGENTBASE;
130
CREATE CACHED TABLE PUBLIC.AGENTBASE_AGENTBASE_AUD(
131
    REV INTEGER NOT NULL,
132
    AGENTBASE_ID INTEGER NOT NULL,
133
    TEAMMEMBERS_ID INTEGER NOT NULL,
134
    SORTINDEX INTEGER NOT NULL,
135
    REVTYPE TINYINT
136
);
137
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AGENTBASE_AUD;
138
CREATE CACHED TABLE PUBLIC.AGENTBASE_ANNOTATION(
139
    AGENTBASE_ID INTEGER NOT NULL,
140
    ANNOTATIONS_ID INTEGER NOT NULL
141
);
142
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ANNOTATION;
143
CREATE CACHED TABLE PUBLIC.AGENTBASE_ANNOTATION_AUD(
144
    REV INTEGER NOT NULL,
145
    AGENTBASE_ID INTEGER NOT NULL,
146
    ANNOTATIONS_ID INTEGER NOT NULL,
147
    REVTYPE TINYINT
148
);
149
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ANNOTATION_AUD;
150
CREATE CACHED TABLE PUBLIC.AGENTBASE_CREDIT(
151
    AGENTBASE_ID INTEGER NOT NULL,
152
    CREDITS_ID INTEGER NOT NULL,
153
    SORTINDEX INTEGER NOT NULL
154
);
155
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CREDIT;
156
CREATE CACHED TABLE PUBLIC.AGENTBASE_CREDIT_AUD(
157
    REV INTEGER NOT NULL,
158
    AGENTBASE_ID INTEGER NOT NULL,
159
    CREDITS_ID INTEGER NOT NULL,
160
    SORTINDEX INTEGER NOT NULL,
161
    REVTYPE TINYINT
162
);
163
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CREDIT_AUD;
164
CREATE CACHED TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE(
165
    AGENTBASE_ID INTEGER NOT NULL,
166
    TYPES_ID INTEGER NOT NULL
167
);
168
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_DEFINEDTERMBASE;
169
CREATE CACHED TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD(
170
    REV INTEGER NOT NULL,
171
    AGENTBASE_ID INTEGER NOT NULL,
172
    TYPES_ID INTEGER NOT NULL,
173
    REVTYPE TINYINT
174
);
175
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD;
176
CREATE CACHED TABLE PUBLIC.AGENTBASE_EXTENSION(
177
    AGENTBASE_ID INTEGER NOT NULL,
178
    EXTENSIONS_ID INTEGER NOT NULL
179
);
180
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_EXTENSION;
181
CREATE CACHED TABLE PUBLIC.AGENTBASE_EXTENSION_AUD(
182
    REV INTEGER NOT NULL,
183
    AGENTBASE_ID INTEGER NOT NULL,
184
    EXTENSIONS_ID INTEGER NOT NULL,
185
    REVTYPE TINYINT
186
);
187
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_EXTENSION_AUD;
188
CREATE CACHED TABLE PUBLIC.AGENTBASE_MARKER(
189
    AGENTBASE_ID INTEGER NOT NULL,
190
    MARKERS_ID INTEGER NOT NULL
191
);
192
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MARKER;
193
CREATE CACHED TABLE PUBLIC.AGENTBASE_MARKER_AUD(
194
    REV INTEGER NOT NULL,
195
    AGENTBASE_ID INTEGER NOT NULL,
196
    MARKERS_ID INTEGER NOT NULL,
197
    REVTYPE TINYINT
198
);
199
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MARKER_AUD;
200
CREATE CACHED TABLE PUBLIC.AGENTBASE_MEDIA(
201
    AGENTBASE_ID INTEGER NOT NULL,
202
    MEDIA_ID INTEGER NOT NULL
203
);
204
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MEDIA;
205
CREATE CACHED TABLE PUBLIC.AGENTBASE_MEDIA_AUD(
206
    REV INTEGER NOT NULL,
207
    AGENTBASE_ID INTEGER NOT NULL,
208
    MEDIA_ID INTEGER NOT NULL,
209
    REVTYPE TINYINT
210
);
211
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MEDIA_AUD;
212
CREATE CACHED TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE(
213
    AGENTBASE_ID INTEGER NOT NULL,
214
    SOURCES_ID INTEGER NOT NULL
215
);
216
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ORIGINALSOURCEBASE;
217
CREATE CACHED TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD(
218
    REV INTEGER NOT NULL,
219
    AGENTBASE_ID INTEGER NOT NULL,
220
    SOURCES_ID INTEGER NOT NULL,
221
    REVTYPE TINYINT
222
);
223
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD;
224
CREATE CACHED TABLE PUBLIC.AGENTBASE_RIGHTS(
225
    AGENTBASE_ID INTEGER NOT NULL,
226
    RIGHTS_ID INTEGER NOT NULL
227
);
228
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_RIGHTS;
229
CREATE CACHED TABLE PUBLIC.AGENTBASE_RIGHTS_AUD(
230
    REV INTEGER NOT NULL,
231
    AGENTBASE_ID INTEGER NOT NULL,
232
    RIGHTS_ID INTEGER NOT NULL,
233
    REVTYPE TINYINT
234
);
235
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_RIGHTS_AUD;
236
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES(
237
    AGENTBASE_ID INTEGER NOT NULL,
238
    CONTACT_EMAILADDRESSES_ELEMENT VARCHAR(255)
239
);
240
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES;
241
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD(
242
    REV INTEGER NOT NULL,
243
    AGENTBASE_ID INTEGER NOT NULL,
244
    CONTACT_EMAILADDRESSES_ELEMENT VARCHAR(255) NOT NULL,
245
    REVTYPE TINYINT
246
);
247
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD;
248
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS(
249
    AGENTBASE_ID INTEGER NOT NULL,
250
    CONTACT_FAXNUMBERS_ELEMENT VARCHAR(255)
251
);
252
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS;
253
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD(
254
    REV INTEGER NOT NULL,
255
    AGENTBASE_ID INTEGER NOT NULL,
256
    CONTACT_FAXNUMBERS_ELEMENT VARCHAR(255) NOT NULL,
257
    REVTYPE TINYINT
258
);
259
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD;
260
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS(
261
    AGENTBASE_ID INTEGER NOT NULL,
262
    CONTACT_PHONENUMBERS_ELEMENT VARCHAR(255)
263
);
264
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS;
265
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD(
266
    REV INTEGER NOT NULL,
267
    AGENTBASE_ID INTEGER NOT NULL,
268
    CONTACT_PHONENUMBERS_ELEMENT VARCHAR(255) NOT NULL,
269
    REVTYPE TINYINT
270
);
271
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD;
272
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_URLS(
273
    AGENTBASE_ID INTEGER NOT NULL,
274
    CONTACT_URLS_ELEMENT VARCHAR(255)
275
);
276
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_URLS;
277
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_URLS_AUD(
278
    REV INTEGER NOT NULL,
279
    AGENTBASE_ID INTEGER NOT NULL,
280
    CONTACT_URLS_ELEMENT VARCHAR(255) NOT NULL,
281
    REVTYPE TINYINT
282
);
283
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_URLS_AUD;
284

    
285
CREATE TABLE AMPLIFICATION (
286
     ID INTEGER NOT NULL,
287
     CREATED TIMESTAMP,
288
     UUID VARCHAR(36),
289
     UPDATED TIMESTAMP,
290
     DESCRIPTION VARCHAR(255),
291
     TIMEPERIOD_END VARCHAR(255),
292
     TIMEPERIOD_FREETEXT VARCHAR(255),
293
     TIMEPERIOD_START VARCHAR(255),
294
     ELECTROPHORESISVOLTAGE DOUBLE,
295
     GELCONCENTRATION DOUBLE,
296
     GELRUNNINGTIME DOUBLE,
297
     LADDERUSED VARCHAR(255),
298
     SUCCESSTEXT VARCHAR(255),
299
     SUCCESSFUL BOOLEAN,
300
     CREATEDBY_ID INTEGER,
301
     UPDATEDBY_ID INTEGER,
302
     ACTOR_ID INTEGER,
303
     CLONING_ID INTEGER,
304
     DNASAMPLE_ID INTEGER,
305
     FORWARDPRIMER_ID INTEGER,
306
     MARKER_ID INTEGER,
307
     PURIFICATION_ID INTEGER,
308
     REVERSEPRIMER_ID INTEGER,
309
     GELPHOTO_ID INTEGER,
310
     PRIMARY KEY (ID)
311
);
312

    
313
CREATE TABLE AMPLIFICATION_AUD (
314
    ID INTEGER NOT NULL,
315
    REV INTEGER NOT NULL,
316
    REVTYPE TINYINT,
317
    CREATED TIMESTAMP,
318
    UUID VARCHAR(36),
319
    UPDATED TIMESTAMP,
320
    DESCRIPTION VARCHAR(255),
321
    TIMEPERIOD_END VARCHAR(255),
322
    TIMEPERIOD_FREETEXT VARCHAR(255),
323
    TIMEPERIOD_START VARCHAR(255),
324
    ELECTROPHORESISVOLTAGE DOUBLE,
325
    GELCONCENTRATION DOUBLE,
326
    GELRUNNINGTIME DOUBLE,
327
    LADDERUSED VARCHAR(255),
328
    SUCCESSTEXT VARCHAR(255),
329
    SUCCESSFUL BOOLEAN,
330
    CREATEDBY_ID INTEGER,
331
    UPDATEDBY_ID INTEGER,
332
    ACTOR_ID INTEGER,
333
    CLONING_ID INTEGER,
334
    DNASAMPLE_ID INTEGER,
335
    FORWARDPRIMER_ID INTEGER,
336
    MARKER_ID INTEGER,
337
    PURIFICATION_ID INTEGER,
338
    REVERSEPRIMER_ID INTEGER,
339
    GELPHOTO_ID INTEGER,
340
    PRIMARY KEY (ID)
341
);
342

    
343
CREATE TABLE AMPLIFICATION_ANNOTATION (
344
    AMPLIFICATION_ID INTEGER NOT NULL,
345
    ANNOTATIONS_ID INTEGER NOT NULL,
346
    PRIMARY KEY (AMPLIFICATION_ID, ANNOTATIONS_ID)
347
);
348

    
349
CREATE TABLE AMPLIFICATION_ANNOTATION_AUD (
350
    REV INTEGER NOT NULL,
351
    REVTYPE TINYINT,
352
    AMPLIFICATION_ID INTEGER NOT NULL,
353
    ANNOTATIONS_ID INTEGER NOT NULL
354
);
355

    
356
CREATE TABLE AMPLIFICATION_MARKER (
357
    AMPLIFICATION_ID INTEGER NOT NULL,
358
    MARKERS_ID INTEGER NOT NULL,
359
    PRIMARY KEY (AMPLIFICATION_ID, MARKERS_ID)
360
);
361

    
362
CREATE TABLE AMPLIFICATION_MARKER_AUD (
363
    REV INTEGER NOT NULL,
364
    REVTYPE TINYINT,
365
    AMPLIFICATION_ID INTEGER NOT NULL,
366
    MARKERS_ID INTEGER NOT NULL,
367
);
368

    
369
CREATE TABLE AMPLIFICATION_SINGLESEQUENCE (
370
        AMPLIFICATION_ID INTEGER NOT NULL,
371
    SINGLESEQUENCES_ID INTEGER NOT NULL,
372
    PRIMARY KEY (AMPLIFICATION_ID, SINGLESEQUENCES_ID)
373
);
374

    
375
CREATE TABLE AMPLIFICATION_SINGLESEQUENCE_AUD (
376
    REV INTEGER NOT NULL,
377
    REVTYPE TINYINT,
378
        AMPLIFICATION_ID INTEGER NOT NULL,
379
    SINGLESEQUENCES_ID INTEGER NOT NULL,
380
);
381

    
382
CREATE CACHED TABLE PUBLIC.ANNOTATION(
383
    ID INTEGER NOT NULL,
384
    CREATED TIMESTAMP,
385
    UUID VARCHAR(36),
386
    UPDATED TIMESTAMP,
387
    TEXT CLOB,
388
    ANNOTATEDOBJ_TYPE VARCHAR(255),
389
    ANNOTATEDOBJ_ID INTEGER NOT NULL,
390
    LINKBACKURL BINARY(255),
391
    CREATEDBY_ID INTEGER,
392
    UPDATEDBY_ID INTEGER,
393
    LANGUAGE_ID INTEGER,
394
    ANNOTATIONTYPE_ID INTEGER,
395
    COMMENTATOR_ID INTEGER
396
);
397
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION;
398
CREATE CACHED TABLE PUBLIC.ANNOTATION_AUD(
399
    ID INTEGER NOT NULL,
400
    REV INTEGER NOT NULL,
401
    REVTYPE TINYINT,
402
    CREATED TIMESTAMP,
403
    UUID VARCHAR(36),
404
    UPDATED TIMESTAMP,
405
    TEXT CLOB,
406
    LINKBACKURL BINARY(255),
407
    CREATEDBY_ID INTEGER,
408
    UPDATEDBY_ID INTEGER,
409
    LANGUAGE_ID INTEGER,
410
    ANNOTATIONTYPE_ID INTEGER,
411
    COMMENTATOR_ID INTEGER
412
);
413
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_AUD;
414
CREATE CACHED TABLE PUBLIC.ANNOTATION_ANNOTATION(
415
    ANNOTATION_ID INTEGER NOT NULL,
416
    ANNOTATIONS_ID INTEGER NOT NULL
417
);
418
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_ANNOTATION;
419
CREATE CACHED TABLE PUBLIC.ANNOTATION_ANNOTATION_AUD(
420
    REV INTEGER NOT NULL,
421
    ANNOTATION_ID INTEGER NOT NULL,
422
    ANNOTATIONS_ID INTEGER NOT NULL,
423
    REVTYPE TINYINT
424
);
425
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_ANNOTATION_AUD;
426
CREATE CACHED TABLE PUBLIC.ANNOTATION_MARKER(
427
    ANNOTATION_ID INTEGER NOT NULL,
428
    MARKERS_ID INTEGER NOT NULL
429
);
430
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_MARKER;
431
CREATE CACHED TABLE PUBLIC.ANNOTATION_MARKER_AUD(
432
    REV INTEGER NOT NULL,
433
    ANNOTATION_ID INTEGER NOT NULL,
434
    MARKERS_ID INTEGER NOT NULL,
435
    REVTYPE TINYINT
436
);
437
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_MARKER_AUD;
438
CREATE CACHED TABLE PUBLIC.AUDITEVENT(
439
    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,
440
    DATE TIMESTAMP,
441
    TIMESTAMP BIGINT,
442
    UUID VARCHAR(255)
443
);
444
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.AUDITEVENT;
445
CREATE CACHED TABLE PUBLIC.CDM_VIEW(
446
    ID INTEGER NOT NULL,
447
    CREATED TIMESTAMP,
448
    UUID VARCHAR(36),
449
    DESCRIPTION VARCHAR(255),
450
    NAME VARCHAR(255),
451
    CREATEDBY_ID INTEGER,
452
    REFERENCE_ID INTEGER
453
);
454
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CDM_VIEW;
455
CREATE CACHED TABLE PUBLIC.CDM_VIEW_CDM_VIEW(
456
    CDM_VIEW_ID INTEGER NOT NULL,
457
    SUPERVIEWS_ID INTEGER NOT NULL
458
);
459
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CDM_VIEW_CDM_VIEW;
460
CREATE CACHED TABLE PUBLIC.CDMMETADATA(
461
    ID INTEGER NOT NULL,
462
    CREATED TIMESTAMP,
463
    UUID VARCHAR(36),
464
    PROPERTYNAME INTEGER,
465
    VALUE VARCHAR(255),
466
    CREATEDBY_ID INTEGER
467
);
468
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMMETADATA;
469
CREATE CACHED TABLE PUBLIC.CDMPREFERENCES(
470
    SUBJECT VARCHAR(255),
471
    PREDICATE VARCHAR(255),
472
    VALUE VARCHAR(1023)
473
);
474
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMMETADATA;
475
CREATE CACHED TABLE PUBLIC.CLASSIFICATION(
476
    ID INTEGER NOT NULL,
477
    CREATED TIMESTAMP,
478
    UUID VARCHAR(36),
479
    UPDATED TIMESTAMP,
480
    LSID_AUTHORITY VARCHAR(255),
481
    LSID_LSID VARCHAR(255),
482
    LSID_NAMESPACE VARCHAR(255),
483
    LSID_OBJECT VARCHAR(255),
484
    LSID_REVISION VARCHAR(255),
485
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
486
    TITLECACHE VARCHAR(255),
487
    MICROREFERENCE VARCHAR(255),
488
    CREATEDBY_ID INTEGER,
489
    UPDATEDBY_ID INTEGER,
490
    NAME_ID INTEGER,
491
    REFERENCE_ID INTEGER
492
);
493
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION;
494
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_AUD(
495
    ID INTEGER NOT NULL,
496
    REV INTEGER NOT NULL,
497
    REVTYPE TINYINT,
498
    CREATED TIMESTAMP,
499
    UUID VARCHAR(36),
500
    UPDATED TIMESTAMP,
501
    LSID_AUTHORITY VARCHAR(255),
502
    LSID_LSID VARCHAR(255),
503
    LSID_NAMESPACE VARCHAR(255),
504
    LSID_OBJECT VARCHAR(255),
505
    LSID_REVISION VARCHAR(255),
506
    PROTECTEDTITLECACHE BOOLEAN,
507
    TITLECACHE VARCHAR(255),
508
    MICROREFERENCE VARCHAR(255),
509
    CREATEDBY_ID INTEGER,
510
    UPDATEDBY_ID INTEGER,
511
    NAME_ID INTEGER,
512
    REFERENCE_ID INTEGER
513
);
514
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_AUD;
515
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION(
516
    CLASSIFICATION_ID INTEGER NOT NULL,
517
    ANNOTATIONS_ID INTEGER NOT NULL
518
);
519
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION;
520
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION_AUD(
521
    REV INTEGER NOT NULL,
522
    CLASSIFICATION_ID INTEGER NOT NULL,
523
    ANNOTATIONS_ID INTEGER NOT NULL,
524
    REVTYPE TINYINT
525
);
526
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION_AUD;
527
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT(
528
    CLASSIFICATION_ID INTEGER NOT NULL,
529
    CREDITS_ID INTEGER NOT NULL,
530
    SORTINDEX INTEGER NOT NULL
531
);
532
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT;
533
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT_AUD(
534
    REV INTEGER NOT NULL,
535
    CLASSIFICATION_ID INTEGER NOT NULL,
536
    CREDITS_ID INTEGER NOT NULL,
537
    SORTINDEX INTEGER NOT NULL,
538
    REVTYPE TINYINT
539
);
540
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT_AUD;
541
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_EXTENSION(
542
    CLASSIFICATION_ID INTEGER NOT NULL,
543
    EXTENSIONS_ID INTEGER NOT NULL
544
);
545
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_EXTENSION;
546
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_EXTENSION_AUD(
547
    REV INTEGER NOT NULL,
548
    CLASSIFICATION_ID INTEGER NOT NULL,
549
    EXTENSIONS_ID INTEGER NOT NULL,
550
    REVTYPE TINYINT
551
);
552
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_EXTENSION_AUD;
553
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_MARKER(
554
    CLASSIFICATION_ID INTEGER NOT NULL,
555
    MARKERS_ID INTEGER NOT NULL
556
);
557
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_MARKER;
558
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_MARKER_AUD(
559
    REV INTEGER NOT NULL,
560
    CLASSIFICATION_ID INTEGER NOT NULL,
561
    MARKERS_ID INTEGER NOT NULL,
562
    REVTYPE TINYINT
563
);
564
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_MARKER_AUD;
565
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE(
566
    CLASSIFICATION_ID INTEGER NOT NULL,
567
    SOURCES_ID INTEGER NOT NULL
568
);
569
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE;
570
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD(
571
    REV INTEGER NOT NULL,
572
    CLASSIFICATION_ID INTEGER NOT NULL,
573
    SOURCES_ID INTEGER NOT NULL,
574
    REVTYPE TINYINT
575
);
576
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD;
577
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_RIGHTS(
578
    CLASSIFICATION_ID INTEGER NOT NULL,
579
    RIGHTS_ID INTEGER NOT NULL
580
);
581
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_RIGHTS;
582
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_RIGHTS_AUD(
583
    REV INTEGER NOT NULL,
584
    CLASSIFICATION_ID INTEGER NOT NULL,
585
    RIGHTS_ID INTEGER NOT NULL,
586
    REVTYPE TINYINT
587
);
588
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_RIGHTS_AUD;
589
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_TAXONNODE(
590
    CLASSIFICATION_ID INTEGER NOT NULL,
591
    ROOTNODES_ID INTEGER NOT NULL
592
);
593
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_TAXONNODE;
594
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_TAXONNODE_AUD(
595
    REV INTEGER NOT NULL,
596
    CLASSIFICATION_ID INTEGER NOT NULL,
597
    ROOTNODES_ID INTEGER NOT NULL,
598
    REVTYPE TINYINT
599
);
600

    
601
CREATE TABLE PUBLIC.CLONING (
602
        ID INTEGER NOT NULL,
603
    CREATED TIMESTAMP,
604
    UUID VARCHAR(36),
605
    UPDATED TIMESTAMP,
606
    DESCRIPTION VARCHAR(255),
607
    TIMEPERIOD_END VARCHAR(255),
608
    TIMEPERIOD_FREETEXT VARCHAR(255),
609
    TIMEPERIOD_START VARCHAR(255),
610
        METHOD BINARY(255),
611
    STRAIN VARCHAR(255),
612
    CREATEDBY_ID INTEGER,
613
    UPDATEDBY_ID INTEGER,
614
    ACTOR_ID INTEGER,
615
    FORWARDPRIMER_ID INTEGER,
616
    REVERSEPRIMER_ID INTEGER,
617
    PRIMARY KEY (ID)
618
    );
619

    
620
CREATE TABLE PUBLIC.CLONING_AUD (
621
        ID INTEGER NOT NULL,
622
    REV INTEGER NOT NULL,
623
    REVTYPE TINYINT,
624
    CREATED TIMESTAMP,
625
    UUID VARCHAR(36),
626
    UPDATED TIMESTAMP,
627
    DESCRIPTION VARCHAR(255),
628
    TIMEPERIOD_END VARCHAR(255),
629
    TIMEPERIOD_FREETEXT VARCHAR(255),
630
    TIMEPERIOD_START VARCHAR(255),
631
        METHOD BINARY(255),
632
    STRAIN VARCHAR(255),
633
    CREATEDBY_ID INTEGER,
634
    UPDATEDBY_ID INTEGER,
635
    ACTOR_ID INTEGER,
636
    FORWARDPRIMER_ID INTEGER,
637
    REVERSEPRIMER_ID INTEGER
638
);
639

    
640

    
641
CREATE TABLE PUBLIC.CLONING_ANNOTATION (
642
    CLONING_ID INTEGER NOT NULL,
643
    ANNOTATIONS_ID INTEGER NOT NULL,
644
    PRIMARY KEY (CLONING_ID, ANNOTATIONS_ID)
645
);
646

    
647
CREATE TABLE PUBLIC.CLONING_ANNOTATION_AUD (
648
    REV INTEGER NOT NULL,
649
    REVTYPE TINYINT,
650
    CLONING_ID INTEGER NOT NULL,
651
    ANNOTATIONS_ID INTEGER NOT NULL
652
);
653

    
654
CREATE TABLE PUBLIC.CLONING_MARKER (
655
    CLONING_ID INTEGER NOT NULL,
656
    MARKERS_ID INTEGER NOT NULL,
657
    PRIMARY KEY (CLONING_ID, MARKERS_ID)
658
);
659

    
660
CREATE TABLE PUBLIC.CLONING_MARKER_AUD (
661
    REV INTEGER NOT NULL,
662
    REVTYPE TINYINT,
663
    CLONING_ID INTEGER NOT NULL,
664
    MARKERS_ID INTEGER NOT NULL
665
);
666

    
667
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_TAXONNODE_AUD;
668
CREATE CACHED TABLE PUBLIC.COLLECTION(
669
    ID INTEGER NOT NULL,
670
    CREATED TIMESTAMP,
671
    UUID VARCHAR(36),
672
    UPDATED TIMESTAMP,
673
    LSID_AUTHORITY VARCHAR(255),
674
    LSID_LSID VARCHAR(255),
675
    LSID_NAMESPACE VARCHAR(255),
676
    LSID_OBJECT VARCHAR(255),
677
    LSID_REVISION VARCHAR(255),
678
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
679
    TITLECACHE VARCHAR(255),
680
    CODE VARCHAR(255),
681
    CODESTANDARD VARCHAR(255),
682
    NAME VARCHAR(255),
683
    TOWNORLOCATION VARCHAR(255),
684
    CREATEDBY_ID INTEGER,
685
    UPDATEDBY_ID INTEGER,
686
    INSTITUTE_ID INTEGER,
687
    SUPERCOLLECTION_ID INTEGER
688
);
689
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION;
690
CREATE INDEX PUBLIC.COLLECTIONTITLECACHEINDEX ON PUBLIC.COLLECTION(TITLECACHE);
691
CREATE CACHED TABLE PUBLIC.COLLECTION_AUD(
692
    ID INTEGER NOT NULL,
693
    REV INTEGER NOT NULL,
694
    REVTYPE TINYINT,
695
    CREATED TIMESTAMP,
696
    UUID VARCHAR(36),
697
    UPDATED TIMESTAMP,
698
    LSID_AUTHORITY VARCHAR(255),
699
    LSID_LSID VARCHAR(255),
700
    LSID_NAMESPACE VARCHAR(255),
701
    LSID_OBJECT VARCHAR(255),
702
    LSID_REVISION VARCHAR(255),
703
    PROTECTEDTITLECACHE BOOLEAN,
704
    TITLECACHE VARCHAR(255),
705
    CODE VARCHAR(255),
706
    CODESTANDARD VARCHAR(255),
707
    NAME VARCHAR(255),
708
    TOWNORLOCATION VARCHAR(255),
709
    CREATEDBY_ID INTEGER,
710
    UPDATEDBY_ID INTEGER,
711
    INSTITUTE_ID INTEGER,
712
    SUPERCOLLECTION_ID INTEGER
713
);
714
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_AUD;
715
CREATE CACHED TABLE PUBLIC.COLLECTION_ANNOTATION(
716
    COLLECTION_ID INTEGER NOT NULL,
717
    ANNOTATIONS_ID INTEGER NOT NULL
718
);
719
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ANNOTATION;
720
CREATE CACHED TABLE PUBLIC.COLLECTION_ANNOTATION_AUD(
721
    REV INTEGER NOT NULL,
722
    COLLECTION_ID INTEGER NOT NULL,
723
    ANNOTATIONS_ID INTEGER NOT NULL,
724
    REVTYPE TINYINT
725
);
726
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ANNOTATION_AUD;
727
CREATE CACHED TABLE PUBLIC.COLLECTION_CREDIT(
728
    COLLECTION_ID INTEGER NOT NULL,
729
    CREDITS_ID INTEGER NOT NULL,
730
    SORTINDEX INTEGER NOT NULL
731
);
732
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_CREDIT;
733
CREATE CACHED TABLE PUBLIC.COLLECTION_CREDIT_AUD(
734
    REV INTEGER NOT NULL,
735
    COLLECTION_ID INTEGER NOT NULL,
736
    CREDITS_ID INTEGER NOT NULL,
737
    SORTINDEX INTEGER NOT NULL,
738
    REVTYPE TINYINT
739
);
740
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_CREDIT_AUD;
741
CREATE CACHED TABLE PUBLIC.COLLECTION_EXTENSION(
742
    COLLECTION_ID INTEGER NOT NULL,
743
    EXTENSIONS_ID INTEGER NOT NULL
744
);
745
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_EXTENSION;
746
CREATE CACHED TABLE PUBLIC.COLLECTION_EXTENSION_AUD(
747
    REV INTEGER NOT NULL,
748
    COLLECTION_ID INTEGER NOT NULL,
749
    EXTENSIONS_ID INTEGER NOT NULL,
750
    REVTYPE TINYINT
751
);
752
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_EXTENSION_AUD;
753
CREATE CACHED TABLE PUBLIC.COLLECTION_MARKER(
754
    COLLECTION_ID INTEGER NOT NULL,
755
    MARKERS_ID INTEGER NOT NULL
756
);
757
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MARKER;
758
CREATE CACHED TABLE PUBLIC.COLLECTION_MARKER_AUD(
759
    REV INTEGER NOT NULL,
760
    COLLECTION_ID INTEGER NOT NULL,
761
    MARKERS_ID INTEGER NOT NULL,
762
    REVTYPE TINYINT
763
);
764
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MARKER_AUD;
765
CREATE CACHED TABLE PUBLIC.COLLECTION_MEDIA(
766
    COLLECTION_ID INTEGER NOT NULL,
767
    MEDIA_ID INTEGER NOT NULL
768
);
769
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MEDIA;
770
CREATE CACHED TABLE PUBLIC.COLLECTION_MEDIA_AUD(
771
    REV INTEGER NOT NULL,
772
    COLLECTION_ID INTEGER NOT NULL,
773
    MEDIA_ID INTEGER NOT NULL,
774
    REVTYPE TINYINT
775
);
776
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MEDIA_AUD;
777
CREATE CACHED TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE(
778
    COLLECTION_ID INTEGER NOT NULL,
779
    SOURCES_ID INTEGER NOT NULL
780
);
781
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ORIGINALSOURCEBASE;
782
CREATE CACHED TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD(
783
    REV INTEGER NOT NULL,
784
    COLLECTION_ID INTEGER NOT NULL,
785
    SOURCES_ID INTEGER NOT NULL,
786
    REVTYPE TINYINT
787
);
788
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD;
789
CREATE CACHED TABLE PUBLIC.COLLECTION_RIGHTS(
790
    COLLECTION_ID INTEGER NOT NULL,
791
    RIGHTS_ID INTEGER NOT NULL
792
);
793
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_RIGHTS;
794
CREATE CACHED TABLE PUBLIC.COLLECTION_RIGHTS_AUD(
795
    REV INTEGER NOT NULL,
796
    COLLECTION_ID INTEGER NOT NULL,
797
    RIGHTS_ID INTEGER NOT NULL,
798
    REVTYPE TINYINT
799
);
800
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_RIGHTS_AUD;
801
CREATE CACHED TABLE PUBLIC.CREDIT(
802
    ID INTEGER NOT NULL,
803
    CREATED TIMESTAMP,
804
    UUID VARCHAR(36),
805
    UPDATED TIMESTAMP,
806
    TEXT CLOB,
807
    ABBREVIATEDTEXT VARCHAR(255),
808
    CREATEDBY_ID INTEGER,
809
    UPDATEDBY_ID INTEGER,
810
    LANGUAGE_ID INTEGER,
811
    AGENT_ID INTEGER
812
);
813
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT;
814
CREATE CACHED TABLE PUBLIC.CREDIT_AUD(
815
    ID INTEGER NOT NULL,
816
    REV INTEGER NOT NULL,
817
    REVTYPE TINYINT,
818
    CREATED TIMESTAMP,
819
    UUID VARCHAR(36),
820
    UPDATED TIMESTAMP,
821
    TEXT CLOB,
822
    ABBREVIATEDTEXT VARCHAR(255),
823
    CREATEDBY_ID INTEGER,
824
    UPDATEDBY_ID INTEGER,
825
    LANGUAGE_ID INTEGER,
826
    AGENT_ID INTEGER
827
);
828
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_AUD;
829
CREATE CACHED TABLE PUBLIC.CREDIT_ANNOTATION(
830
    CREDIT_ID INTEGER NOT NULL,
831
    ANNOTATIONS_ID INTEGER NOT NULL
832
);
833
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_ANNOTATION;
834
CREATE CACHED TABLE PUBLIC.CREDIT_ANNOTATION_AUD(
835
    REV INTEGER NOT NULL,
836
    CREDIT_ID INTEGER NOT NULL,
837
    ANNOTATIONS_ID INTEGER NOT NULL,
838
    REVTYPE TINYINT
839
);
840
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_ANNOTATION_AUD;
841
CREATE CACHED TABLE PUBLIC.CREDIT_MARKER(
842
    CREDIT_ID INTEGER NOT NULL,
843
    MARKERS_ID INTEGER NOT NULL
844
);
845
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_MARKER;
846
CREATE CACHED TABLE PUBLIC.CREDIT_MARKER_AUD(
847
    REV INTEGER NOT NULL,
848
    CREDIT_ID INTEGER NOT NULL,
849
    MARKERS_ID INTEGER NOT NULL,
850
    REVTYPE TINYINT
851
);
852
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_MARKER_AUD;
853
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE(
854
    DTYPE VARCHAR(31) NOT NULL,
855
    ID INTEGER NOT NULL,
856
    CREATED TIMESTAMP,
857
    UUID VARCHAR(36),
858
    UPDATED TIMESTAMP,
859
    TERMTYPE VARCHAR(4),
860
    IDINVOCABULARY VARCHAR(255),
861
    LSID_AUTHORITY VARCHAR(255),
862
    LSID_LSID VARCHAR(255),
863
    LSID_NAMESPACE VARCHAR(255),
864
    LSID_OBJECT VARCHAR(255),
865
    LSID_REVISION VARCHAR(255),
866
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
867
    TITLECACHE VARCHAR(255),
868
    URI CLOB,
869
    ISO639_1 VARCHAR(2),
870
    RANKCLASS VARCHAR(4) NOT NULL,
871
    ISTECHNICAL BOOLEAN,
872
    ORDERINDEX INTEGER,
873
    SYMMETRICAL BOOLEAN,
874
    TRANSITIVE BOOLEAN,
875
    DEFAULTCOLOR VARCHAR(255),
876
    SUPPORTSCATEGORICALDATA BOOLEAN,
877
    SUPPORTSCOMMONTAXONNAME BOOLEAN,
878
    SUPPORTSDISTRIBUTION BOOLEAN,
879
    SUPPORTSINDIVIDUALASSOCIATION BOOLEAN,
880
    SUPPORTSQUANTITATIVEDATA BOOLEAN,
881
    SUPPORTSTAXONINTERACTION BOOLEAN,
882
    SUPPORTSTEXTDATA BOOLEAN,
883
    POINTAPPROXIMATION_ERRORRADIUS INTEGER,
884
    POINTAPPROXIMATION_LATITUDE DOUBLE,
885
    POINTAPPROXIMATION_LONGITUDE DOUBLE,
886
    VALIDPERIOD_END VARCHAR(255),
887
    VALIDPERIOD_FREETEXT VARCHAR(255),
888
    VALIDPERIOD_START VARCHAR(255),
889
    ISO3166_A2 VARCHAR(2),
890
    CREATEDBY_ID INTEGER,
891
    UPDATEDBY_ID INTEGER,
892
    KINDOF_ID INTEGER,
893
    PARTOF_ID INTEGER,
894
    VOCABULARY_ID INTEGER,
895
    LEVEL_ID INTEGER,
896
    POINTAPPROXIMATION_REFERENCESYSTEM_ID INTEGER,
897
    SHAPE_ID INTEGER,
898
    TYPE_ID INTEGER
899
);
900
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE;
901
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_AUD(
902
    DTYPE VARCHAR(31) NOT NULL,
903
    ID INTEGER NOT NULL,
904
    REV INTEGER NOT NULL,
905
    REVTYPE TINYINT,
906
    CREATED TIMESTAMP,
907
    UUID VARCHAR(36),
908
    UPDATED TIMESTAMP,
909
    TERMTYPE VARCHAR(4),
910
    IDINVOCABULARY VARCHAR(255),
911
    LSID_AUTHORITY VARCHAR(255),
912
    LSID_LSID VARCHAR(255),
913
    LSID_NAMESPACE VARCHAR(255),
914
    LSID_OBJECT VARCHAR(255),
915
    LSID_REVISION VARCHAR(255),
916
    PROTECTEDTITLECACHE BOOLEAN,
917
    TITLECACHE VARCHAR(255),
918
    URI CLOB,
919
    CREATEDBY_ID INTEGER,
920
    UPDATEDBY_ID INTEGER,
921
    KINDOF_ID INTEGER,
922
    PARTOF_ID INTEGER,
923
    VOCABULARY_ID INTEGER,
924
    ORDERINDEX INTEGER,
925
    ISO639_1 VARCHAR(2),
926
    RANKCLASS VARCHAR(4) NOT NULL,
927
    SUPPORTSCATEGORICALDATA BOOLEAN,
928
    SUPPORTSCOMMONTAXONNAME BOOLEAN,
929
    SUPPORTSDISTRIBUTION BOOLEAN,
930
    SUPPORTSINDIVIDUALASSOCIATION BOOLEAN,
931
    SUPPORTSQUANTITATIVEDATA BOOLEAN,
932
    SUPPORTSTAXONINTERACTION BOOLEAN,
933
    SUPPORTSTEXTDATA BOOLEAN,
934
    ISTECHNICAL BOOLEAN,
935
    DEFAULTCOLOR VARCHAR(255),
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
    LEVEL_ID INTEGER,
943
    POINTAPPROXIMATION_REFERENCESYSTEM_ID INTEGER,
944
    SHAPE_ID INTEGER,
945
    TYPE_ID INTEGER,
946
    ISO3166_A2 VARCHAR(2),
947
    SYMMETRICAL BOOLEAN,
948
    TRANSITIVE BOOLEAN
949
);
950
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_AUD;
951
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION(
952
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
953
    ANNOTATIONS_ID INTEGER NOT NULL
954
);
955
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION;
956
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD(
957
    REV INTEGER NOT NULL,
958
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
959
    ANNOTATIONS_ID INTEGER NOT NULL,
960
    REVTYPE TINYINT
961
);
962
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD;
963
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT(
964
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
965
    CONTINENTS_ID INTEGER NOT NULL
966
);
967
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT;
968
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD(
969
    REV INTEGER NOT NULL,
970
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
971
    CONTINENTS_ID INTEGER NOT NULL,
972
    REVTYPE TINYINT
973
);
974
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD;
975
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT(
976
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
977
    CREDITS_ID INTEGER NOT NULL,
978
    SORTINDEX INTEGER NOT NULL
979
);
980
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT;
981
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT_AUD(
982
    REV INTEGER NOT NULL,
983
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
984
    CREDITS_ID INTEGER NOT NULL,
985
    SORTINDEX INTEGER NOT NULL,
986
    REVTYPE TINYINT
987
);
988
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT_AUD;
989
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION(
990
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
991
    EXTENSIONS_ID INTEGER NOT NULL
992
);
993
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION;
994
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD(
995
    REV INTEGER NOT NULL,
996
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
997
    EXTENSIONS_ID INTEGER NOT NULL,
998
    REVTYPE TINYINT
999
);
1000
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD;
1001
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MARKER(
1002
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1003
    MARKERS_ID INTEGER NOT NULL
1004
);
1005
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MARKER;
1006
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MARKER_AUD(
1007
    REV INTEGER NOT NULL,
1008
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1009
    MARKERS_ID INTEGER NOT NULL,
1010
    REVTYPE TINYINT
1011
);
1012
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MARKER_AUD;
1013
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT(
1014
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1015
    RECOMMENDEDMEASUREMENTUNITS_ID INTEGER NOT NULL
1016
);
1017
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT;
1018
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD(
1019
    REV INTEGER NOT NULL,
1020
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1021
    RECOMMENDEDMEASUREMENTUNITS_ID INTEGER NOT NULL,
1022
    REVTYPE TINYINT
1023
);
1024
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD;
1025
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEDIA(
1026
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1027
    MEDIA_ID INTEGER NOT NULL
1028
);
1029
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEDIA;
1030
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEDIA_AUD(
1031
    REV INTEGER NOT NULL,
1032
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1033
    MEDIA_ID INTEGER NOT NULL,
1034
    REVTYPE TINYINT
1035
);
1036
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEDIA_AUD;
1037
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE(
1038
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1039
    SOURCES_ID INTEGER NOT NULL
1040
);
1041
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE;
1042
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD(
1043
    REV INTEGER NOT NULL,
1044
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1045
    SOURCES_ID INTEGER NOT NULL,
1046
    REVTYPE TINYINT
1047
);
1048
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD;
1049
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION(
1050
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1051
    RECOMMENDEDMODIFIERENUMERATION_ID INTEGER NOT NULL
1052
);
1053
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION;
1054
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD(
1055
    REV INTEGER NOT NULL,
1056
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1057
    RECOMMENDEDMODIFIERENUMERATION_ID INTEGER NOT NULL,
1058
    REVTYPE TINYINT
1059
);
1060
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD;
1061
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION(
1062
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1063
    REPRESENTATIONS_ID INTEGER NOT NULL
1064
);
1065
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_REPRESENTATION;
1066
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD(
1067
    REV INTEGER NOT NULL,
1068
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1069
    REPRESENTATIONS_ID INTEGER NOT NULL,
1070
    REVTYPE TINYINT
1071
);
1072
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD;
1073
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RIGHTS(
1074
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1075
    RIGHTS_ID INTEGER NOT NULL
1076
);
1077
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RIGHTS;
1078
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RIGHTS_AUD(
1079
    REV INTEGER NOT NULL,
1080
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1081
    RIGHTS_ID INTEGER NOT NULL,
1082
    REVTYPE TINYINT
1083
);
1084
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RIGHTS_AUD;
1085
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE(
1086
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1087
    RECOMMENDEDSTATISTICALMEASURES_ID INTEGER NOT NULL
1088
);
1089
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE;
1090
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD(
1091
    REV INTEGER NOT NULL,
1092
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1093
    RECOMMENDEDSTATISTICALMEASURES_ID INTEGER NOT NULL,
1094
    REVTYPE TINYINT
1095
);
1096
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD;
1097
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION(
1098
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1099
    SUPPORTEDCATEGORICALENUMERATIONS_ID INTEGER NOT NULL
1100
);
1101
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION;
1102
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD(
1103
    REV INTEGER NOT NULL,
1104
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1105
    SUPPORTEDCATEGORICALENUMERATIONS_ID INTEGER NOT NULL,
1106
    REVTYPE TINYINT
1107
);
1108
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD;
1109
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_WATERBODYORCOUNTRY(
1110
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1111
    WATERBODIESORCOUNTRIES_ID INTEGER NOT NULL
1112
);
1113
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_WATERBODYORCOUNTRY;
1114
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_WATERBODYORCOUNTRY_AUD(
1115
    REV INTEGER NOT NULL,
1116
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
1117
    WATERBODIESORCOUNTRIES_ID INTEGER NOT NULL,
1118
    REVTYPE TINYINT
1119
);
1120
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_WATERBODYORCOUNTRY_AUD;
1121
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT(
1122
    ID INTEGER NOT NULL,
1123
    CREATED TIMESTAMP,
1124
    UUID VARCHAR(36),
1125
    UPDATED TIMESTAMP,
1126
    DESCRIPTION VARCHAR(255),
1127
    TIMEPERIOD_END VARCHAR(255),
1128
    TIMEPERIOD_FREETEXT VARCHAR(255),
1129
    TIMEPERIOD_START VARCHAR(255),
1130
    CREATEDBY_ID INTEGER,
1131
    UPDATEDBY_ID INTEGER,
1132
    ACTOR_ID INTEGER,
1133
    TYPE_ID INTEGER
1134
);
1135
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT;
1136
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_AUD(
1137
    ID INTEGER NOT NULL,
1138
    REV INTEGER NOT NULL,
1139
    REVTYPE TINYINT,
1140
    CREATED TIMESTAMP,
1141
    UUID VARCHAR(36),
1142
    UPDATED TIMESTAMP,
1143
    DESCRIPTION VARCHAR(255),
1144
    TIMEPERIOD_END VARCHAR(255),
1145
    TIMEPERIOD_FREETEXT VARCHAR(255),
1146
    TIMEPERIOD_START VARCHAR(255),
1147
    CREATEDBY_ID INTEGER,
1148
    UPDATEDBY_ID INTEGER,
1149
    ACTOR_ID INTEGER,
1150
    TYPE_ID INTEGER
1151
);
1152
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_AUD;
1153
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION(
1154
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1155
    ANNOTATIONS_ID INTEGER NOT NULL
1156
);
1157
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_ANNOTATION;
1158
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD(
1159
    REV INTEGER NOT NULL,
1160
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1161
    ANNOTATIONS_ID INTEGER NOT NULL,
1162
    REVTYPE TINYINT
1163
);
1164
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD;
1165
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_MARKER(
1166
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1167
    MARKERS_ID INTEGER NOT NULL
1168
);
1169
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_MARKER;
1170
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_MARKER_AUD(
1171
    REV INTEGER NOT NULL,
1172
    DERIVATIONEVENT_ID INTEGER NOT NULL,
1173
    MARKERS_ID INTEGER NOT NULL,
1174
    REVTYPE TINYINT
1175
);
1176
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_MARKER_AUD;
1177
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE(
1178
    DTYPE VARCHAR(31) NOT NULL,
1179
    ID INTEGER NOT NULL,
1180
    CREATED TIMESTAMP,
1181
    UUID VARCHAR(36),
1182
    UPDATED TIMESTAMP,
1183
    LSID_AUTHORITY VARCHAR(255),
1184
    LSID_LSID VARCHAR(255),
1185
    LSID_NAMESPACE VARCHAR(255),
1186
    LSID_OBJECT VARCHAR(255),
1187
    LSID_REVISION VARCHAR(255),
1188
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
1189
    TITLECACHE VARCHAR(255),
1190
    IMAGEGALLERY BOOLEAN NOT NULL,
1191
    CREATEDBY_ID INTEGER,
1192
    UPDATEDBY_ID INTEGER,
1193
    SPECIMEN_ID INTEGER,
1194
    TAXON_ID INTEGER,
1195
    TAXONNAME_ID INTEGER
1196
);
1197
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE;
1198
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_AUD(
1199
    DTYPE VARCHAR(31) NOT NULL,
1200
    ID INTEGER NOT NULL,
1201
    REV INTEGER NOT NULL,
1202
    REVTYPE TINYINT,
1203
    CREATED TIMESTAMP,
1204
    UUID VARCHAR(36),
1205
    UPDATED TIMESTAMP,
1206
    LSID_AUTHORITY VARCHAR(255),
1207
    LSID_LSID VARCHAR(255),
1208
    LSID_NAMESPACE VARCHAR(255),
1209
    LSID_OBJECT VARCHAR(255),
1210
    LSID_REVISION VARCHAR(255),
1211
    PROTECTEDTITLECACHE BOOLEAN,
1212
    TITLECACHE VARCHAR(255),
1213
    IMAGEGALLERY BOOLEAN,
1214
    CREATEDBY_ID INTEGER,
1215
    UPDATEDBY_ID INTEGER,
1216
    SPECIMEN_ID INTEGER,
1217
    TAXON_ID INTEGER,
1218
    TAXONNAME_ID INTEGER
1219
);
1220
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_AUD;
1221
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION(
1222
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1223
    ANNOTATIONS_ID INTEGER NOT NULL
1224
);
1225
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION;
1226
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD(
1227
    REV INTEGER NOT NULL,
1228
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1229
    ANNOTATIONS_ID INTEGER NOT NULL,
1230
    REVTYPE TINYINT
1231
);
1232
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD;
1233
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT(
1234
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1235
    CREDITS_ID INTEGER NOT NULL,
1236
    SORTINDEX INTEGER NOT NULL
1237
);
1238
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT;
1239
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT_AUD(
1240
    REV INTEGER NOT NULL,
1241
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1242
    CREDITS_ID INTEGER NOT NULL,
1243
    SORTINDEX INTEGER NOT NULL,
1244
    REVTYPE TINYINT
1245
);
1246
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT_AUD;
1247
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION(
1248
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1249
    EXTENSIONS_ID INTEGER NOT NULL
1250
);
1251
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION;
1252
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD(
1253
    REV INTEGER NOT NULL,
1254
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1255
    EXTENSIONS_ID INTEGER NOT NULL,
1256
    REVTYPE TINYINT
1257
);
1258
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD;
1259
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE(
1260
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1261
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL
1262
);
1263
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE;
1264
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD(
1265
    REV INTEGER NOT NULL,
1266
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1267
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL,
1268
    REVTYPE TINYINT
1269
);
1270
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE_AUD;
1271
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE(
1272
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1273
    GEOSCOPES_ID INTEGER NOT NULL
1274
);
1275
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE;
1276
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD(
1277
    REV INTEGER NOT NULL,
1278
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1279
    GEOSCOPES_ID INTEGER NOT NULL,
1280
    REVTYPE TINYINT
1281
);
1282
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD;
1283
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER(
1284
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1285
    MARKERS_ID INTEGER NOT NULL
1286
);
1287
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER;
1288
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD(
1289
    REV INTEGER NOT NULL,
1290
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1291
    MARKERS_ID INTEGER NOT NULL,
1292
    REVTYPE TINYINT
1293
);
1294
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER_AUD;
1295
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE(
1296
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1297
    SOURCES_ID INTEGER NOT NULL
1298
);
1299
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE;
1300
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD(
1301
    REV INTEGER NOT NULL,
1302
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1303
    SOURCES_ID INTEGER NOT NULL,
1304
    REVTYPE TINYINT
1305
);
1306
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD;
1307
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE(
1308
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1309
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL
1310
);
1311
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE;
1312
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD(
1313
    REV INTEGER NOT NULL,
1314
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1315
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL,
1316
    REVTYPE TINYINT
1317
);
1318
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD;
1319
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTS(
1320
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1321
    RIGHTS_ID INTEGER NOT NULL
1322
);
1323
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTS;
1324
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTS_AUD(
1325
    REV INTEGER NOT NULL,
1326
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1327
    RIGHTS_ID INTEGER NOT NULL,
1328
    REVTYPE TINYINT
1329
);
1330
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTS_AUD;
1331
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE(
1332
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1333
    SCOPES_ID INTEGER NOT NULL
1334
);
1335
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE;
1336
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD(
1337
    REV INTEGER NOT NULL,
1338
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1339
    SCOPES_ID INTEGER NOT NULL,
1340
    REVTYPE TINYINT
1341
);
1342
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE_AUD;
1343
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE(
1344
    DTYPE VARCHAR(31) NOT NULL,
1345
    ID INTEGER NOT NULL,
1346
    CREATED TIMESTAMP,
1347
    UUID VARCHAR(36),
1348
    UPDATED TIMESTAMP,
1349
    NAME VARCHAR(255),
1350
    TIMEPERIOD_START VARCHAR(255),
1351
    TIMEPERIOD_END VARCHAR(255),
1352
    TIMEPERIOD_FREETEXT VARCHAR(255),
1353
    ORDERRELEVANT BOOLEAN,
1354
    CREATEDBY_ID INTEGER,
1355
    UPDATEDBY_ID INTEGER,
1356
    FEATURE_ID INTEGER,
1357
    INDESCRIPTION_ID INTEGER,
1358
    AREA_ID INTEGER,
1359
    LANGUAGE_ID INTEGER,
1360
    STATUS_ID INTEGER,
1361
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1362
    UNIT_ID INTEGER,
1363
    TAXON2_ID INTEGER,
1364
    FORMAT_ID INTEGER
1365
);
1366
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE;
1367
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD(
1368
    DTYPE VARCHAR(31) NOT NULL,
1369
    ID INTEGER NOT NULL,
1370
    REV INTEGER NOT NULL,
1371
    REVTYPE TINYINT,
1372
    CREATED TIMESTAMP,
1373
    UUID VARCHAR(36),
1374
    UPDATED TIMESTAMP,
1375
    NAME VARCHAR(255),
1376
    TIMEPERIOD_START VARCHAR(255),
1377
    TIMEPERIOD_END VARCHAR(255),
1378
    TIMEPERIOD_FREETEXT VARCHAR(255),
1379
    ORDERRELEVANT BOOLEAN,
1380
    CREATEDBY_ID INTEGER,
1381
    UPDATEDBY_ID INTEGER,
1382
    FEATURE_ID INTEGER,
1383
    INDESCRIPTION_ID INTEGER,
1384
    AREA_ID INTEGER,
1385
    STATUS_ID INTEGER,
1386
    TAXON2_ID INTEGER,
1387
    UNIT_ID INTEGER,
1388
    FORMAT_ID INTEGER,
1389
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1390
    LANGUAGE_ID INTEGER
1391
);
1392
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_AUD;
1393
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION(
1394
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1395
    ANNOTATIONS_ID INTEGER NOT NULL
1396
);
1397
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION;
1398
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD(
1399
    REV INTEGER NOT NULL,
1400
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1401
    ANNOTATIONS_ID INTEGER NOT NULL,
1402
    REVTYPE TINYINT
1403
);
1404
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD;
1405
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING(
1406
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1407
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1408
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL
1409
);
1410
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING;
1411
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD(
1412
    REV INTEGER NOT NULL,
1413
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1414
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1415
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL,
1416
    REVTYPE TINYINT
1417
);
1418
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD;
1419
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER(
1420
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1421
    MARKERS_ID INTEGER NOT NULL
1422
);
1423
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER;
1424
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD(
1425
    REV INTEGER NOT NULL,
1426
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1427
    MARKERS_ID INTEGER NOT NULL,
1428
    REVTYPE TINYINT
1429
);
1430
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD;
1431
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA(
1432
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1433
    MEDIA_ID INTEGER NOT NULL,
1434
    SORTINDEX INTEGER NOT NULL
1435
);
1436
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA;
1437
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD(
1438
    REV INTEGER NOT NULL,
1439
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1440
    MEDIA_ID INTEGER NOT NULL,
1441
    SORTINDEX INTEGER NOT NULL,
1442
    REVTYPE TINYINT
1443
);
1444
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD;
1445
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER(
1446
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1447
    MODIFIERS_ID INTEGER NOT NULL
1448
);
1449
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER;
1450
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD(
1451
    REV INTEGER NOT NULL,
1452
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1453
    MODIFIERS_ID INTEGER NOT NULL,
1454
    REVTYPE TINYINT
1455
);
1456
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD;
1457
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT(
1458
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1459
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1460
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
1461
);
1462
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT;
1463
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD(
1464
    REV INTEGER NOT NULL,
1465
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1466
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1467
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
1468
    REVTYPE TINYINT
1469
);
1470
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD;
1471
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE(
1472
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1473
    SOURCES_ID INTEGER NOT NULL
1474
);
1475
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE;
1476
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD(
1477
    REV INTEGER NOT NULL,
1478
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1479
    SOURCES_ID INTEGER NOT NULL,
1480
    REVTYPE TINYINT
1481
);
1482
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD;
1483
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA(
1484
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1485
    STATEDATA_ID INTEGER NOT NULL
1486
);
1487
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA;
1488
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA_AUD(
1489
    REV INTEGER NOT NULL,
1490
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1491
    STATEDATA_ID INTEGER NOT NULL,
1492
    REVTYPE TINYINT
1493
);
1494
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA_AUD;
1495
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE(
1496
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1497
    STATISTICALVALUES_ID INTEGER NOT NULL
1498
);
1499
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE;
1500
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE_AUD(
1501
    REV INTEGER NOT NULL,
1502
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1503
    STATISTICALVALUES_ID INTEGER NOT NULL,
1504
    REVTYPE TINYINT
1505
);
1506
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE_AUD;
1507
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT(
1508
    ID INTEGER NOT NULL,
1509
    CREATED TIMESTAMP,
1510
    UUID VARCHAR(36),
1511
    UPDATED TIMESTAMP,
1512
    DESCRIPTION VARCHAR(255),
1513
    TIMEPERIOD_END VARCHAR(255),
1514
    TIMEPERIOD_FREETEXT VARCHAR(255),
1515
    TIMEPERIOD_START VARCHAR(255),
1516
    PREFERREDFLAG BOOLEAN NOT NULL,
1517
    CREATEDBY_ID INTEGER,
1518
    UPDATEDBY_ID INTEGER,
1519
    ACTOR_ID INTEGER,
1520
    IDENTIFIEDUNIT_ID INTEGER,
1521
    MODIFIER_ID INTEGER,
1522
    TAXON_ID INTEGER
1523
);
1524
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT;
1525
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_AUD(
1526
    ID INTEGER NOT NULL,
1527
    REV INTEGER NOT NULL,
1528
    REVTYPE TINYINT,
1529
    CREATED TIMESTAMP,
1530
    UUID VARCHAR(36),
1531
    UPDATED TIMESTAMP,
1532
    DESCRIPTION VARCHAR(255),
1533
    TIMEPERIOD_END VARCHAR(255),
1534
    TIMEPERIOD_FREETEXT VARCHAR(255),
1535
    TIMEPERIOD_START VARCHAR(255),
1536
    PREFERREDFLAG BOOLEAN,
1537
    CREATEDBY_ID INTEGER,
1538
    UPDATEDBY_ID INTEGER,
1539
    ACTOR_ID INTEGER,
1540
    IDENTIFIEDUNIT_ID INTEGER,
1541
    MODIFIER_ID INTEGER,
1542
    TAXON_ID INTEGER
1543
);
1544
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_AUD;
1545
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION(
1546
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1547
    ANNOTATIONS_ID INTEGER NOT NULL
1548
);
1549
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION;
1550
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD(
1551
    REV INTEGER NOT NULL,
1552
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1553
    ANNOTATIONS_ID INTEGER NOT NULL,
1554
    REVTYPE TINYINT
1555
);
1556
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD;
1557
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER(
1558
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1559
    MARKERS_ID INTEGER NOT NULL
1560
);
1561
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER;
1562
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD(
1563
    REV INTEGER NOT NULL,
1564
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1565
    MARKERS_ID INTEGER NOT NULL,
1566
    REVTYPE TINYINT
1567
);
1568
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER_AUD;
1569
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE(
1570
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1571
    SETOFREFERENCES_ID INTEGER NOT NULL
1572
);
1573
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE;
1574
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD(
1575
    REV INTEGER NOT NULL,
1576
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1577
    SETOFREFERENCES_ID INTEGER NOT NULL,
1578
    REVTYPE TINYINT
1579
);
1580
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD;
1581
CREATE CACHED TABLE PUBLIC.EXTENSION(
1582
    ID INTEGER NOT NULL,
1583
    CREATED TIMESTAMP,
1584
    UUID VARCHAR(36),
1585
    UPDATED TIMESTAMP,
1586
    EXTENDEDOBJ_TYPE VARCHAR(255),
1587
    EXTENDEDOBJ_ID INTEGER NOT NULL,
1588
    VALUE CLOB,
1589
    CREATEDBY_ID INTEGER,
1590
    UPDATEDBY_ID INTEGER,
1591
    TYPE_ID INTEGER
1592
);
1593
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION;
1594
CREATE CACHED TABLE PUBLIC.EXTENSION_AUD(
1595
    ID INTEGER NOT NULL,
1596
    REV INTEGER NOT NULL,
1597
    REVTYPE TINYINT,
1598
    CREATED TIMESTAMP,
1599
    UUID VARCHAR(36),
1600
    UPDATED TIMESTAMP,
1601
    VALUE CLOB,
1602
    CREATEDBY_ID INTEGER,
1603
    UPDATEDBY_ID INTEGER,
1604
    TYPE_ID INTEGER
1605
);
1606
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION_AUD;
1607
CREATE CACHED TABLE PUBLIC.FEATURENODE(
1608
    ID INTEGER NOT NULL,
1609
    CREATED TIMESTAMP,
1610
    UUID VARCHAR(36),
1611
    UPDATED TIMESTAMP,
1612
    SORTINDEX INTEGER,
1613
    TREEINDEX VARCHAR(255),
1614
    CREATEDBY_ID INTEGER,
1615
    UPDATEDBY_ID INTEGER,
1616
    FEATURE_ID INTEGER,
1617
    FEATURETREE_ID INTEGER,
1618
    PARENT_ID INTEGER
1619
);
1620
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE;
1621
CREATE CACHED TABLE PUBLIC.FEATURENODE_AUD(
1622
    ID INTEGER NOT NULL,
1623
    REV INTEGER NOT NULL,
1624
    REVTYPE TINYINT,
1625
    CREATED TIMESTAMP,
1626
    UUID VARCHAR(36),
1627
    UPDATED TIMESTAMP,
1628
    SORTINDEX INTEGER,
1629
    TREEINDEX VARCHAR(255),
1630
    CREATEDBY_ID INTEGER,
1631
    UPDATEDBY_ID INTEGER,
1632
    FEATURE_ID INTEGER,
1633
    FEATURETREE_ID INTEGER,
1634
    PARENT_ID INTEGER
1635
);
1636
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_AUD;
1637
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF(
1638
    FEATURENODE_ID INTEGER NOT NULL,
1639
    INAPPLICABLEIF_ID INTEGER NOT NULL
1640
);
1641
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF;
1642
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD(
1643
    REV INTEGER NOT NULL,
1644
    FEATURENODE_ID INTEGER NOT NULL,
1645
    INAPPLICABLEIF_ID INTEGER NOT NULL,
1646
    REVTYPE TINYINT
1647
);
1648
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD;
1649
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE(
1650
    FEATURENODE_ID INTEGER NOT NULL,
1651
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL
1652
);
1653
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE;
1654
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD(
1655
    REV INTEGER NOT NULL,
1656
    FEATURENODE_ID INTEGER NOT NULL,
1657
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL,
1658
    REVTYPE TINYINT
1659
);
1660
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD;
1661
CREATE CACHED TABLE PUBLIC.FEATURETREE(
1662
    ID INTEGER NOT NULL,
1663
    CREATED TIMESTAMP,
1664
    UUID VARCHAR(36),
1665
    UPDATED TIMESTAMP,
1666
    LSID_AUTHORITY VARCHAR(255),
1667
    LSID_LSID VARCHAR(255),
1668
    LSID_NAMESPACE VARCHAR(255),
1669
    LSID_OBJECT VARCHAR(255),
1670
    LSID_REVISION VARCHAR(255),
1671
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
1672
    TITLECACHE VARCHAR(255),
1673
    URI CLOB,
1674
    DESCRIPTIONSEPARATED BOOLEAN NOT NULL,
1675
    CREATEDBY_ID INTEGER,
1676
    UPDATEDBY_ID INTEGER,
1677
    ROOT_ID INTEGER
1678
);
1679
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE;
1680
CREATE CACHED TABLE PUBLIC.FEATURETREE_AUD(
1681
    ID INTEGER NOT NULL,
1682
    REV INTEGER NOT NULL,
1683
    REVTYPE TINYINT,
1684
    CREATED TIMESTAMP,
1685
    UUID VARCHAR(36),
1686
    UPDATED TIMESTAMP,
1687
    LSID_AUTHORITY VARCHAR(255),
1688
    LSID_LSID VARCHAR(255),
1689
    LSID_NAMESPACE VARCHAR(255),
1690
    LSID_OBJECT VARCHAR(255),
1691
    LSID_REVISION VARCHAR(255),
1692
    PROTECTEDTITLECACHE BOOLEAN,
1693
    TITLECACHE VARCHAR(255),
1694
    URI CLOB,
1695
    DESCRIPTIONSEPARATED BOOLEAN,
1696
    CREATEDBY_ID INTEGER,
1697
    UPDATEDBY_ID INTEGER,
1698
    ROOT_ID INTEGER
1699
);
1700
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_AUD;
1701
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION(
1702
    FEATURETREE_ID INTEGER NOT NULL,
1703
    ANNOTATIONS_ID INTEGER NOT NULL
1704
);
1705
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION;
1706
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD(
1707
    REV INTEGER NOT NULL,
1708
    FEATURETREE_ID INTEGER NOT NULL,
1709
    ANNOTATIONS_ID INTEGER NOT NULL,
1710
    REVTYPE TINYINT
1711
);
1712
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION_AUD;
1713
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT(
1714
    FEATURETREE_ID INTEGER NOT NULL,
1715
    CREDITS_ID INTEGER NOT NULL,
1716
    SORTINDEX INTEGER NOT NULL
1717
);
1718
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT;
1719
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT_AUD(
1720
    REV INTEGER NOT NULL,
1721
    FEATURETREE_ID INTEGER NOT NULL,
1722
    CREDITS_ID INTEGER NOT NULL,
1723
    SORTINDEX INTEGER NOT NULL,
1724
    REVTYPE TINYINT
1725
);
1726
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT_AUD;
1727
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION(
1728
    FEATURETREE_ID INTEGER NOT NULL,
1729
    EXTENSIONS_ID INTEGER NOT NULL
1730
);
1731
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION;
1732
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION_AUD(
1733
    REV INTEGER NOT NULL,
1734
    FEATURETREE_ID INTEGER NOT NULL,
1735
    EXTENSIONS_ID INTEGER NOT NULL,
1736
    REVTYPE TINYINT
1737
);
1738
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION_AUD;
1739
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER(
1740
    FEATURETREE_ID INTEGER NOT NULL,
1741
    MARKERS_ID INTEGER NOT NULL
1742
);
1743
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER;
1744
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER_AUD(
1745
    REV INTEGER NOT NULL,
1746
    FEATURETREE_ID INTEGER NOT NULL,
1747
    MARKERS_ID INTEGER NOT NULL,
1748
    REVTYPE TINYINT
1749
);
1750
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER_AUD;
1751
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE(
1752
    FEATURETREE_ID INTEGER NOT NULL,
1753
    SOURCES_ID INTEGER NOT NULL
1754
);
1755
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE;
1756
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD(
1757
    REV INTEGER NOT NULL,
1758
    FEATURETREE_ID INTEGER NOT NULL,
1759
    SOURCES_ID INTEGER NOT NULL,
1760
    REVTYPE TINYINT
1761
);
1762
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD;
1763
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION(
1764
    FEATURETREE_ID INTEGER NOT NULL,
1765
    REPRESENTATIONS_ID INTEGER NOT NULL
1766
);
1767
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION;
1768
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD(
1769
    REV INTEGER NOT NULL,
1770
    FEATURETREE_ID INTEGER NOT NULL,
1771
    REPRESENTATIONS_ID INTEGER NOT NULL,
1772
    REVTYPE TINYINT
1773
);
1774
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION_AUD;
1775
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTS(
1776
    FEATURETREE_ID INTEGER NOT NULL,
1777
    RIGHTS_ID INTEGER NOT NULL
1778
);
1779
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTS;
1780
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTS_AUD(
1781
    REV INTEGER NOT NULL,
1782
    FEATURETREE_ID INTEGER NOT NULL,
1783
    RIGHTS_ID INTEGER NOT NULL,
1784
    REVTYPE TINYINT
1785
);
1786
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTS_AUD;
1787
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT(
1788
    ID INTEGER NOT NULL,
1789
    CREATED TIMESTAMP,
1790
    UUID VARCHAR(36),
1791
    UPDATED TIMESTAMP,
1792
    DESCRIPTION VARCHAR(255),
1793
    TIMEPERIOD_END VARCHAR(255),
1794
    TIMEPERIOD_FREETEXT VARCHAR(255),
1795
    TIMEPERIOD_START VARCHAR(255),
1796
    ABSOLUTEELEVATION INTEGER,
1797
    ABSOLUTEELEVATIONMAX INTEGER,
1798
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
1799
    COLLECTINGMETHOD VARCHAR(255),
1800
    DISTANCETOGROUND DOUBLE,
1801
    DISTANCETOGROUNDMAX DOUBLE,
1802
    DISTANCETOGROUNDTEXT VARCHAR(30),
1803
    DISTANCETOWATERSURFACE DOUBLE,
1804
    DISTANCETOWATERSURFACEMAX DOUBLE,
1805
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
1806
    EXACTLOCATION_ERRORRADIUS INTEGER,
1807
    EXACTLOCATION_LATITUDE DOUBLE,
1808
    EXACTLOCATION_LONGITUDE DOUBLE,
1809
    CREATEDBY_ID INTEGER,
1810
    UPDATEDBY_ID INTEGER,
1811
    ACTOR_ID INTEGER,
1812
    COUNTRY_ID INTEGER,
1813
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
1814
    LOCALITY_ID INTEGER
1815
);
1816
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT;
1817
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_AUD(
1818
    ID INTEGER NOT NULL,
1819
    REV INTEGER NOT NULL,
1820
    REVTYPE TINYINT,
1821
    CREATED TIMESTAMP,
1822
    UUID VARCHAR(36),
1823
    UPDATED TIMESTAMP,
1824
    DESCRIPTION VARCHAR(255),
1825
    TIMEPERIOD_END VARCHAR(255),
1826
    TIMEPERIOD_FREETEXT VARCHAR(255),
1827
    TIMEPERIOD_START VARCHAR(255),
1828
    ABSOLUTEELEVATION INTEGER,
1829
    ABSOLUTEELEVATIONMAX INTEGER,
1830
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
1831
    COLLECTINGMETHOD VARCHAR(255),
1832
    DISTANCETOGROUND DOUBLE,
1833
    DISTANCETOGROUNDMAX DOUBLE,
1834
    DISTANCETOGROUNDTEXT VARCHAR(30),
1835
    DISTANCETOWATERSURFACE DOUBLE,
1836
    DISTANCETOWATERSURFACEMAX DOUBLE,
1837
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
1838
    EXACTLOCATION_ERRORRADIUS INTEGER,
1839
    EXACTLOCATION_LATITUDE DOUBLE,
1840
    EXACTLOCATION_LONGITUDE DOUBLE,
1841
    CREATEDBY_ID INTEGER,
1842
    UPDATEDBY_ID INTEGER,
1843
    ACTOR_ID INTEGER,
1844
    COUNTRY_ID INTEGER,
1845
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
1846
    LOCALITY_ID INTEGER
1847
);
1848
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_AUD;
1849
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION(
1850
    GATHERINGEVENT_ID INTEGER NOT NULL,
1851
    ANNOTATIONS_ID INTEGER NOT NULL
1852
);
1853
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION;
1854
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD(
1855
    REV INTEGER NOT NULL,
1856
    GATHERINGEVENT_ID INTEGER NOT NULL,
1857
    ANNOTATIONS_ID INTEGER NOT NULL,
1858
    REVTYPE TINYINT
1859
);
1860
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION_AUD;
1861
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE(
1862
    GATHERINGEVENT_ID INTEGER NOT NULL,
1863
    COLLECTINGAREAS_ID INTEGER NOT NULL
1864
);
1865
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE;
1866
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD(
1867
    REV INTEGER NOT NULL,
1868
    GATHERINGEVENT_ID INTEGER NOT NULL,
1869
    COLLECTINGAREAS_ID INTEGER NOT NULL,
1870
    REVTYPE TINYINT
1871
);
1872
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD;
1873
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER(
1874
    GATHERINGEVENT_ID INTEGER NOT NULL,
1875
    MARKERS_ID INTEGER NOT NULL
1876
);
1877
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER;
1878
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD(
1879
    REV INTEGER NOT NULL,
1880
    GATHERINGEVENT_ID INTEGER NOT NULL,
1881
    MARKERS_ID INTEGER NOT NULL,
1882
    REVTYPE TINYINT
1883
);
1884
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER_AUD;
1885
CREATE CACHED TABLE PUBLIC.GRANTEDAUTHORITYIMPL(
1886
    ID INTEGER NOT NULL,
1887
    CREATED TIMESTAMP,
1888
    UUID VARCHAR(36),
1889
    AUTHORITY VARCHAR(255),
1890
    CREATEDBY_ID INTEGER
1891
);
1892
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GRANTEDAUTHORITYIMPL;
1893
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP(
1894
    ID INTEGER NOT NULL,
1895
    CREATED TIMESTAMP,
1896
    UUID VARCHAR(36),
1897
    UPDATED TIMESTAMP,
1898
    CREATEDBY_ID INTEGER,
1899
    UPDATEDBY_ID INTEGER
1900
);
1901
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP;
1902
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_AUD(
1903
    ID INTEGER NOT NULL,
1904
    REV INTEGER NOT NULL,
1905
    REVTYPE TINYINT,
1906
    CREATED TIMESTAMP,
1907
    UUID VARCHAR(36),
1908
    UPDATED TIMESTAMP,
1909
    CREATEDBY_ID INTEGER,
1910
    UPDATEDBY_ID INTEGER
1911
);
1912
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_AUD;
1913
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION(
1914
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1915
    ANNOTATIONS_ID INTEGER NOT NULL
1916
);
1917
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION;
1918
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD(
1919
    REV INTEGER NOT NULL,
1920
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1921
    ANNOTATIONS_ID INTEGER NOT NULL,
1922
    REVTYPE TINYINT
1923
);
1924
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD;
1925
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER(
1926
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1927
    MARKERS_ID INTEGER NOT NULL
1928
);
1929
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER;
1930
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD(
1931
    REV INTEGER NOT NULL,
1932
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1933
    MARKERS_ID INTEGER NOT NULL,
1934
    REVTYPE TINYINT
1935
);
1936
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER_AUD;
1937
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP(
1938
    ID INTEGER NOT NULL,
1939
    CREATED TIMESTAMP,
1940
    UUID VARCHAR(36),
1941
    UPDATED TIMESTAMP,
1942
    CITATIONMICROREFERENCE VARCHAR(255),
1943
    ORIGINALNAMESTRING VARCHAR(255),
1944
    DOUBTFUL BOOLEAN NOT NULL,
1945
    RULECONSIDERED VARCHAR(255),
1946
    CREATEDBY_ID INTEGER,
1947
    UPDATEDBY_ID INTEGER,
1948
    CITATION_ID INTEGER,
1949
    RELATEDFROM_ID INTEGER,
1950
    RELATEDTO_ID INTEGER,
1951
    TYPE_ID INTEGER
1952
);
1953
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP;
1954
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD(
1955
    ID INTEGER NOT NULL,
1956
    REV INTEGER NOT NULL,
1957
    REVTYPE TINYINT,
1958
    CREATED TIMESTAMP,
1959
    UUID VARCHAR(36),
1960
    UPDATED TIMESTAMP,
1961
    CITATIONMICROREFERENCE VARCHAR(255),
1962
    ORIGINALNAMESTRING VARCHAR(255),
1963
    DOUBTFUL BOOLEAN,
1964
    RULECONSIDERED VARCHAR(255),
1965
    CREATEDBY_ID INTEGER,
1966
    UPDATEDBY_ID INTEGER,
1967
    CITATION_ID INTEGER,
1968
    RELATEDFROM_ID INTEGER,
1969
    RELATEDTO_ID INTEGER,
1970
    TYPE_ID INTEGER
1971
);
1972
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_AUD;
1973
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION(
1974
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1975
    ANNOTATIONS_ID INTEGER NOT NULL
1976
);
1977
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION;
1978
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD(
1979
    REV INTEGER NOT NULL,
1980
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1981
    ANNOTATIONS_ID INTEGER NOT NULL,
1982
    REVTYPE TINYINT
1983
);
1984
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD;
1985
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER(
1986
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1987
    MARKERS_ID INTEGER NOT NULL
1988
);
1989
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER;
1990
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD(
1991
    REV INTEGER NOT NULL,
1992
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1993
    MARKERS_ID INTEGER NOT NULL,
1994
    REVTYPE TINYINT
1995
);
1996
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD;
1997
CREATE CACHED TABLE PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING(
1998
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1999
    DESCRIPTION_ID INTEGER NOT NULL,
2000
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2001
);
2002
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING;
2003
CREATE CACHED TABLE PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING_AUD(
2004
    REV INTEGER NOT NULL,
2005
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
2006
    DESCRIPTION_ID INTEGER NOT NULL,
2007
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2008
    REVTYPE TINYINT
2009
);
2010
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING_AUD;
2011
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP(
2012
    ID INTEGER NOT NULL,
2013
    CREATED TIMESTAMP,
2014
    UUID VARCHAR(36),
2015
    UPDATED TIMESTAMP,
2016
    DEPARTMENT VARCHAR(255),
2017
    PERIOD_END VARCHAR(255),
2018
    PERIOD_FREETEXT VARCHAR(255),
2019
    PERIOD_START VARCHAR(255),
2020
    ROLE VARCHAR(255),
2021
    CREATEDBY_ID INTEGER,
2022
    UPDATEDBY_ID INTEGER,
2023
    INSTITUTE_ID INTEGER,
2024
    PERSON_ID INTEGER
2025
);
2026
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP;
2027
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD(
2028
    ID INTEGER NOT NULL,
2029
    REV INTEGER NOT NULL,
2030
    REVTYPE TINYINT,
2031
    CREATED TIMESTAMP,
2032
    UUID VARCHAR(36),
2033
    UPDATED TIMESTAMP,
2034
    DEPARTMENT VARCHAR(255),
2035
    PERIOD_END VARCHAR(255),
2036
    PERIOD_FREETEXT VARCHAR(255),
2037
    PERIOD_START VARCHAR(255),
2038
    ROLE VARCHAR(255),
2039
    CREATEDBY_ID INTEGER,
2040
    UPDATEDBY_ID INTEGER,
2041
    INSTITUTE_ID INTEGER,
2042
    PERSON_ID INTEGER
2043
);
2044
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP_AUD;
2045
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT(
2046
    ID INTEGER NOT NULL,
2047
    CREATED TIMESTAMP,
2048
    UUID VARCHAR(36),
2049
    UPDATED TIMESTAMP,
2050
    CREATEDBY_ID INTEGER,
2051
    UPDATEDBY_ID INTEGER
2052
);
2053
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT;
2054
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_AUD(
2055
    ID INTEGER NOT NULL,
2056
    REV INTEGER NOT NULL,
2057
    REVTYPE TINYINT,
2058
    CREATED TIMESTAMP,
2059
    UUID VARCHAR(36),
2060
    UPDATED TIMESTAMP,
2061
    CREATEDBY_ID INTEGER,
2062
    UPDATEDBY_ID INTEGER
2063
);
2064
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_AUD;
2065
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING(
2066
    KEYSTATEMENT_ID INTEGER NOT NULL,
2067
    LABEL_ID INTEGER NOT NULL,
2068
    LABEL_MAPKEY_ID INTEGER NOT NULL
2069
);
2070
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING;
2071
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD(
2072
    REV INTEGER NOT NULL,
2073
    KEYSTATEMENT_ID INTEGER NOT NULL,
2074
    LABEL_ID INTEGER NOT NULL,
2075
    LABEL_MAPKEY_ID INTEGER NOT NULL,
2076
    REVTYPE TINYINT
2077
);
2078
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD;
2079
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY(
2080
    ID INTEGER NOT NULL,
2081
    CREATED TIMESTAMP,
2082
    UUID VARCHAR(36),
2083
    AUTHORITY VARCHAR(255),
2084
    AUTHORITYWSDL CLOB,
2085
    PORT INTEGER NOT NULL,
2086
    SERVER VARCHAR(255),
2087
    URL VARCHAR(255),
2088
    CREATEDBY_ID INTEGER
2089
);
2090
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY;
2091
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES(
2092
    LSIDAUTHORITY_ID INTEGER NOT NULL,
2093
    NAMESPACES_ELEMENT VARCHAR(255),
2094
    NAMESPACES_MAPKEY VARCHAR(255) NOT NULL
2095
);
2096
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY_NAMESPACES;
2097
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING(
2098
    ID INTEGER NOT NULL,
2099
    CREATED TIMESTAMP,
2100
    UUID VARCHAR(36),
2101
    UPDATED TIMESTAMP,
2102
    TEXT CLOB,
2103
    CREATEDBY_ID INTEGER,
2104
    UPDATEDBY_ID INTEGER,
2105
    LANGUAGE_ID INTEGER
2106
);
2107
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING;
2108
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_AUD(
2109
    ID INTEGER NOT NULL,
2110
    REV INTEGER NOT NULL,
2111
    REVTYPE TINYINT,
2112
    CREATED TIMESTAMP,
2113
    UUID VARCHAR(36),
2114
    UPDATED TIMESTAMP,
2115
    TEXT CLOB,
2116
    CREATEDBY_ID INTEGER,
2117
    UPDATEDBY_ID INTEGER,
2118
    LANGUAGE_ID INTEGER
2119
);
2120
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_AUD;
2121
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION(
2122
    LANGUAGESTRING_ID INTEGER NOT NULL,
2123
    ANNOTATIONS_ID INTEGER NOT NULL
2124
);
2125
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION;
2126
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD(
2127
    REV INTEGER NOT NULL,
2128
    LANGUAGESTRING_ID INTEGER NOT NULL,
2129
    ANNOTATIONS_ID INTEGER NOT NULL,
2130
    REVTYPE TINYINT
2131
);
2132
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION_AUD;
2133
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER(
2134
    LANGUAGESTRING_ID INTEGER NOT NULL,
2135
    MARKERS_ID INTEGER NOT NULL
2136
);
2137
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER;
2138
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD(
2139
    REV INTEGER NOT NULL,
2140
    LANGUAGESTRING_ID INTEGER NOT NULL,
2141
    MARKERS_ID INTEGER NOT NULL,
2142
    REVTYPE TINYINT
2143
);
2144
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER_AUD;
2145
CREATE CACHED TABLE PUBLIC.LOCUS(
2146
    ID INTEGER NOT NULL,
2147
    CREATED TIMESTAMP,
2148
    UUID VARCHAR(36),
2149
    UPDATED TIMESTAMP,
2150
    DESCRIPTION VARCHAR(255),
2151
    NAME VARCHAR(255),
2152
    CREATEDBY_ID INTEGER,
2153
    UPDATEDBY_ID INTEGER
2154
);
2155
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS;
2156
CREATE CACHED TABLE PUBLIC.LOCUS_AUD(
2157
    ID INTEGER NOT NULL,
2158
    REV INTEGER NOT NULL,
2159
    REVTYPE TINYINT,
2160
    CREATED TIMESTAMP,
2161
    UUID VARCHAR(36),
2162
    UPDATED TIMESTAMP,
2163
    DESCRIPTION VARCHAR(255),
2164
    NAME VARCHAR(255),
2165
    CREATEDBY_ID INTEGER,
2166
    UPDATEDBY_ID INTEGER
2167
);
2168
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS_AUD;
2169
CREATE CACHED TABLE PUBLIC.MARKER(
2170
    ID INTEGER NOT NULL,
2171
    CREATED TIMESTAMP,
2172
    UUID VARCHAR(36),
2173
    UPDATED TIMESTAMP,
2174
    FLAG BOOLEAN NOT NULL,
2175
    MARKEDOBJ_TYPE VARCHAR(255),
2176
    MARKEDOBJ_ID INTEGER NOT NULL,
2177
    CREATEDBY_ID INTEGER,
2178
    UPDATEDBY_ID INTEGER,
2179
    MARKERTYPE_ID INTEGER
2180
);
2181
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER;
2182
CREATE CACHED TABLE PUBLIC.MARKER_AUD(
2183
    ID INTEGER NOT NULL,
2184
    REV INTEGER NOT NULL,
2185
    REVTYPE TINYINT,
2186
    CREATED TIMESTAMP,
2187
    UUID VARCHAR(36),
2188
    UPDATED TIMESTAMP,
2189
    FLAG BOOLEAN,
2190
    CREATEDBY_ID INTEGER,
2191
    UPDATEDBY_ID INTEGER,
2192
    MARKERTYPE_ID INTEGER
2193
);
2194

    
2195
CREATE TABLE MATERIALANDMETHOD (
2196
    ID INTEGER NOT NULL,
2197
    CREATED TIMESTAMP,
2198
    UUID VARCHAR(36),
2199
    UPDATED TIMESTAMP,
2200
    MATERIALMETHODTERM BINARY(255),
2201
    MATERIALMETHODTEXT VARCHAR(255),
2202
    CREATEDBY_ID INTEGER,
2203
    UPDATEDBY_ID INTEGER,
2204
    PRIMARY KEY (ID)
2205
);
2206

    
2207
CREATE TABLE MATERIALANDMETHOD_AUD (
2208
    ID INTEGER NOT NULL,
2209
    CREATED TIMESTAMP,
2210
    UUID VARCHAR(36),
2211
    UPDATED TIMESTAMP,
2212
    MATERIALMETHODTERM BINARY(255),
2213
    MATERIALMETHODTEXT VARCHAR(255),
2214
    CREATEDBY_ID INTEGER,
2215
    UPDATEDBY_ID INTEGER,
2216
);
2217

    
2218
CREATE TABLE MATERIALANDMETHOD_ANNOTATION (
2219
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2220
    ANNOTATIONS_ID INTEGER NOT NULL,
2221
    PRIMARY KEY (MATERIALANDMETHOD_ID, ANNOTATIONS_ID)
2222
);
2223

    
2224
CREATE TABLE MATERIALANDMETHOD_ANNOTATION_AUD (
2225
    REV INTEGER NOT NULL,
2226
    REVTYPE TINYINT,
2227
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2228
    ANNOTATIONS_ID INTEGER NOT NULL,
2229
);
2230

    
2231
CREATE TABLE MATERIALANDMETHOD_MARKER (
2232
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2233
    MARKERS_ID INTEGER NOT NULL,
2234
    PRIMARY KEY (MATERIALANDMETHOD_ID, MARKERS_ID)
2235
);
2236

    
2237
CREATE TABLE MATERIALANDMETHOD_MARKER_AUD (
2238
    REV INTEGER NOT NULL,
2239
    REVTYPE TINYINT,
2240
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2241
    MARKERS_ID INTEGER NOT NULL,
2242
);
2243

    
2244
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER_AUD;
2245
CREATE CACHED TABLE PUBLIC.MEDIA(
2246
    DTYPE VARCHAR(31) NOT NULL,
2247
    ID INTEGER NOT NULL,
2248
    CREATED TIMESTAMP,
2249
    UUID VARCHAR(36),
2250
    UPDATED TIMESTAMP,
2251
    LSID_AUTHORITY VARCHAR(255),
2252
    LSID_LSID VARCHAR(255),
2253
    LSID_NAMESPACE VARCHAR(255),
2254
    LSID_OBJECT VARCHAR(255),
2255
    LSID_REVISION VARCHAR(255),
2256
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
2257
    TITLECACHE VARCHAR(255),
2258
    MEDIACREATED TIMESTAMP,
2259
    CITATIONMICROREFERENCE VARCHAR(255),
2260
    CREATEDBY_ID INTEGER,
2261
    UPDATEDBY_ID INTEGER,
2262
    ARTIST_ID INTEGER,
2263
    CITATION_ID INTEGER
2264
);
2265
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA;
2266
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA(
2267
    MEDIA_ID INTEGER NOT NULL,
2268
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
2269
);
2270
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA;
2271
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA_AUD(
2272
    REV INTEGER NOT NULL,
2273
    MEDIA_ID INTEGER NOT NULL,
2274
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
2275
    REVTYPE TINYINT
2276
);
2277
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA_AUD;
2278
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE(
2279
    MEDIA_ID INTEGER NOT NULL,
2280
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
2281
);
2282
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE;
2283
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE_AUD(
2284
    REV INTEGER NOT NULL,
2285
    MEDIA_ID INTEGER NOT NULL,
2286
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
2287
    REVTYPE TINYINT
2288
);
2289
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE_AUD;
2290
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXON(
2291
    MEDIAKEY_ID INTEGER NOT NULL,
2292
    TAXON_ID INTEGER NOT NULL
2293
);
2294
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXON;
2295
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXON_AUD(
2296
    REV INTEGER NOT NULL,
2297
    MEDIAKEY_ID INTEGER NOT NULL,
2298
    TAXON_ID INTEGER NOT NULL,
2299
    REVTYPE TINYINT
2300
);
2301
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXON_AUD;
2302
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION(
2303
    ID INTEGER NOT NULL,
2304
    CREATED TIMESTAMP,
2305
    UUID VARCHAR(36),
2306
    UPDATED TIMESTAMP,
2307
    MIMETYPE VARCHAR(255),
2308
    SUFFIX VARCHAR(255),
2309
    CREATEDBY_ID INTEGER,
2310
    UPDATEDBY_ID INTEGER,
2311
    MEDIA_ID INTEGER
2312
);
2313
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION;
2314
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART(
2315
    DTYPE VARCHAR(31) NOT NULL,
2316
    ID INTEGER NOT NULL,
2317
    CREATED TIMESTAMP,
2318
    UUID VARCHAR(36),
2319
    UPDATED TIMESTAMP,
2320
    SIZE INTEGER,
2321
    URI CLOB,
2322
    DURATION INTEGER,
2323
    HEIGHT INTEGER,
2324
    WIDTH INTEGER,
2325
    CREATEDBY_ID INTEGER,
2326
    UPDATEDBY_ID INTEGER,
2327
    REPRESENTATION_ID INTEGER NOT NULL,
2328
    SORTINDEX INTEGER
2329
);
2330
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART;
2331
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART_AUD(
2332
    DTYPE VARCHAR(31) NOT NULL,
2333
    ID INTEGER NOT NULL,
2334
    REV INTEGER NOT NULL,
2335
    REVTYPE TINYINT,
2336
    CREATED TIMESTAMP,
2337
    UUID VARCHAR(36),
2338
    UPDATED TIMESTAMP,
2339
    SIZE INTEGER,
2340
    URI CLOB,
2341
    CREATEDBY_ID INTEGER,
2342
    UPDATEDBY_ID INTEGER,
2343
    REPRESENTATION_ID INTEGER,
2344
    DURATION INTEGER,
2345
    HEIGHT INTEGER,
2346
    WIDTH INTEGER
2347
);
2348
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART_AUD;
2349
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_AUD(
2350
    ID INTEGER NOT NULL,
2351
    REV INTEGER NOT NULL,
2352
    REVTYPE TINYINT,
2353
    CREATED TIMESTAMP,
2354
    UUID VARCHAR(36),
2355
    UPDATED TIMESTAMP,
2356
    MIMETYPE VARCHAR(255),
2357
    SUFFIX VARCHAR(255),
2358
    CREATEDBY_ID INTEGER,
2359
    UPDATEDBY_ID INTEGER,
2360
    MEDIA_ID INTEGER
2361
);
2362
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_AUD;
2363
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD(
2364
    REV INTEGER NOT NULL,
2365
    REPRESENTATION_ID INTEGER NOT NULL,
2366
    ID INTEGER NOT NULL,
2367
    SORTINDEX INTEGER NOT NULL,
2368
    REVTYPE TINYINT
2369
);
2370
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD;
2371
CREATE CACHED TABLE PUBLIC.MEDIA_AUD(
2372
    DTYPE VARCHAR(31) NOT NULL,
2373
    ID INTEGER NOT NULL,
2374
    REV INTEGER NOT NULL,
2375
    REVTYPE TINYINT,
2376
    CREATED TIMESTAMP,
2377
    UUID VARCHAR(36),
2378
    UPDATED TIMESTAMP,
2379
    LSID_AUTHORITY VARCHAR(255),
2380
    LSID_LSID VARCHAR(255),
2381
    LSID_NAMESPACE VARCHAR(255),
2382
    LSID_OBJECT VARCHAR(255),
2383
    LSID_REVISION VARCHAR(255),
2384
    PROTECTEDTITLECACHE BOOLEAN,
2385
    TITLECACHE VARCHAR(255),
2386
    MEDIACREATED TIMESTAMP,
2387
    CREATEDBY_ID INTEGER,
2388
    UPDATEDBY_ID INTEGER,
2389
    ARTIST_ID INTEGER,
2390
    CITATIONMICROREFERENCE VARCHAR(255),
2391
    CITATION_ID INTEGER
2392
);
2393
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_AUD;
2394
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION(
2395
    MEDIA_ID INTEGER NOT NULL,
2396
    ANNOTATIONS_ID INTEGER NOT NULL
2397
);
2398
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION;
2399
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION_AUD(
2400
    REV INTEGER NOT NULL,
2401
    MEDIA_ID INTEGER NOT NULL,
2402
    ANNOTATIONS_ID INTEGER NOT NULL,
2403
    REVTYPE TINYINT
2404
);
2405
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION_AUD;
2406
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT(
2407
    MEDIA_ID INTEGER NOT NULL,
2408
    CREDITS_ID INTEGER NOT NULL,
2409
    SORTINDEX INTEGER NOT NULL
2410
);
2411
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT;
2412
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT_AUD(
2413
    REV INTEGER NOT NULL,
2414
    MEDIA_ID INTEGER NOT NULL,
2415
    CREDITS_ID INTEGER NOT NULL,
2416
    SORTINDEX INTEGER NOT NULL,
2417
    REVTYPE TINYINT
2418
);
2419
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT_AUD;
2420
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION(
2421
    MEDIA_ID INTEGER NOT NULL,
2422
    DESCRIPTION_ID INTEGER NOT NULL,
2423
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2424
);
2425
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION;
2426
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION_AUD(
2427
    REV INTEGER NOT NULL,
2428
    MEDIA_ID INTEGER NOT NULL,
2429
    DESCRIPTION_ID INTEGER NOT NULL,
2430
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2431
    REVTYPE TINYINT
2432
);
2433
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION_AUD;
2434
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION(
2435
    MEDIA_ID INTEGER NOT NULL,
2436
    EXTENSIONS_ID INTEGER NOT NULL
2437
);
2438
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION;
2439
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION_AUD(
2440
    REV INTEGER NOT NULL,
2441
    MEDIA_ID INTEGER NOT NULL,
2442
    EXTENSIONS_ID INTEGER NOT NULL,
2443
    REVTYPE TINYINT
2444
);
2445
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION_AUD;
2446
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING(
2447
    MEDIA_ID INTEGER NOT NULL,
2448
    TITLE_ID INTEGER NOT NULL,
2449
    TITLE_MAPKEY_ID INTEGER NOT NULL
2450
);
2451
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING;
2452
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING_AUD(
2453
    REV INTEGER NOT NULL,
2454
    MEDIA_ID INTEGER NOT NULL,
2455
    TITLE_ID INTEGER NOT NULL,
2456
    TITLE_MAPKEY_ID INTEGER NOT NULL,
2457
    REVTYPE TINYINT
2458
);
2459
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING_AUD;
2460
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER(
2461
    MEDIA_ID INTEGER NOT NULL,
2462
    MARKERS_ID INTEGER NOT NULL
2463
);
2464
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER;
2465
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER_AUD(
2466
    REV INTEGER NOT NULL,
2467
    MEDIA_ID INTEGER NOT NULL,
2468
    MARKERS_ID INTEGER NOT NULL,
2469
    REVTYPE TINYINT
2470
);
2471
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER_AUD;
2472
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE(
2473
    MEDIA_ID INTEGER NOT NULL,
2474
    SOURCES_ID INTEGER NOT NULL
2475
);
2476
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE;
2477
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD(
2478
    REV INTEGER NOT NULL,
2479
    MEDIA_ID INTEGER NOT NULL,
2480
    SOURCES_ID INTEGER NOT NULL,
2481
    REVTYPE TINYINT
2482
);
2483
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD;
2484
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION(
2485
    MEDIA_ID INTEGER NOT NULL,
2486
    KEYREPRESENTATIONS_ID INTEGER NOT NULL
2487
);
2488
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION;
2489
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION_AUD(
2490
    REV INTEGER NOT NULL,
2491
    MEDIA_ID INTEGER NOT NULL,
2492
    KEYREPRESENTATIONS_ID INTEGER NOT NULL,
2493
    REVTYPE TINYINT
2494
);
2495
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION_AUD;
2496
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTS(
2497
    MEDIA_ID INTEGER NOT NULL,
2498
    RIGHTS_ID INTEGER NOT NULL
2499
);
2500
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTS;
2501
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTS_AUD(
2502
    REV INTEGER NOT NULL,
2503
    MEDIA_ID INTEGER NOT NULL,
2504
    RIGHTS_ID INTEGER NOT NULL,
2505
    REVTYPE TINYINT
2506
);
2507
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTS_AUD;
2508
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE(
2509
    MEDIA_ID INTEGER NOT NULL,
2510
    USEDSEQUENCES_ID INTEGER NOT NULL
2511
);
2512
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE;
2513
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE_AUD(
2514
    REV INTEGER NOT NULL,
2515
    MEDIA_ID INTEGER NOT NULL,
2516
    USEDSEQUENCES_ID INTEGER NOT NULL,
2517
    REVTYPE TINYINT
2518
);
2519
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE_AUD;
2520
CREATE CACHED TABLE PUBLIC.MEDIA_TAXONBASE(
2521
    MEDIA_ID INTEGER NOT NULL,
2522
    COVEREDTAXA_ID INTEGER NOT NULL
2523
);
2524
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_TAXONBASE;
2525
CREATE CACHED TABLE PUBLIC.MEDIA_TAXONBASE_AUD(
2526
    REV INTEGER NOT NULL,
2527
    MEDIA_ID INTEGER NOT NULL,
2528
    COVEREDTAXA_ID INTEGER NOT NULL,
2529
    REVTYPE TINYINT
2530
);
2531
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_TAXONBASE_AUD;
2532
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA(
2533
    WORKINGSET_ID INTEGER NOT NULL,
2534
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
2535
);
2536
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA;
2537
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD(
2538
    REV INTEGER NOT NULL,
2539
    WORKINGSET_ID INTEGER NOT NULL,
2540
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
2541
    REVTYPE TINYINT
2542
);
2543
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD;
2544
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE(
2545
    WORKINGSET_ID INTEGER NOT NULL,
2546
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
2547
);
2548
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE;
2549
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE_AUD(
2550
    REV INTEGER NOT NULL,
2551
    WORKINGSET_ID INTEGER NOT NULL,
2552
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
2553
    REVTYPE TINYINT
2554
);
2555
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE_AUD;
2556
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXON(
2557
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2558
    TAXON_ID INTEGER NOT NULL
2559
);
2560
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXON;
2561
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXON_AUD(
2562
    REV INTEGER NOT NULL,
2563
    MULTIACCESSKEY_ID INTEGER NOT NULL,
2564
    TAXON_ID INTEGER NOT NULL,
2565
    REVTYPE TINYINT
2566
);
2567
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXON_AUD;
2568
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP(
2569
    ID INTEGER NOT NULL,
2570
    CREATED TIMESTAMP,
2571
    UUID VARCHAR(36),
2572
    UPDATED TIMESTAMP,
2573
    CITATIONMICROREFERENCE VARCHAR(255),
2574
    ORIGINALNAMESTRING VARCHAR(255),
2575
    DOUBTFUL BOOLEAN NOT NULL,
2576
    RULECONSIDERED VARCHAR(255),
2577
    CREATEDBY_ID INTEGER,
2578
    UPDATEDBY_ID INTEGER,
2579
    CITATION_ID INTEGER,
2580
    RELATEDFROM_ID INTEGER,
2581
    RELATEDTO_ID INTEGER,
2582
    TYPE_ID INTEGER
2583
);
2584
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP;
2585
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_AUD(
2586
    ID INTEGER NOT NULL,
2587
    REV INTEGER NOT NULL,
2588
    REVTYPE TINYINT,
2589
    CREATED TIMESTAMP,
2590
    UUID VARCHAR(36),
2591
    UPDATED TIMESTAMP,
2592
    CITATIONMICROREFERENCE VARCHAR(255),
2593
    ORIGINALNAMESTRING VARCHAR(255),
2594
    DOUBTFUL BOOLEAN,
2595
    RULECONSIDERED VARCHAR(255),
2596
    CREATEDBY_ID INTEGER,
2597
    UPDATEDBY_ID INTEGER,
2598
    CITATION_ID INTEGER,
2599
    RELATEDFROM_ID INTEGER,
2600
    RELATEDTO_ID INTEGER,
2601
    TYPE_ID INTEGER
2602
);
2603
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_AUD;
2604
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION(
2605
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2606
    ANNOTATIONS_ID INTEGER NOT NULL
2607
);
2608
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION;
2609
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD(
2610
    REV INTEGER NOT NULL,
2611
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2612
    ANNOTATIONS_ID INTEGER NOT NULL,
2613
    REVTYPE TINYINT
2614
);
2615
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD;
2616
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER(
2617
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2618
    MARKERS_ID INTEGER NOT NULL
2619
);
2620
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER;
2621
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER_AUD(
2622
    REV INTEGER NOT NULL,
2623
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
2624
    MARKERS_ID INTEGER NOT NULL,
2625
    REVTYPE TINYINT
2626
);
2627
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER_AUD;
2628
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS(
2629
    ID INTEGER NOT NULL,
2630
    CREATED TIMESTAMP,
2631
    UUID VARCHAR(36),
2632
    UPDATED TIMESTAMP,
2633
    CITATIONMICROREFERENCE VARCHAR(255),
2634
    ORIGINALNAMESTRING VARCHAR(255),
2635
    RULECONSIDERED VARCHAR(255),
2636
    CREATEDBY_ID INTEGER,
2637
    UPDATEDBY_ID INTEGER,
2638
    CITATION_ID INTEGER,
2639
    TYPE_ID INTEGER
2640
);
2641
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS;
2642
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_AUD(
2643
    ID INTEGER NOT NULL,
2644
    REV INTEGER NOT NULL,
2645
    REVTYPE TINYINT,
2646
    CREATED TIMESTAMP,
2647
    UUID VARCHAR(36),
2648
    UPDATED TIMESTAMP,
2649
    CITATIONMICROREFERENCE VARCHAR(255),
2650
    ORIGINALNAMESTRING VARCHAR(255),
2651
    RULECONSIDERED VARCHAR(255),
2652
    CREATEDBY_ID INTEGER,
2653
    UPDATEDBY_ID INTEGER,
2654
    CITATION_ID INTEGER,
2655
    TYPE_ID INTEGER
2656
);
2657
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_AUD;
2658
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION(
2659
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2660
    ANNOTATIONS_ID INTEGER NOT NULL
2661
);
2662
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION;
2663
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD(
2664
    REV INTEGER NOT NULL,
2665
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2666
    ANNOTATIONS_ID INTEGER NOT NULL,
2667
    REVTYPE TINYINT
2668
);
2669
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD;
2670
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER(
2671
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2672
    MARKERS_ID INTEGER NOT NULL
2673
);
2674
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER;
2675
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD(
2676
    REV INTEGER NOT NULL,
2677
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
2678
    MARKERS_ID INTEGER NOT NULL,
2679
    REVTYPE TINYINT
2680
);
2681
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD;
2682
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE(
2683
    DTYPE VARCHAR(31) NOT NULL,
2684
    ID INTEGER NOT NULL,
2685
    CREATED TIMESTAMP,
2686
    UUID VARCHAR(36),
2687
    UPDATED TIMESTAMP,
2688
    SOURCETYPE VARCHAR(4) NOT NULL,
2689
    CITATIONMICROREFERENCE VARCHAR(255),
2690
    ORIGINALNAMESTRING VARCHAR(255),
2691
    IDINSOURCE VARCHAR(255),
2692
    IDNAMESPACE VARCHAR(255),
2693
    SOURCEDOBJ_TYPE VARCHAR(255),
2694
    SOURCEDOBJ_ID INTEGER NOT NULL,
2695
    CREATEDBY_ID INTEGER,
2696
    UPDATEDBY_ID INTEGER,
2697
    CITATION_ID INTEGER,
2698
    NAMEUSEDINSOURCE_ID INTEGER
2699
);
2700
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE;
2701
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_AUD(
2702
    DTYPE VARCHAR(31) NOT NULL,
2703
    ID INTEGER NOT NULL,
2704
    REV INTEGER NOT NULL,
2705
    REVTYPE TINYINT,
2706
    CREATED TIMESTAMP,
2707
    UUID VARCHAR(36),
2708
    UPDATED TIMESTAMP,
2709
           SOURCETYPE VARCHAR(4) NOT NULL,
2710
    CITATIONMICROREFERENCE VARCHAR(255),
2711
    ORIGINALNAMESTRING VARCHAR(255),
2712
    IDINSOURCE VARCHAR(255),
2713
    IDNAMESPACE VARCHAR(255),
2714
    CREATEDBY_ID INTEGER,
2715
    UPDATEDBY_ID INTEGER,
2716
    CITATION_ID INTEGER,
2717
    NAMEUSEDINSOURCE_ID INTEGER
2718
);
2719
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_AUD;
2720
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION(
2721
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
2722
    ANNOTATIONS_ID INTEGER NOT NULL
2723
);
2724
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION;
2725
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD(
2726
    REV INTEGER NOT NULL,
2727
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
2728
    ANNOTATIONS_ID INTEGER NOT NULL,
2729
    REVTYPE TINYINT
2730
);
2731
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD;
2732
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER(
2733
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
2734
    MARKERS_ID INTEGER NOT NULL
2735
);
2736
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER;
2737
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD(
2738
    REV INTEGER NOT NULL,
2739
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
2740
    MARKERS_ID INTEGER NOT NULL,
2741
    REVTYPE TINYINT
2742
);
2743
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD;
2744
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP(
2745
    ID INTEGER NOT NULL,
2746
    CREATED TIMESTAMP,
2747
    UUID VARCHAR(36),
2748
    NAME VARCHAR(255),
2749
    CREATEDBY_ID INTEGER
2750
);
2751
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP;
2752
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL(
2753
    PERMISSIONGROUP_ID INTEGER NOT NULL,
2754
    GRANTEDAUTHORITIES_ID INTEGER NOT NULL
2755
);
2756
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL;
2757
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY(
2758
    ID INTEGER NOT NULL,
2759
    CREATED TIMESTAMP,
2760
    UUID VARCHAR(36),
2761
    UPDATED TIMESTAMP,
2762
    LSID_AUTHORITY VARCHAR(255),
2763
    LSID_LSID VARCHAR(255),
2764
    LSID_NAMESPACE VARCHAR(255),
2765
    LSID_OBJECT VARCHAR(255),
2766
    LSID_REVISION VARCHAR(255),
2767
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
2768
    TITLECACHE VARCHAR(255),
2769
    STARTNUMBER INTEGER,
2770
    CREATEDBY_ID INTEGER,
2771
    UPDATEDBY_ID INTEGER,
2772
    ROOT_ID INTEGER
2773
);
2774
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY;
2775
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE(
2776
    ID INTEGER NOT NULL,
2777
    CREATED TIMESTAMP,
2778
    UUID VARCHAR(36),
2779
    UPDATED TIMESTAMP,
2780
    NODENUMBER INTEGER,
2781
    SORTINDEX INTEGER,
2782
    CREATEDBY_ID INTEGER,
2783
    UPDATEDBY_ID INTEGER,
2784
    FEATURE_ID INTEGER,
2785
    KEY_ID INTEGER,
2786
    OTHERNODE_ID INTEGER,
2787
    PARENT_ID INTEGER,
2788
    QUESTION_ID INTEGER,
2789
    STATEMENT_ID INTEGER,
2790
    SUBKEY_ID INTEGER,
2791
    TAXON_ID INTEGER
2792
);
2793
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE;
2794
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_AUD(
2795
    ID INTEGER NOT NULL,
2796
    REV INTEGER NOT NULL,
2797
    REVTYPE TINYINT,
2798
    CREATED TIMESTAMP,
2799
    UUID VARCHAR(36),
2800
    UPDATED TIMESTAMP,
2801
    NODENUMBER INTEGER,
2802
    SORTINDEX INTEGER,
2803
    CREATEDBY_ID INTEGER,
2804
    UPDATEDBY_ID INTEGER,
2805
    FEATURE_ID INTEGER,
2806
    KEY_ID INTEGER,
2807
    OTHERNODE_ID INTEGER,
2808
    PARENT_ID INTEGER,
2809
    QUESTION_ID INTEGER,
2810
    STATEMENT_ID INTEGER,
2811
    SUBKEY_ID INTEGER,
2812
    TAXON_ID INTEGER
2813
);
2814
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_AUD;
2815
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING(
2816
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
2817
    MODIFYINGTEXT_ID INTEGER NOT NULL,
2818
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
2819
);
2820
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING;
2821
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD(
2822
    REV INTEGER NOT NULL,
2823
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
2824
    MODIFYINGTEXT_ID INTEGER NOT NULL,
2825
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
2826
    REVTYPE TINYINT
2827
);
2828
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD;
2829
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_AUD(
2830
    ID INTEGER NOT NULL,
2831
    REV INTEGER NOT NULL,
2832
    REVTYPE TINYINT,
2833
    CREATED TIMESTAMP,
2834
    UUID VARCHAR(36),
2835
    UPDATED TIMESTAMP,
2836
    LSID_AUTHORITY VARCHAR(255),
2837
    LSID_LSID VARCHAR(255),
2838
    LSID_NAMESPACE VARCHAR(255),
2839
    LSID_OBJECT VARCHAR(255),
2840
    LSID_REVISION VARCHAR(255),
2841
    PROTECTEDTITLECACHE BOOLEAN,
2842
    TITLECACHE VARCHAR(255),
2843
    STARTNUMBER INTEGER,
2844
    CREATEDBY_ID INTEGER,
2845
    UPDATEDBY_ID INTEGER,
2846
    ROOT_ID INTEGER
2847
);
2848
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_AUD;
2849
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION(
2850
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2851
    ANNOTATIONS_ID INTEGER NOT NULL
2852
);
2853
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION;
2854
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD(
2855
    REV INTEGER NOT NULL,
2856
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2857
    ANNOTATIONS_ID INTEGER NOT NULL,
2858
    REVTYPE TINYINT
2859
);
2860
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD;
2861
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT(
2862
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2863
    CREDITS_ID INTEGER NOT NULL,
2864
    SORTINDEX INTEGER NOT NULL
2865
);
2866
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT;
2867
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT_AUD(
2868
    REV INTEGER NOT NULL,
2869
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2870
    CREDITS_ID INTEGER NOT NULL,
2871
    SORTINDEX INTEGER NOT NULL,
2872
    REVTYPE TINYINT
2873
);
2874
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT_AUD;
2875
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION(
2876
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2877
    EXTENSIONS_ID INTEGER NOT NULL
2878
);
2879
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION;
2880
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD(
2881
    REV INTEGER NOT NULL,
2882
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2883
    EXTENSIONS_ID INTEGER NOT NULL,
2884
    REVTYPE TINYINT
2885
);
2886
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD;
2887
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER(
2888
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2889
    MARKERS_ID INTEGER NOT NULL
2890
);
2891
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER;
2892
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER_AUD(
2893
    REV INTEGER NOT NULL,
2894
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2895
    MARKERS_ID INTEGER NOT NULL,
2896
    REVTYPE TINYINT
2897
);
2898
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER_AUD;
2899
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA(
2900
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2901
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
2902
);
2903
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA;
2904
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD(
2905
    REV INTEGER NOT NULL,
2906
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2907
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
2908
    REVTYPE TINYINT
2909
);
2910
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD;
2911
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE(
2912
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2913
    SOURCES_ID INTEGER NOT NULL
2914
);
2915
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE;
2916
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD(
2917
    REV INTEGER NOT NULL,
2918
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2919
    SOURCES_ID INTEGER NOT NULL,
2920
    REVTYPE TINYINT
2921
);
2922
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD;
2923
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTS(
2924
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2925
    RIGHTS_ID INTEGER NOT NULL
2926
);
2927
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTS;
2928
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTS_AUD(
2929
    REV INTEGER NOT NULL,
2930
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2931
    RIGHTS_ID INTEGER NOT NULL,
2932
    REVTYPE TINYINT
2933
);
2934
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTS_AUD;
2935
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE(
2936
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2937
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
2938
);
2939
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE;
2940
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE_AUD(
2941
    REV INTEGER NOT NULL,
2942
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2943
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
2944
    REVTYPE TINYINT
2945
);
2946
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE_AUD;
2947
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON(
2948
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2949
    TAXON_ID INTEGER NOT NULL
2950
);
2951
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON;
2952
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE(
2953
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2954
    COVEREDTAXA_ID INTEGER NOT NULL
2955
);
2956
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE;
2957
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD(
2958
    REV INTEGER NOT NULL,
2959
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2960
    COVEREDTAXA_ID INTEGER NOT NULL,
2961
    REVTYPE TINYINT
2962
);
2963
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD;
2964
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON_AUD(
2965
    REV INTEGER NOT NULL,
2966
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
2967
    TAXON_ID INTEGER NOT NULL,
2968
    REVTYPE TINYINT
2969
);
2970
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON_AUD;
2971

    
2972
CREATE TABLE PRIMER (
2973
    ID INTEGER NOT NULL,
2974
    CREATED TIMESTAMP,
2975
    UUID VARCHAR(36),
2976
    UPDATED TIMESTAMP,
2977
    LABEL VARCHAR(255),
2978
    CREATEDBY_ID INTEGER,
2979
    UPDATEDBY_ID INTEGER,
2980
    PUBLISHEDIN_ID INTEGER,
2981
    SEQUENCE_ID INTEGER,
2982
    PRIMARY KEY (ID)
2983
);
2984
CREATE TABLE PRIMER_AUD (
2985
    ID INTEGER NOT NULL,
2986
    CREATED TIMESTAMP,
2987
    UUID VARCHAR(36),
2988
    UPDATED TIMESTAMP,
2989
    LABEL VARCHAR(255),
2990
    CREATEDBY_ID INTEGER,
2991
    UPDATEDBY_ID INTEGER,
2992
    PUBLISHEDIN_ID INTEGER,
2993
    SEQUENCE_ID INTEGER
2994
);
2995

    
2996
CREATE TABLE PRIMER_ANNOTATION (
2997
    PRIMER_ID INTEGER NOT NULL,
2998
    ANNOTATIONS_ID INTEGER NOT NULL,
2999
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3000
);
3001
CREATE TABLE PRIMER_ANNOTATION_AUD (
3002
    PRIMER_ID INTEGER NOT NULL,
3003
    ANNOTATIONS_ID INTEGER NOT NULL
3004
);
3005

    
3006
CREATE TABLE PRIMER_MARKER (
3007
    PRIMER_ID INTEGER NOT NULL,
3008
    MARKERS_ID INTEGER NOT NULL,
3009
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3010
);
3011
CREATE TABLE PRIMER_MARKER_AUD (
3012
    PRIMER_ID INTEGER NOT NULL,
3013
    MARKERS_ID INTEGER NOT NULL
3014
);
3015

    
3016

    
3017
CREATE CACHED TABLE PUBLIC.REFERENCE(
3018
    DTYPE VARCHAR(31) NOT NULL,
3019
    ID INTEGER NOT NULL,
3020
    CREATED TIMESTAMP,
3021
    UUID VARCHAR(36),
3022
    UPDATED TIMESTAMP,
3023
    LSID_AUTHORITY VARCHAR(255),
3024
    LSID_LSID VARCHAR(255),
3025
    LSID_NAMESPACE VARCHAR(255),
3026
    LSID_OBJECT VARCHAR(255),
3027
    LSID_REVISION VARCHAR(255),
3028
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3029
    TITLECACHE VARCHAR(255),
3030
    DATEPUBLISHED_END VARCHAR(255),
3031
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3032
    DATEPUBLISHED_START VARCHAR(255),
3033
    EDITION VARCHAR(255),
3034
    EDITOR VARCHAR(255),
3035
    ISBN VARCHAR(255),
3036
    ISSN VARCHAR(255),
3037
    DOI VARCHAR(255),
3038
    NOMENCLATURALLYRELEVANT BOOLEAN NOT NULL,
3039
    ORGANIZATION VARCHAR(255),
3040
    PAGES VARCHAR(255),
3041
    PARSINGPROBLEM INTEGER NOT NULL,
3042
    PLACEPUBLISHED VARCHAR(255),
3043
    PROBLEMENDS INTEGER NOT NULL,
3044
    PROBLEMSTARTS INTEGER NOT NULL,
3045
    PUBLISHER VARCHAR(255),
3046
    REFERENCEABSTRACT CLOB,
3047
    SERIES VARCHAR(255),
3048
    SERIESPART VARCHAR(255),
3049
    TITLE CLOB,
3050
    ABBREVTITLE VARCHAR(255),
3051
    ABBREVTITLECACHE CLOB,
3052
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3053
    REFTYPE INTEGER,
3054
    URI CLOB,
3055
    VOLUME VARCHAR(255),
3056
    CREATEDBY_ID INTEGER,
3057
    UPDATEDBY_ID INTEGER,
3058
    AUTHORTEAM_ID INTEGER,
3059
    INREFERENCE_ID INTEGER,
3060
    INSTITUTION_ID INTEGER,
3061
    SCHOOL_ID INTEGER
3062
);
3063
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE;
3064
CREATE INDEX PUBLIC.REFERENCETITLECACHEINDEX ON PUBLIC.REFERENCE(TITLECACHE);
3065
CREATE CACHED TABLE PUBLIC.REFERENCE_AUD(
3066
    DTYPE VARCHAR(31) NOT NULL,
3067
    ID INTEGER NOT NULL,
3068
    REV INTEGER NOT NULL,
3069
    REVTYPE TINYINT,
3070
    CREATED TIMESTAMP,
3071
    UUID VARCHAR(36),
3072
    UPDATED TIMESTAMP,
3073
    LSID_AUTHORITY VARCHAR(255),
3074
    LSID_LSID VARCHAR(255),
3075
    LSID_NAMESPACE VARCHAR(255),
3076
    LSID_OBJECT VARCHAR(255),
3077
    LSID_REVISION VARCHAR(255),
3078
    PROTECTEDTITLECACHE BOOLEAN,
3079
    TITLECACHE VARCHAR(255),
3080
    DATEPUBLISHED_END VARCHAR(255),
3081
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3082
    DATEPUBLISHED_START VARCHAR(255),
3083
    EDITION VARCHAR(255),
3084
    EDITOR VARCHAR(255),
3085
    ISBN VARCHAR(255),
3086
    ISSN VARCHAR(255),
3087
    DOI VARCHAR(255),
3088
    NOMENCLATURALLYRELEVANT BOOLEAN,
3089
    ORGANIZATION VARCHAR(255),
3090
    PAGES VARCHAR(255),
3091
    PARSINGPROBLEM INTEGER,
3092
    PLACEPUBLISHED VARCHAR(255),
3093
    PROBLEMENDS INTEGER,
3094
    PROBLEMSTARTS INTEGER,
3095
    PUBLISHER VARCHAR(255),
3096
    REFERENCEABSTRACT CLOB,
3097
    SERIES VARCHAR(255),
3098
    SERIESPART VARCHAR(255),
3099
    TITLE CLOB,
3100
    ABBREVTITLE VARCHAR(255),
3101
    ABBREVTITLECACHE CLOB,
3102
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3103
    REFTYPE INTEGER,
3104
    URI CLOB,
3105
    VOLUME VARCHAR(255),
3106
    CREATEDBY_ID INTEGER,
3107
    UPDATEDBY_ID INTEGER,
3108
    AUTHORTEAM_ID INTEGER,
3109
    INREFERENCE_ID INTEGER,
3110
    INSTITUTION_ID INTEGER,
3111
    SCHOOL_ID INTEGER
3112
);
3113
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_AUD;
3114
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION(
3115
    REFERENCE_ID INTEGER NOT NULL,
3116
    ANNOTATIONS_ID INTEGER NOT NULL
3117
);
3118
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION;
3119
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION_AUD(
3120
    REV INTEGER NOT NULL,
3121
    REFERENCE_ID INTEGER NOT NULL,
3122
    ANNOTATIONS_ID INTEGER NOT NULL,
3123
    REVTYPE TINYINT
3124
);
3125
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION_AUD;
3126
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT(
3127
    REFERENCE_ID INTEGER NOT NULL,
3128
    CREDITS_ID INTEGER NOT NULL,
3129
    SORTINDEX INTEGER NOT NULL
3130
);
3131
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT;
3132
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT_AUD(
3133
    REV INTEGER NOT NULL,
3134
    REFERENCE_ID INTEGER NOT NULL,
3135
    CREDITS_ID INTEGER NOT NULL,
3136
    SORTINDEX INTEGER NOT NULL,
3137
    REVTYPE TINYINT
3138
);
3139
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT_AUD;
3140
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION(
3141
    REFERENCE_ID INTEGER NOT NULL,
3142
    EXTENSIONS_ID INTEGER NOT NULL
3143
);
3144
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION;
3145
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION_AUD(
3146
    REV INTEGER NOT NULL,
3147
    REFERENCE_ID INTEGER NOT NULL,
3148
    EXTENSIONS_ID INTEGER NOT NULL,
3149
    REVTYPE TINYINT
3150
);
3151
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION_AUD;
3152
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER(
3153
    REFERENCE_ID INTEGER NOT NULL,
3154
    MARKERS_ID INTEGER NOT NULL
3155
);
3156
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER;
3157
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER_AUD(
3158
    REV INTEGER NOT NULL,
3159
    REFERENCE_ID INTEGER NOT NULL,
3160
    MARKERS_ID INTEGER NOT NULL,
3161
    REVTYPE TINYINT
3162
);
3163
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER_AUD;
3164
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA(
3165
    REFERENCE_ID INTEGER NOT NULL,
3166
    MEDIA_ID INTEGER NOT NULL
3167
);
3168
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA;
3169
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA_AUD(
3170
    REV INTEGER NOT NULL,
3171
    REFERENCE_ID INTEGER NOT NULL,
3172
    MEDIA_ID INTEGER NOT NULL,
3173
    REVTYPE TINYINT
3174
);
3175
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA_AUD;
3176
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE(
3177
    REFERENCE_ID INTEGER NOT NULL,
3178
    SOURCES_ID INTEGER NOT NULL
3179
);
3180
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE;
3181
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD(
3182
    REV INTEGER NOT NULL,
3183
    REFERENCE_ID INTEGER NOT NULL,
3184
    SOURCES_ID INTEGER NOT NULL,
3185
    REVTYPE TINYINT
3186
);
3187
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD;
3188
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTS(
3189
    REFERENCE_ID INTEGER NOT NULL,
3190
    RIGHTS_ID INTEGER NOT NULL
3191
);
3192
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTS;
3193
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTS_AUD(
3194
    REV INTEGER NOT NULL,
3195
    REFERENCE_ID INTEGER NOT NULL,
3196
    RIGHTS_ID INTEGER NOT NULL,
3197
    REVTYPE TINYINT
3198
);
3199
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTS_AUD;
3200
CREATE CACHED TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION(
3201
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
3202
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL
3203
);
3204
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION;
3205
CREATE CACHED TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD(
3206
    REV INTEGER NOT NULL,
3207
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
3208
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL,
3209
    REVTYPE TINYINT
3210
);
3211
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD;
3212
CREATE CACHED TABLE PUBLIC.REPRESENTATION(
3213
    ID INTEGER NOT NULL,
3214
    CREATED TIMESTAMP,
3215
    UUID VARCHAR(36),
3216
    UPDATED TIMESTAMP,
3217
    TEXT CLOB,
3218
    ABBREVIATEDLABEL VARCHAR(255),
3219
    LABEL VARCHAR(255),
3220
    CREATEDBY_ID INTEGER,
3221
    UPDATEDBY_ID INTEGER,
3222
    LANGUAGE_ID INTEGER
3223
);
3224
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION;
3225
CREATE CACHED TABLE PUBLIC.REPRESENTATION_AUD(
3226
    ID INTEGER NOT NULL,
3227
    REV INTEGER NOT NULL,
3228
    REVTYPE TINYINT,
3229
    CREATED TIMESTAMP,
3230
    UUID VARCHAR(36),
3231
    UPDATED TIMESTAMP,
3232
    TEXT CLOB,
3233
    ABBREVIATEDLABEL VARCHAR(255),
3234
    LABEL VARCHAR(255),
3235
    CREATEDBY_ID INTEGER,
3236
    UPDATEDBY_ID INTEGER,
3237
    LANGUAGE_ID INTEGER
3238
);
3239
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_AUD;
3240
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION(
3241
    REPRESENTATION_ID INTEGER NOT NULL,
3242
    ANNOTATIONS_ID INTEGER NOT NULL
3243
);
3244
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION;
3245
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD(
3246
    REV INTEGER NOT NULL,
3247
    REPRESENTATION_ID INTEGER NOT NULL,
3248
    ANNOTATIONS_ID INTEGER NOT NULL,
3249
    REVTYPE TINYINT
3250
);
3251
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3252
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER(
3253
    REPRESENTATION_ID INTEGER NOT NULL,
3254
    MARKERS_ID INTEGER NOT NULL
3255
);
3256
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER;
3257
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER_AUD(
3258
    REV INTEGER NOT NULL,
3259
    REPRESENTATION_ID INTEGER NOT NULL,
3260
    MARKERS_ID INTEGER NOT NULL,
3261
    REVTYPE TINYINT
3262
);
3263
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER_AUD;
3264
CREATE CACHED TABLE PUBLIC.RIGHTS(
3265
    ID INTEGER NOT NULL,
3266
    CREATED TIMESTAMP,
3267
    UUID VARCHAR(36),
3268
    UPDATED TIMESTAMP,
3269
    TEXT CLOB,
3270
    ABBREVIATEDTEXT VARCHAR(255),
3271
    URI CLOB,
3272
    CREATEDBY_ID INTEGER,
3273
    UPDATEDBY_ID INTEGER,
3274
    LANGUAGE_ID INTEGER,
3275
    AGENT_ID INTEGER,
3276
    TYPE_ID INTEGER
3277
);
3278
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTS;
3279
CREATE CACHED TABLE PUBLIC.RIGHTS_AUD(
3280
    ID INTEGER NOT NULL,
3281
    REV INTEGER NOT NULL,
3282
    REVTYPE TINYINT,
3283
    CREATED TIMESTAMP,
3284
    UUID VARCHAR(36),
3285
    UPDATED TIMESTAMP,
3286
    TEXT CLOB,
3287
    ABBREVIATEDTEXT VARCHAR(255),
3288
    URI CLOB,
3289
    CREATEDBY_ID INTEGER,
3290
    UPDATEDBY_ID INTEGER,
3291
    LANGUAGE_ID INTEGER,
3292
    AGENT_ID INTEGER,
3293
    TYPE_ID INTEGER
3294
);
3295
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTS_AUD;
3296
CREATE CACHED TABLE PUBLIC.RIGHTS_ANNOTATION(
3297
    RIGHTS_ID INTEGER NOT NULL,
3298
    ANNOTATIONS_ID INTEGER NOT NULL
3299
);
3300
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTS_ANNOTATION;
3301
CREATE CACHED TABLE PUBLIC.RIGHTS_ANNOTATION_AUD(
3302
    REV INTEGER NOT NULL,
3303
    RIGHTS_ID INTEGER NOT NULL,
3304
    ANNOTATIONS_ID INTEGER NOT NULL,
3305
    REVTYPE TINYINT
3306
);
3307
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTS_ANNOTATION_AUD;
3308
CREATE CACHED TABLE PUBLIC.RIGHTS_MARKER(
3309
    RIGHTS_ID INTEGER NOT NULL,
3310
    MARKERS_ID INTEGER NOT NULL
3311
);
3312
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTS_MARKER;
3313
CREATE CACHED TABLE PUBLIC.RIGHTS_MARKER_AUD(
3314
    REV INTEGER NOT NULL,
3315
    RIGHTS_ID INTEGER NOT NULL,
3316
    MARKERS_ID INTEGER NOT NULL,
3317
    REVTYPE TINYINT
3318
);
3319

    
3320
CREATE TABLE SEQUENCE (
3321
    ID INTEGER NOT NULL,
3322
    CREATED TIMESTAMP,
3323
    UUID VARCHAR(36),
3324
    UPDATED TIMESTAMP,
3325
    BARCODESEQUENCEPART_LENGTH INTEGER,
3326
    BARCODESEQUENCEPART_STRING CLOB,
3327
    BOLDPROCESSID VARCHAR(255),
3328
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3329
    CONSENSUSSEQUENCE_STRING CLOB,
3330
    GENETICACCESSIONNUMBER VARCHAR(255),
3331
    HAPLOTYPE VARCHAR(255),
3332
    ISBARCODE BOOLEAN,
3333
    CREATEDBY_ID INTEGER,
3334
    UPDATEDBY_ID INTEGER,
3335
    CONTIGFILE_ID INTEGER,
3336
    DNASAMPLE_ID INTEGER,
3337
    MARKER_ID INTEGER,
3338
    PRIMARY KEY (ID)
3339
);
3340
CREATE TABLE SEQUENCE_AUD (
3341
    ID INTEGER NOT NULL,
3342
    REV INTEGER NOT NULL,
3343
    REVTYPE TINYINT,
3344
    CREATED TIMESTAMP,
3345
    UUID VARCHAR(36),
3346
    UPDATED TIMESTAMP,
3347
    BARCODESEQUENCEPART_LENGTH INTEGER,
3348
    BARCODESEQUENCEPART_STRING CLOB,
3349
    BOLDPROCESSID VARCHAR(255),
3350
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3351
    CONSENSUSSEQUENCE_STRING CLOB,
3352
    GENETICACCESSIONNUMBER VARCHAR(255),
3353
    HAPLOTYPE VARCHAR(255),
3354
    ISBARCODE BOOLEAN,
3355
    CREATEDBY_ID INTEGER,
3356
    UPDATEDBY_ID INTEGER,
3357
    CONTIGFILE_ID INTEGER,
3358
    DNASAMPLE_ID INTEGER,
3359
    MARKER_ID INTEGER
3360
);
3361

    
3362
CREATE TABLE SEQUENCE_ANNOTATION (
3363
    SEQUENCE_ID INTEGER NOT NULL,
3364
    ANNOTATIONS_ID INTEGER NOT NULL,
3365
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3366
);
3367
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3368
    REV INTEGER NOT NULL,
3369
    REVTYPE TINYINT,
3370
    SEQUENCE_ID INTEGER NOT NULL,
3371
    ANNOTATIONS_ID INTEGER NOT NULL
3372
);
3373

    
3374
CREATE TABLE SEQUENCE_MARKER (
3375
    SEQUENCE_ID INTEGER NOT NULL,
3376
    MARKERS_ID INTEGER NOT NULL,
3377
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3378
);
3379
CREATE TABLE SEQUENCE_MARKER_AUD (
3380
    REV INTEGER NOT NULL,
3381
    REVTYPE TINYINT,
3382
    SEQUENCE_ID INTEGER NOT NULL,
3383
    MARKERS_ID INTEGER NOT NULL
3384
);
3385
CREATE TABLE SEQUENCE_REFERENCE (
3386
    SEQUENCE_ID INTEGER NOT NULL,
3387
    CITATIONS_ID INTEGER NOT NULL,
3388
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3389
);
3390
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3391
    REV INTEGER NOT NULL,
3392
    REVTYPE TINYINT,
3393
    SEQUENCE_ID INTEGER NOT NULL,
3394
    CITATIONS_ID INTEGER NOT NULL
3395
);
3396

    
3397
CREATE TABLE SEQUENCE_SINGLESEQUENCE (
3398
    SEQUENCE_ID INTEGER NOT NULL,
3399
    SINGLESEQUENCES_ID INTEGER NOT NULL,
3400
    PRIMARY KEY (SEQUENCE_ID, SINGLESEQUENCES_ID)
3401
);
3402
CREATE TABLE SEQUENCE_SINGLESEQUENCE_AUD (
3403
    REV INTEGER NOT NULL,
3404
    REVTYPE TINYINT,
3405
    SEQUENCE_ID INTEGER NOT NULL,
3406
    SINGLESEQUENCES_ID INTEGER NOT NULL
3407
);
3408

    
3409
CREATE TABLE SINGLESEQUENCE (
3410
    ID INTEGER NOT NULL,
3411
    CREATED TIMESTAMP,
3412
    UUID VARCHAR(36),
3413
    UPDATED TIMESTAMP,
3414
    DESCRIPTION VARCHAR(255),
3415
    TIMEPERIOD_END VARCHAR(255),
3416
    TIMEPERIOD_FREETEXT VARCHAR(255),
3417
    TIMEPERIOD_START VARCHAR(255),
3418
    DIRECTION INTEGER,
3419
    SEQUENCE_LENGTH INTEGER,
3420
    SEQUENCE_STRING CLOB,
3421
    CREATEDBY_ID INTEGER,
3422
    UPDATEDBY_ID INTEGER,
3423
    ACTOR_ID INTEGER,
3424
    AMPLIFICATION_ID INTEGER,
3425
    MATERIALANDMETHOD_ID INTEGER,
3426
    PHEROGRAM_ID INTEGER,
3427
    PRIMER_ID INTEGER,
3428
    PRIMARY KEY (ID)
3429
);
3430
CREATE TABLE SINGLESEQUENCE_AUD (
3431
    ID INTEGER NOT NULL,
3432
    REV INTEGER NOT NULL,
3433
    REVTYPE TINYINT,
3434
    CREATED TIMESTAMP,
3435
    UUID VARCHAR(36),
3436
    UPDATED TIMESTAMP,
3437
    DESCRIPTION VARCHAR(255),
3438
    TIMEPERIOD_END VARCHAR(255),
3439
    TIMEPERIOD_FREETEXT VARCHAR(255),
3440
    TIMEPERIOD_START VARCHAR(255),
3441
    DIRECTION INTEGER,
3442
    SEQUENCE_LENGTH INTEGER,
3443
    SEQUENCE_STRING CLOB,
3444
    CREATEDBY_ID INTEGER,
3445
    UPDATEDBY_ID INTEGER,
3446
    ACTOR_ID INTEGER,
3447
    AMPLIFICATION_ID INTEGER,
3448
    MATERIALANDMETHOD_ID INTEGER,
3449
    PHEROGRAM_ID INTEGER,
3450
    PRIMER_ID INTEGER
3451
);
3452

    
3453
CREATE TABLE SINGLESEQUENCE_ANNOTATION (
3454
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3455
    ANNOTATIONS_ID INTEGER NOT NULL,
3456
    PRIMARY KEY (SINGLESEQUENCE_ID, ANNOTATIONS_ID)
3457
);
3458
CREATE TABLE SINGLESEQUENCE_ANNOTATION_AUD (
3459
    REV INTEGER NOT NULL,
3460
    REVTYPE TINYINT,
3461
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3462
    ANNOTATIONS_ID INTEGER NOT NULL
3463
);
3464

    
3465
CREATE TABLE SINGLESEQUENCE_MARKER (
3466
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3467
    MARKERS_ID INTEGER NOT NULL,
3468
    PRIMARY KEY (SINGLESEQUENCE_ID, MARKERS_ID)
3469
);
3470

    
3471
CREATE TABLE SINGLESEQUENCE_MARKER_AUD (
3472
    REV INTEGER NOT NULL,
3473
    REVTYPE TINYINT,
3474
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3475
    MARKERS_ID INTEGER NOT NULL
3476
);
3477

    
3478

    
3479
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
3480
    DTYPE VARCHAR(31) NOT NULL,
3481
    ID INTEGER NOT NULL,
3482
    CREATED TIMESTAMP,
3483
    UUID VARCHAR(36),
3484
    UPDATED TIMESTAMP,
3485
    RECORDBASIS INTEGER,
3486
    LSID_AUTHORITY VARCHAR(255),
3487
    LSID_LSID VARCHAR(255),
3488
    LSID_NAMESPACE VARCHAR(255),
3489
    LSID_OBJECT VARCHAR(255),
3490
    LSID_REVISION VARCHAR(255),
3491
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3492
    TITLECACHE VARCHAR(255),
3493
    PUBLISH BOOLEAN,
3494
    INDIVIDUALCOUNT INTEGER,
3495
    ACCESSIONNUMBER VARCHAR(255),
3496
    BARCODE VARCHAR(255),
3497
    CATALOGNUMBER VARCHAR(255),
3498
    COLLECTORSNUMBER VARCHAR(255),
3499
    EXSICCATUM VARCHAR(255),
3500
    FIELDNOTES VARCHAR(255),
3501
    FIELDNUMBER VARCHAR(255),
3502
    CREATEDBY_ID INTEGER,
3503
    UPDATEDBY_ID INTEGER,
3504
    LIFESTAGE_ID INTEGER,
3505
    SEX_ID INTEGER,
3506
    KINDOFUNIT_ID INTEGER,
3507
    COLLECTION_ID INTEGER,
3508
    DERIVEDFROM_ID INTEGER,
3509
    STOREDUNDER_ID INTEGER,
3510
    PRESERVATION_ID INTEGER,
3511
    GATHERINGEVENT_ID INTEGER,
3512
    PRIMARYCOLLECTOR_ID INTEGER,
3513
    MEDIASPECIMEN_ID INTEGER
3514
);
3515
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
3516
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
3517
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
3518
    DTYPE VARCHAR(31) NOT NULL,
3519
    ID INTEGER NOT NULL,
3520
    REV INTEGER NOT NULL,
3521
    REVTYPE TINYINT,
3522
    CREATED TIMESTAMP,
3523
    UUID VARCHAR(36),
3524
    UPDATED TIMESTAMP,
3525
    RECORDBASIS INTEGER,
3526
    LSID_AUTHORITY VARCHAR(255),
3527
    LSID_LSID VARCHAR(255),
3528
    LSID_NAMESPACE VARCHAR(255),
3529
    LSID_OBJECT VARCHAR(255),
3530
    LSID_REVISION VARCHAR(255),
3531
    PROTECTEDTITLECACHE BOOLEAN,
3532
    TITLECACHE VARCHAR(255),
3533
    PUBLISH BOOLEAN,
3534
    INDIVIDUALCOUNT INTEGER,
3535
    ACCESSIONNUMBER VARCHAR(255),
3536
    BARCODE VARCHAR(255),
3537
    CATALOGNUMBER VARCHAR(255),
3538
    COLLECTORSNUMBER VARCHAR(255),
3539
    EXSICCATUM VARCHAR(255),
3540
    FIELDNOTES VARCHAR(255),
3541
    FIELDNUMBER VARCHAR(255),
3542
    CREATEDBY_ID INTEGER,
3543
    UPDATEDBY_ID INTEGER,
3544
    LIFESTAGE_ID INTEGER,
3545
    SEX_ID INTEGER,
3546
    KINDOFUNIT_ID INTEGER,
3547
    COLLECTION_ID INTEGER,
3548
    DERIVEDFROM_ID INTEGER,
3549
    STOREDUNDER_ID INTEGER,
3550
    PRESERVATION_ID INTEGER,
3551
    GATHERINGEVENT_ID INTEGER,
3552
    PRIMARYCOLLECTOR_ID INTEGER,
3553
    MEDIASPECIMEN_ID INTEGER
3554
);
3555
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
3556
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
3557
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3558
    ANNOTATIONS_ID INTEGER NOT NULL
3559
);
3560
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
3561
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
3562
    REV INTEGER NOT NULL,
3563
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3564
    ANNOTATIONS_ID INTEGER NOT NULL,
3565
    REVTYPE TINYINT
3566
);
3567
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
3568
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
3569
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3570
    CREDITS_ID INTEGER NOT NULL,
3571
    SORTINDEX INTEGER NOT NULL
3572
);
3573
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
3574
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
3575
    REV INTEGER NOT NULL,
3576
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3577
    CREDITS_ID INTEGER NOT NULL,
3578
    SORTINDEX INTEGER NOT NULL,
3579
    REVTYPE TINYINT
3580
);
3581
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
3582
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
3583
    ORIGINALS_ID INTEGER NOT NULL,
3584
    DERIVATIONEVENTS_ID INTEGER NOT NULL
3585
);
3586
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
3587
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
3588
    REV INTEGER NOT NULL,
3589
    ORIGINALS_ID INTEGER NOT NULL,
3590
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
3591
    REVTYPE TINYINT
3592
);
3593
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
3594
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
3595
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3596
    EXTENSIONS_ID INTEGER NOT NULL
3597
);
3598
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
3599
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
3600
    REV INTEGER NOT NULL,
3601
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3602
    EXTENSIONS_ID INTEGER NOT NULL,
3603
    REVTYPE TINYINT
3604
);
3605
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;
3606
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
3607
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3608
    DEFINITION_ID INTEGER NOT NULL,
3609
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
3610
);
3611
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
3612
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
3613
    REV INTEGER NOT NULL,
3614
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3615
    DEFINITION_ID INTEGER NOT NULL,
3616
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
3617
    REVTYPE TINYINT
3618
);
3619
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
3620
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
3621
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3622
    MARKERS_ID INTEGER NOT NULL
3623
);
3624
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
3625
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
3626
    REV INTEGER NOT NULL,
3627
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3628
    MARKERS_ID INTEGER NOT NULL,
3629
    REVTYPE TINYINT
3630
);
3631
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
3632
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
3633
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3634
    SOURCES_ID INTEGER NOT NULL
3635
);
3636
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
3637
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
3638
    REV INTEGER NOT NULL,
3639
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3640
    SOURCES_ID INTEGER NOT NULL,
3641
    REVTYPE TINYINT
3642
);
3643
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
3644
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTS(
3645
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3646
    RIGHTS_ID INTEGER NOT NULL
3647
);
3648
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTS;
3649
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTS_AUD(
3650
    REV INTEGER NOT NULL,
3651
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3652
    RIGHTS_ID INTEGER NOT NULL,
3653
    REVTYPE TINYINT
3654
);
3655
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTS_AUD;
3656
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_SEQUENCE(
3657
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3658
    SEQUENCES_ID INTEGER NOT NULL
3659
);
3660
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_SEQUENCE;
3661
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_SEQUENCE_AUD(
3662
    REV INTEGER NOT NULL,
3663
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3664
    SEQUENCES_ID INTEGER NOT NULL,
3665
    REVTYPE TINYINT
3666
);
3667
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_SEQUENCE_AUD;
3668
CREATE CACHED TABLE PUBLIC.STATEDATA(
3669
    ID INTEGER NOT NULL,
3670
    CREATED TIMESTAMP,
3671
    UUID VARCHAR(36),
3672
    UPDATED TIMESTAMP,
3673
    CREATEDBY_ID INTEGER,
3674
    UPDATEDBY_ID INTEGER,
3675
    STATE_ID INTEGER
3676
);
3677
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA;
3678
CREATE CACHED TABLE PUBLIC.STATEDATA_AUD(
3679
    ID INTEGER NOT NULL,
3680
    REV INTEGER NOT NULL,
3681
    REVTYPE TINYINT,
3682
    CREATED TIMESTAMP,
3683
    UUID VARCHAR(36),
3684
    UPDATED TIMESTAMP,
3685
    CREATEDBY_ID INTEGER,
3686
    UPDATEDBY_ID INTEGER,
3687
    STATE_ID INTEGER
3688
);
3689
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_AUD;
3690
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE(
3691
    STATEDATA_ID INTEGER NOT NULL,
3692
    MODIFIERS_ID INTEGER NOT NULL
3693
);
3694
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE;
3695
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD(
3696
    REV INTEGER NOT NULL,
3697
    STATEDATA_ID INTEGER NOT NULL,
3698
    MODIFIERS_ID INTEGER NOT NULL,
3699
    REVTYPE TINYINT
3700
);
3701
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD;
3702
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING(
3703
    STATEDATA_ID INTEGER NOT NULL,
3704
    MODIFYINGTEXT_ID INTEGER NOT NULL,
3705
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
3706
);
3707
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING;
3708
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD(
3709
    REV INTEGER NOT NULL,
3710
    STATEDATA_ID INTEGER NOT NULL,
3711
    MODIFYINGTEXT_ID INTEGER NOT NULL,
3712
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
3713
    REVTYPE TINYINT
3714
);
3715
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING_AUD;
3716
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE(
3717
    ID INTEGER NOT NULL,
3718
    CREATED TIMESTAMP,
3719
    UUID VARCHAR(36),
3720
    UPDATED TIMESTAMP,
3721
    VALUE DOUBLE NOT NULL,
3722
    CREATEDBY_ID INTEGER,
3723
    UPDATEDBY_ID INTEGER,
3724
    TYPE_ID INTEGER
3725
);
3726
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE;
3727
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD(
3728
    ID INTEGER NOT NULL,
3729
    REV INTEGER NOT NULL,
3730
    REVTYPE TINYINT,
3731
    CREATED TIMESTAMP,
3732
    UUID VARCHAR(36),
3733
    UPDATED TIMESTAMP,
3734
    VALUE DOUBLE,
3735
    CREATEDBY_ID INTEGER,
3736
    UPDATEDBY_ID INTEGER,
3737
    TYPE_ID INTEGER
3738
);
3739
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_AUD;
3740
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE(
3741
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
3742
    MODIFIERS_ID INTEGER NOT NULL
3743
);
3744
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE;
3745
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD(
3746
    REV INTEGER NOT NULL,
3747
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
3748
    MODIFIERS_ID INTEGER NOT NULL,
3749
    REVTYPE TINYINT
3750
);
3751
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD;
3752
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP(
3753
    ID INTEGER NOT NULL,
3754
    CREATED TIMESTAMP,
3755
    UUID VARCHAR(36),
3756
    UPDATED TIMESTAMP,
3757
    CITATIONMICROREFERENCE VARCHAR(255),
3758
    ORIGINALNAMESTRING VARCHAR(255),
3759
    DOUBTFUL BOOLEAN NOT NULL,
3760
    PARTIAL BOOLEAN NOT NULL,
3761
    PROPARTE BOOLEAN NOT NULL,
3762
    CREATEDBY_ID INTEGER,
3763
    UPDATEDBY_ID INTEGER,
3764
    CITATION_ID INTEGER,
3765
    RELATEDFROM_ID INTEGER,
3766
    RELATEDTO_ID INTEGER,
3767
    TYPE_ID INTEGER
3768
);
3769
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP;
3770
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_AUD(
3771
    ID INTEGER NOT NULL,
3772
    REV INTEGER NOT NULL,
3773
    REVTYPE TINYINT,
3774
    CREATED TIMESTAMP,
3775
    UUID VARCHAR(36),
3776
    UPDATED TIMESTAMP,
3777
    CITATIONMICROREFERENCE VARCHAR(255),
3778
    ORIGINALNAMESTRING VARCHAR(255),
3779
    DOUBTFUL BOOLEAN,
3780
    PARTIAL BOOLEAN,
3781
    PROPARTE BOOLEAN,
3782
    CREATEDBY_ID INTEGER,
3783
    UPDATEDBY_ID INTEGER,
3784
    CITATION_ID INTEGER,
3785
    RELATEDFROM_ID INTEGER,
3786
    RELATEDTO_ID INTEGER,
3787
    TYPE_ID INTEGER
3788
);
3789
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_AUD;
3790
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION(
3791
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
3792
    ANNOTATIONS_ID INTEGER NOT NULL
3793
);
3794
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION;
3795
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION_AUD(
3796
    REV INTEGER NOT NULL,
3797
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
3798
    ANNOTATIONS_ID INTEGER NOT NULL,
3799
    REVTYPE TINYINT
3800
);
3801
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION_AUD;
3802
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_MARKER(
3803
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
3804
    MARKERS_ID INTEGER NOT NULL
3805
);
3806
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_MARKER;
3807
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_MARKER_AUD(
3808
    REV INTEGER NOT NULL,
3809
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
3810
    MARKERS_ID INTEGER NOT NULL,
3811
    REVTYPE TINYINT
3812
);
3813
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_MARKER_AUD;
3814
CREATE CACHED TABLE PUBLIC.TAXONBASE(
3815
    DTYPE VARCHAR(31) NOT NULL,
3816
    ID INTEGER NOT NULL,
3817
    CREATED TIMESTAMP,
3818
    UUID VARCHAR(36),
3819
    UPDATED TIMESTAMP,
3820
    LSID_AUTHORITY VARCHAR(255),
3821
    LSID_LSID VARCHAR(255),
3822
    LSID_NAMESPACE VARCHAR(255),
3823
    LSID_OBJECT VARCHAR(255),
3824
    LSID_REVISION VARCHAR(255),
3825
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3826
    TITLECACHE VARCHAR(255),
3827
    APPENDEDPHRASE VARCHAR(255),
3828
    DOUBTFUL BOOLEAN NOT NULL,
3829
    PUBLISH BOOLEAN,
3830
    USENAMECACHE BOOLEAN NOT NULL,
3831
    EXCLUDED BOOLEAN,
3832
    TAXONSTATUSUNKNOWN BOOLEAN,
3833
    TAXONOMICCHILDRENCOUNT INTEGER,
3834
    UNPLACED BOOLEAN,
3835
    CREATEDBY_ID INTEGER,
3836
    UPDATEDBY_ID INTEGER,
3837
    NAME_ID INTEGER,
3838
    SEC_ID INTEGER,
3839
    TAXONOMICPARENTCACHE_ID INTEGER
3840
);
3841
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE;
3842
CREATE INDEX PUBLIC.TAXONBASETITLECACHEINDEX ON PUBLIC.TAXONBASE(TITLECACHE);
3843
CREATE CACHED TABLE PUBLIC.TAXONBASE_AUD(
3844
    DTYPE VARCHAR(31) NOT NULL,
3845
    ID INTEGER NOT NULL,
3846
    REV INTEGER NOT NULL,
3847
    REVTYPE TINYINT,
3848
    CREATED TIMESTAMP,
3849
    UUID VARCHAR(36),
3850
    UPDATED TIMESTAMP,
3851
    LSID_AUTHORITY VARCHAR(255),
3852
    LSID_LSID VARCHAR(255),
3853
    LSID_NAMESPACE VARCHAR(255),
3854
    LSID_OBJECT VARCHAR(255),
3855
    LSID_REVISION VARCHAR(255),
3856
    PROTECTEDTITLECACHE BOOLEAN,
3857
    TITLECACHE VARCHAR(255),
3858
    APPENDEDPHRASE VARCHAR(255),
3859
    DOUBTFUL BOOLEAN,
3860
    PUBLISH BOOLEAN,
3861
    USENAMECACHE BOOLEAN,
3862
    CREATEDBY_ID INTEGER,
3863
    UPDATEDBY_ID INTEGER,
3864
    NAME_ID INTEGER,
3865
    SEC_ID INTEGER,
3866
    EXCLUDED BOOLEAN,
3867
    TAXONSTATUSUNKNOWN BOOLEAN,
3868
    TAXONOMICCHILDRENCOUNT INTEGER,
3869
    UNPLACED BOOLEAN,
3870
    TAXONOMICPARENTCACHE_ID INTEGER
3871
);
3872
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_AUD;
3873
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION(
3874
    TAXONBASE_ID INTEGER NOT NULL,
3875
    ANNOTATIONS_ID INTEGER NOT NULL
3876
);
3877
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION;
3878
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION_AUD(
3879
    REV INTEGER NOT NULL,
3880
    TAXONBASE_ID INTEGER NOT NULL,
3881
    ANNOTATIONS_ID INTEGER NOT NULL,
3882
    REVTYPE TINYINT
3883
);
3884
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION_AUD;
3885
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT(
3886
    TAXONBASE_ID INTEGER NOT NULL,
3887
    CREDITS_ID INTEGER NOT NULL,
3888
    SORTINDEX INTEGER NOT NULL
3889
);
3890
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT;
3891
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT_AUD(
3892
    REV INTEGER NOT NULL,
3893
    TAXONBASE_ID INTEGER NOT NULL,
3894
    CREDITS_ID INTEGER NOT NULL,
3895
    SORTINDEX INTEGER NOT NULL,
3896
    REVTYPE TINYINT
3897
);
3898
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT_AUD;
3899
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION(
3900
    TAXONBASE_ID INTEGER NOT NULL,
3901
    EXTENSIONS_ID INTEGER NOT NULL
3902
);
3903
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION;
3904
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION_AUD(
3905
    REV INTEGER NOT NULL,
3906
    TAXONBASE_ID INTEGER NOT NULL,
3907
    EXTENSIONS_ID INTEGER NOT NULL,
3908
    REVTYPE TINYINT
3909
);
3910
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION_AUD;
3911
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER(
3912
    TAXONBASE_ID INTEGER NOT NULL,
3913
    MARKERS_ID INTEGER NOT NULL
3914
);
3915
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER;
3916
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER_AUD(
3917
    REV INTEGER NOT NULL,
3918
    TAXONBASE_ID INTEGER NOT NULL,
3919
    MARKERS_ID INTEGER NOT NULL,
3920
    REVTYPE TINYINT
3921
);
3922
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER_AUD;
3923
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE(
3924
    TAXONBASE_ID INTEGER NOT NULL,
3925
    SOURCES_ID INTEGER NOT NULL
3926
);
3927
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE;
3928
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD(
3929
    REV INTEGER NOT NULL,
3930
    TAXONBASE_ID INTEGER NOT NULL,
3931
    SOURCES_ID INTEGER NOT NULL,
3932
    REVTYPE TINYINT
3933
);
3934
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD;
3935
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTS(
3936
    TAXONBASE_ID INTEGER NOT NULL,
3937
    RIGHTS_ID INTEGER NOT NULL
3938
);
3939
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTS;
3940
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTS_AUD(
3941
    REV INTEGER NOT NULL,
3942
    TAXONBASE_ID INTEGER NOT NULL,
3943
    RIGHTS_ID INTEGER NOT NULL,
3944
    REVTYPE TINYINT
3945
);
3946
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTS_AUD;
3947
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING(
3948
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
3949
    DESCRIPTION_ID INTEGER NOT NULL,
3950
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
3951
);
3952
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONINTERACTION_LANGUAGESTRING;
3953
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD(
3954
    REV INTEGER NOT NULL,
3955
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
3956
    DESCRIPTION_ID INTEGER NOT NULL,
3957
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
3958
    REVTYPE TINYINT
3959
);
3960
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD;
3961
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE(
3962
    DTYPE VARCHAR(31) NOT NULL,
3963
    ID INTEGER NOT NULL,
3964
    CREATED TIMESTAMP,
3965
    UUID VARCHAR(36),
3966
    UPDATED TIMESTAMP,
3967
    LSID_AUTHORITY VARCHAR(255),
3968
    LSID_LSID VARCHAR(255),
3969
    LSID_NAMESPACE VARCHAR(255),
3970
    LSID_OBJECT VARCHAR(255),
3971
    LSID_REVISION VARCHAR(255),
3972
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3973
    TITLECACHE VARCHAR(255),
3974
    APPENDEDPHRASE VARCHAR(255),
3975
    FULLTITLECACHE VARCHAR(330),
3976
    NOMENCLATURALMICROREFERENCE VARCHAR(255),
3977
    PARSINGPROBLEM INTEGER NOT NULL,
3978
    PROBLEMENDS INTEGER NOT NULL,
3979
    PROBLEMSTARTS INTEGER NOT NULL,
3980
    PROTECTEDFULLTITLECACHE BOOLEAN NOT NULL,
3981
    AUTHORSHIPCACHE VARCHAR(255),
3982
    BINOMHYBRID BOOLEAN,
3983
    GENUSORUNINOMIAL VARCHAR(255),
3984
    HYBRIDFORMULA BOOLEAN,
3985
    INFRAGENERICEPITHET VARCHAR(255),
3986
    INFRASPECIFICEPITHET VARCHAR(255),
3987
    MONOMHYBRID BOOLEAN,
3988
    NAMECACHE VARCHAR(255),
3989
    PROTECTEDAUTHORSHIPCACHE BOOLEAN,
3990
    PROTECTEDNAMECACHE BOOLEAN,
3991
    SPECIFICEPITHET VARCHAR(255),
3992
    TRINOMHYBRID BOOLEAN,
3993
    NAMEAPPROBATION VARCHAR(255),
3994
    SUBGENUSAUTHORSHIP VARCHAR(255),
3995
    ANAMORPHIC BOOLEAN,
3996
    CULTIVARNAME VARCHAR(255),
3997
    ACRONYM VARCHAR(255),
3998
    BREED VARCHAR(255),
3999
    ORIGINALPUBLICATIONYEAR INTEGER,
4000
    PUBLICATIONYEAR INTEGER,
4001
    CREATEDBY_ID INTEGER,
4002
    UPDATEDBY_ID INTEGER,
4003
    HOMOTYPICALGROUP_ID INTEGER,
4004
    NOMENCLATURALREFERENCE_ID INTEGER,
4005
    RANK_ID INTEGER,
4006
    BASIONYMAUTHORTEAM_ID INTEGER,
4007
    COMBINATIONAUTHORTEAM_ID INTEGER,
4008
    EXBASIONYMAUTHORTEAM_ID INTEGER,
4009
    EXCOMBINATIONAUTHORTEAM_ID INTEGER
4010
);
4011
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE;
4012
CREATE INDEX PUBLIC.TAXONNAMEBASETITLECACHEINDEX ON PUBLIC.TAXONNAMEBASE(TITLECACHE);
4013
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_AUD(
4014
    DTYPE VARCHAR(31) NOT NULL,
4015
    ID INTEGER NOT NULL,
4016
    REV INTEGER NOT NULL,
4017
    REVTYPE TINYINT,
4018
    CREATED TIMESTAMP,
4019
    UUID VARCHAR(36),
4020
    UPDATED TIMESTAMP,
4021
    LSID_AUTHORITY VARCHAR(255),
4022
    LSID_LSID VARCHAR(255),
4023
    LSID_NAMESPACE VARCHAR(255),
4024
    LSID_OBJECT VARCHAR(255),
4025
    LSID_REVISION VARCHAR(255),
4026
    PROTECTEDTITLECACHE BOOLEAN,
4027
    TITLECACHE VARCHAR(255),
4028
    APPENDEDPHRASE VARCHAR(255),
4029
    FULLTITLECACHE VARCHAR(330),
4030
    NOMENCLATURALMICROREFERENCE VARCHAR(255),
4031
    PARSINGPROBLEM INTEGER,
4032
    PROBLEMENDS INTEGER,
4033
    PROBLEMSTARTS INTEGER,
4034
    PROTECTEDFULLTITLECACHE BOOLEAN,
4035
    CREATEDBY_ID INTEGER,
4036
    UPDATEDBY_ID INTEGER,
4037
    HOMOTYPICALGROUP_ID INTEGER,
4038
    NOMENCLATURALREFERENCE_ID INTEGER,
4039
    RANK_ID INTEGER,
4040
    ACRONYM VARCHAR(255),
4041
    AUTHORSHIPCACHE VARCHAR(255),
4042
    BINOMHYBRID BOOLEAN,
4043
    GENUSORUNINOMIAL VARCHAR(255),
4044
    HYBRIDFORMULA BOOLEAN,
4045
    INFRAGENERICEPITHET VARCHAR(255),
4046
    INFRASPECIFICEPITHET VARCHAR(255),
4047
    MONOMHYBRID BOOLEAN,
4048
    NAMECACHE VARCHAR(255),
4049
    PROTECTEDAUTHORSHIPCACHE BOOLEAN,
4050
    PROTECTEDNAMECACHE BOOLEAN,
4051
    SPECIFICEPITHET VARCHAR(255),
4052
    TRINOMHYBRID BOOLEAN,
4053
    BASIONYMAUTHORTEAM_ID INTEGER,
4054
    COMBINATIONAUTHORTEAM_ID INTEGER,
4055
    EXBASIONYMAUTHORTEAM_ID INTEGER,
4056
    EXCOMBINATIONAUTHORTEAM_ID INTEGER,
4057
    ANAMORPHIC BOOLEAN,
4058
    CULTIVARNAME VARCHAR(255),
4059
    BREED VARCHAR(255),
4060
    ORIGINALPUBLICATIONYEAR INTEGER,
4061
    PUBLICATIONYEAR INTEGER,
4062
    NAMEAPPROBATION VARCHAR(255),
4063
    SUBGENUSAUTHORSHIP VARCHAR(255)
4064
);
4065
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_AUD;
4066
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION(
4067
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4068
    ANNOTATIONS_ID INTEGER NOT NULL
4069
);
4070
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ANNOTATION;
4071
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION_AUD(
4072
    REV INTEGER NOT NULL,
4073
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4074
    ANNOTATIONS_ID INTEGER NOT NULL,
4075
    REVTYPE TINYINT
4076
);
4077
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ANNOTATION_AUD;
4078
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_CREDIT(
4079
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4080
    CREDITS_ID INTEGER NOT NULL,
4081
    SORTINDEX INTEGER NOT NULL
4082
);
4083
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_CREDIT;
4084
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_CREDIT_AUD(
4085
    REV INTEGER NOT NULL,
4086
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4087
    CREDITS_ID INTEGER NOT NULL,
4088
    SORTINDEX INTEGER NOT NULL,
4089
    REVTYPE TINYINT
4090
);
4091
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_CREDIT_AUD;
4092
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_EXTENSION(
4093
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4094
    EXTENSIONS_ID INTEGER NOT NULL
4095
);
4096
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_EXTENSION;
4097
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_EXTENSION_AUD(
4098
    REV INTEGER NOT NULL,
4099
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4100
    EXTENSIONS_ID INTEGER NOT NULL,
4101
    REVTYPE TINYINT
4102
);
4103
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_EXTENSION_AUD;
4104
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_MARKER(
4105
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4106
    MARKERS_ID INTEGER NOT NULL
4107
);
4108
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_MARKER;
4109
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_MARKER_AUD(
4110
    REV INTEGER NOT NULL,
4111
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4112
    MARKERS_ID INTEGER NOT NULL,
4113
    REVTYPE TINYINT
4114
);
4115
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_MARKER_AUD;
4116
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS(
4117
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4118
    STATUS_ID INTEGER NOT NULL
4119
);
4120
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS;
4121
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS_AUD(
4122
    REV INTEGER NOT NULL,
4123
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4124
    STATUS_ID INTEGER NOT NULL,
4125
    REVTYPE TINYINT
4126
);
4127
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS_AUD;
4128
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE(
4129
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4130
    SOURCES_ID INTEGER NOT NULL
4131
);
4132
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE;
4133
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE_AUD(
4134
    REV INTEGER NOT NULL,
4135
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4136
    SOURCES_ID INTEGER NOT NULL,
4137
    REVTYPE TINYINT
4138
);
4139
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE_AUD;
4140
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_RIGHTS(
4141
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4142
    RIGHTS_ID INTEGER NOT NULL
4143
);
4144
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_RIGHTS;
4145
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_RIGHTS_AUD(
4146
    REV INTEGER NOT NULL,
4147
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4148
    RIGHTS_ID INTEGER NOT NULL,
4149
    REVTYPE TINYINT
4150
);
4151
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_RIGHTS_AUD;
4152
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE(
4153
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4154
    TYPEDESIGNATIONS_ID INTEGER NOT NULL
4155
);
4156
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE;
4157
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE_AUD(
4158
    REV INTEGER NOT NULL,
4159
    TAXONNAMEBASE_ID INTEGER NOT NULL,
4160
    TYPEDESIGNATIONS_ID INTEGER NOT NULL,
4161
    REVTYPE TINYINT
4162
);
4163
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE_AUD;
4164
CREATE CACHED TABLE PUBLIC.TAXONNODE(
4165
    ID INTEGER NOT NULL,
4166
    CREATED TIMESTAMP,
4167
    UUID VARCHAR(36),
4168
    UPDATED TIMESTAMP,
4169
    SORTINDEX INTEGER,
4170
    TREEINDEX VARCHAR(255),
4171
    COUNTCHILDREN INTEGER NOT NULL,
4172
    MICROREFERENCEFORPARENTCHILDRELATION VARCHAR(255),
4173
    CREATEDBY_ID INTEGER,
4174
    UPDATEDBY_ID INTEGER,
4175
    CLASSIFICATION_ID INTEGER,
4176
    PARENT_ID INTEGER,
4177
    REFERENCEFORPARENTCHILDRELATION_ID INTEGER,
4178
    SYNONYMTOBEUSED_ID INTEGER,
4179
    TAXON_ID INTEGER
4180
);
4181
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE;
4182
CREATE CACHED TABLE PUBLIC.TAXONNODE_AUD(
4183
    ID INTEGER NOT NULL,
4184
    REV INTEGER NOT NULL,
4185
    REVTYPE TINYINT,
4186
    CREATED TIMESTAMP,
4187
    UUID VARCHAR(36),
4188
    UPDATED TIMESTAMP,
4189
    SORTINDEX INTEGER,
4190
    TREEINDEX VARCHAR(255),
4191
    COUNTCHILDREN INTEGER,
4192
    MICROREFERENCEFORPARENTCHILDRELATION VARCHAR(255),
4193
    CREATEDBY_ID INTEGER,
4194
    UPDATEDBY_ID INTEGER,
4195
    CLASSIFICATION_ID INTEGER,
4196
    PARENT_ID INTEGER,
4197
    REFERENCEFORPARENTCHILDRELATION_ID INTEGER,
4198
    SYNONYMTOBEUSED_ID INTEGER,
4199
    TAXON_ID INTEGER
4200
);
4201
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_AUD;
4202
CREATE CACHED TABLE PUBLIC.TAXONNODE_ANNOTATION(
4203
    TAXONNODE_ID INTEGER NOT NULL,
4204
    ANNOTATIONS_ID INTEGER NOT NULL
4205
);
4206
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_ANNOTATION;
4207
CREATE CACHED TABLE PUBLIC.TAXONNODE_ANNOTATION_AUD(
4208
    REV INTEGER NOT NULL,
4209
    TAXONNODE_ID INTEGER NOT NULL,
4210
    ANNOTATIONS_ID INTEGER NOT NULL,
4211
    REVTYPE TINYINT
4212
);
4213
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_ANNOTATION_AUD;
4214
CREATE CACHED TABLE PUBLIC.TAXONNODE_MARKER(
4215
    TAXONNODE_ID INTEGER NOT NULL,
4216
    MARKERS_ID INTEGER NOT NULL
4217
);
4218
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_MARKER;
4219
CREATE CACHED TABLE PUBLIC.TAXONNODE_MARKER_AUD(
4220
    REV INTEGER NOT NULL,
4221
    TAXONNODE_ID INTEGER NOT NULL,
4222
    MARKERS_ID INTEGER NOT NULL,
4223
    REVTYPE TINYINT
4224
);
4225
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_MARKER_AUD;
4226
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP(
4227
    ID INTEGER NOT NULL,
4228
    CREATED TIMESTAMP,
4229
    UUID VARCHAR(36),
4230
    UPDATED TIMESTAMP,
4231
    CITATIONMICROREFERENCE VARCHAR(255),
4232
    ORIGINALNAMESTRING VARCHAR(255),
4233
    DOUBTFUL BOOLEAN NOT NULL,
4234
    CREATEDBY_ID INTEGER,
4235
    UPDATEDBY_ID INTEGER,
4236
    CITATION_ID INTEGER,
4237
    RELATEDFROM_ID INTEGER,
4238
    RELATEDTO_ID INTEGER,
4239
    TYPE_ID INTEGER
4240
);
4241
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP;
4242
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_AUD(
4243
    ID INTEGER NOT NULL,
4244
    REV INTEGER NOT NULL,
4245
    REVTYPE TINYINT,
4246
    CREATED TIMESTAMP,
4247
    UUID VARCHAR(36),
4248
    UPDATED TIMESTAMP,
4249
    CITATIONMICROREFERENCE VARCHAR(255),
4250
    ORIGINALNAMESTRING VARCHAR(255),
4251
    DOUBTFUL BOOLEAN,
4252
    CREATEDBY_ID INTEGER,
4253
    UPDATEDBY_ID INTEGER,
4254
    CITATION_ID INTEGER,
4255
    RELATEDFROM_ID INTEGER,
4256
    RELATEDTO_ID INTEGER,
4257
    TYPE_ID INTEGER
4258
);
4259
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_AUD;
4260
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION(
4261
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
4262
    ANNOTATIONS_ID INTEGER NOT NULL
4263
);
4264
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_ANNOTATION;
4265
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION_AUD(
4266
    REV INTEGER NOT NULL,
4267
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
4268
    ANNOTATIONS_ID INTEGER NOT NULL,
4269
    REVTYPE TINYINT
4270
);
4271
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_ANNOTATION_AUD;
4272
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_MARKER(
4273
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
4274
    MARKERS_ID INTEGER NOT NULL
4275
);
4276
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_MARKER;
4277
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_MARKER_AUD(
4278
    REV INTEGER NOT NULL,
4279
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
4280
    MARKERS_ID INTEGER NOT NULL,
4281
    REVTYPE TINYINT
4282
);
4283
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_MARKER_AUD;
4284
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY(
4285
    DTYPE VARCHAR(31) NOT NULL,
4286
    ID INTEGER NOT NULL,
4287
    CREATED TIMESTAMP,
4288
    UUID VARCHAR(36),
4289
    UPDATED TIMESTAMP,
4290
    TERMTYPE VARCHAR(4),
4291
    LSID_AUTHORITY VARCHAR(255),
4292
    LSID_LSID VARCHAR(255),
4293
    LSID_NAMESPACE VARCHAR(255),
4294
    LSID_OBJECT VARCHAR(255),
4295
    LSID_REVISION VARCHAR(255),
4296
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4297
    TITLECACHE VARCHAR(255),
4298
    URI CLOB,
4299
    TERMSOURCEURI CLOB,
4300
    CREATEDBY_ID INTEGER,
4301
    UPDATEDBY_ID INTEGER
4302
);
4303
-- 37 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY;
4304
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_AUD(
4305
    DTYPE VARCHAR(31) NOT NULL,
4306
    ID INTEGER NOT NULL,
4307
    REV INTEGER NOT NULL,
4308
    REVTYPE TINYINT,
4309
    CREATED TIMESTAMP,
4310
    UUID VARCHAR(36),
4311
    UPDATED TIMESTAMP,
4312
    TERMTYPE VARCHAR(4),
4313
    LSID_AUTHORITY VARCHAR(255),
4314
    LSID_LSID VARCHAR(255),
4315
    LSID_NAMESPACE VARCHAR(255),
4316
    LSID_OBJECT VARCHAR(255),
4317
    LSID_REVISION VARCHAR(255),
4318
    PROTECTEDTITLECACHE BOOLEAN,
4319
    TITLECACHE VARCHAR(255),
4320
    URI CLOB,
4321
    TERMSOURCEURI CLOB,
4322
    CREATEDBY_ID INTEGER,
4323
    UPDATEDBY_ID INTEGER
4324
);
4325
-- 37 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_AUD;
4326
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_ANNOTATION(
4327
    TERMVOCABULARY_ID INTEGER NOT NULL,
4328
    ANNOTATIONS_ID INTEGER NOT NULL
4329
);
4330
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_ANNOTATION;
4331
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_ANNOTATION_AUD(
4332
    REV INTEGER NOT NULL,
4333
    TERMVOCABULARY_ID INTEGER NOT NULL,
4334
    ANNOTATIONS_ID INTEGER NOT NULL,
4335
    REVTYPE TINYINT
4336
);
4337
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_ANNOTATION_AUD;
4338
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_CREDIT(
4339
    TERMVOCABULARY_ID INTEGER NOT NULL,
4340
    CREDITS_ID INTEGER NOT NULL,
4341
    SORTINDEX INTEGER NOT NULL
4342
);
4343
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_CREDIT;
4344
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_CREDIT_AUD(
4345
    REV INTEGER NOT NULL,
4346
    TERMVOCABULARY_ID INTEGER NOT