Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (357 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 INTEGER,
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 INTEGER,
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 INTEGER,
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 INTEGER,
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
    ORDERRELEVANT BOOLEAN,
1350
    NAME VARCHAR(255),
1351
    CREATEDBY_ID INTEGER,
1352
    UPDATEDBY_ID INTEGER,
1353
    FEATURE_ID INTEGER,
1354
    INDESCRIPTION_ID INTEGER,
1355
    AREA_ID INTEGER,
1356
    LANGUAGE_ID INTEGER,
1357
    STATUS_ID INTEGER,
1358
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1359
    UNIT_ID INTEGER,
1360
    TAXON2_ID INTEGER,
1361
    FORMAT_ID INTEGER
1362
);
1363
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE;
1364
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD(
1365
    DTYPE VARCHAR(31) NOT NULL,
1366
    ID INTEGER NOT NULL,
1367
    REV INTEGER NOT NULL,
1368
    REVTYPE TINYINT,
1369
    CREATED TIMESTAMP,
1370
    UUID VARCHAR(36),
1371
    UPDATED TIMESTAMP,
1372
    CREATEDBY_ID INTEGER,
1373
    UPDATEDBY_ID INTEGER,
1374
    FEATURE_ID INTEGER,
1375
    INDESCRIPTION_ID INTEGER,
1376
    AREA_ID INTEGER,
1377
    STATUS_ID INTEGER,
1378
    TAXON2_ID INTEGER,
1379
    UNIT_ID INTEGER,
1380
    FORMAT_ID INTEGER,
1381
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1382
    NAME VARCHAR(255),
1383
    LANGUAGE_ID INTEGER,
1384
    ORDERRELEVANT BOOLEAN
1385
);
1386
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_AUD;
1387
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION(
1388
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1389
    ANNOTATIONS_ID INTEGER NOT NULL
1390
);
1391
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION;
1392
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD(
1393
    REV INTEGER NOT NULL,
1394
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1395
    ANNOTATIONS_ID INTEGER NOT NULL,
1396
    REVTYPE TINYINT
1397
);
1398
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD;
1399
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING(
1400
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1401
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1402
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL
1403
);
1404
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING;
1405
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD(
1406
    REV INTEGER NOT NULL,
1407
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1408
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1409
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL,
1410
    REVTYPE TINYINT
1411
);
1412
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD;
1413
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER(
1414
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1415
    MARKERS_ID INTEGER NOT NULL
1416
);
1417
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER;
1418
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD(
1419
    REV INTEGER NOT NULL,
1420
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1421
    MARKERS_ID INTEGER NOT NULL,
1422
    REVTYPE TINYINT
1423
);
1424
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD;
1425
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA(
1426
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1427
    MEDIA_ID INTEGER NOT NULL,
1428
    SORTINDEX INTEGER NOT NULL
1429
);
1430
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA;
1431
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD(
1432
    REV INTEGER NOT NULL,
1433
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1434
    MEDIA_ID INTEGER NOT NULL,
1435
    SORTINDEX INTEGER NOT NULL,
1436
    REVTYPE TINYINT
1437
);
1438
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD;
1439
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER(
1440
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1441
    MODIFIERS_ID INTEGER NOT NULL
1442
);
1443
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER;
1444
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD(
1445
    REV INTEGER NOT NULL,
1446
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1447
    MODIFIERS_ID INTEGER NOT NULL,
1448
    REVTYPE TINYINT
1449
);
1450
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD;
1451
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT(
1452
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1453
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1454
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
1455
);
1456
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT;
1457
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD(
1458
    REV INTEGER NOT NULL,
1459
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1460
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1461
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
1462
    REVTYPE TINYINT
1463
);
1464
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD;
1465
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE(
1466
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1467
    SOURCES_ID INTEGER NOT NULL
1468
);
1469
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE;
1470
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD(
1471
    REV INTEGER NOT NULL,
1472
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1473
    SOURCES_ID INTEGER NOT NULL,
1474
    REVTYPE TINYINT
1475
);
1476
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD;
1477
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA(
1478
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1479
    STATEDATA_ID INTEGER NOT NULL
1480
);
1481
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA;
1482
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA_AUD(
1483
    REV INTEGER NOT NULL,
1484
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1485
    STATEDATA_ID INTEGER NOT NULL,
1486
    REVTYPE TINYINT
1487
);
1488
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATEDATA_AUD;
1489
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE(
1490
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1491
    STATISTICALVALUES_ID INTEGER NOT NULL
1492
);
1493
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE;
1494
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE_AUD(
1495
    REV INTEGER NOT NULL,
1496
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1497
    STATISTICALVALUES_ID INTEGER NOT NULL,
1498
    REVTYPE TINYINT
1499
);
1500
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_STATISTICALMEASUREMENTVALUE_AUD;
1501
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT(
1502
    ID INTEGER NOT NULL,
1503
    CREATED TIMESTAMP,
1504
    UUID VARCHAR(36),
1505
    UPDATED TIMESTAMP,
1506
    DESCRIPTION VARCHAR(255),
1507
    TIMEPERIOD_END VARCHAR(255),
1508
    TIMEPERIOD_FREETEXT VARCHAR(255),
1509
    TIMEPERIOD_START VARCHAR(255),
1510
    PREFERREDFLAG BOOLEAN NOT NULL,
1511
    CREATEDBY_ID INTEGER,
1512
    UPDATEDBY_ID INTEGER,
1513
    ACTOR_ID INTEGER,
1514
    IDENTIFIEDUNIT_ID INTEGER,
1515
    MODIFIER_ID INTEGER,
1516
    TAXON_ID INTEGER
1517
);
1518
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT;
1519
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_AUD(
1520
    ID INTEGER NOT NULL,
1521
    REV INTEGER NOT NULL,
1522
    REVTYPE TINYINT,
1523
    CREATED TIMESTAMP,
1524
    UUID VARCHAR(36),
1525
    UPDATED TIMESTAMP,
1526
    DESCRIPTION VARCHAR(255),
1527
    TIMEPERIOD_END VARCHAR(255),
1528
    TIMEPERIOD_FREETEXT VARCHAR(255),
1529
    TIMEPERIOD_START VARCHAR(255),
1530
    PREFERREDFLAG BOOLEAN,
1531
    CREATEDBY_ID INTEGER,
1532
    UPDATEDBY_ID INTEGER,
1533
    ACTOR_ID INTEGER,
1534
    IDENTIFIEDUNIT_ID INTEGER,
1535
    MODIFIER_ID INTEGER,
1536
    TAXON_ID INTEGER
1537
);
1538
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_AUD;
1539
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION(
1540
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1541
    ANNOTATIONS_ID INTEGER NOT NULL
1542
);
1543
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION;
1544
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD(
1545
    REV INTEGER NOT NULL,
1546
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1547
    ANNOTATIONS_ID INTEGER NOT NULL,
1548
    REVTYPE TINYINT
1549
);
1550
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD;
1551
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER(
1552
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1553
    MARKERS_ID INTEGER NOT NULL
1554
);
1555
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER;
1556
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD(
1557
    REV INTEGER NOT NULL,
1558
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1559
    MARKERS_ID INTEGER NOT NULL,
1560
    REVTYPE TINYINT
1561
);
1562
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER_AUD;
1563
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE(
1564
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1565
    SETOFREFERENCES_ID INTEGER NOT NULL
1566
);
1567
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE;
1568
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD(
1569
    REV INTEGER NOT NULL,
1570
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1571
    SETOFREFERENCES_ID INTEGER NOT NULL,
1572
    REVTYPE TINYINT
1573
);
1574
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD;
1575
CREATE CACHED TABLE PUBLIC.EXTENSION(
1576
    ID INTEGER NOT NULL,
1577
    CREATED TIMESTAMP,
1578
    UUID VARCHAR(36),
1579
    UPDATED TIMESTAMP,
1580
    EXTENDEDOBJ_TYPE VARCHAR(255),
1581
    EXTENDEDOBJ_ID INTEGER NOT NULL,
1582
    VALUE CLOB,
1583
    CREATEDBY_ID INTEGER,
1584
    UPDATEDBY_ID INTEGER,
1585
    TYPE_ID INTEGER
1586
);
1587
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION;
1588
CREATE CACHED TABLE PUBLIC.EXTENSION_AUD(
1589
    ID INTEGER NOT NULL,
1590
    REV INTEGER NOT NULL,
1591
    REVTYPE TINYINT,
1592
    CREATED TIMESTAMP,
1593
    UUID VARCHAR(36),
1594
    UPDATED TIMESTAMP,
1595
    VALUE CLOB,
1596
    CREATEDBY_ID INTEGER,
1597
    UPDATEDBY_ID INTEGER,
1598
    TYPE_ID INTEGER
1599
);
1600
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION_AUD;
1601
CREATE CACHED TABLE PUBLIC.FEATURENODE(
1602
    ID INTEGER NOT NULL,
1603
    CREATED TIMESTAMP,
1604
    UUID VARCHAR(36),
1605
    UPDATED TIMESTAMP,
1606
    SORTINDEX INTEGER,
1607
    TREEINDEX VARCHAR(255),
1608
    CREATEDBY_ID INTEGER,
1609
    UPDATEDBY_ID INTEGER,
1610
    FEATURE_ID INTEGER,
1611
    FEATURETREE_ID INTEGER,
1612
    PARENT_ID INTEGER
1613
);
1614
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE;
1615
CREATE CACHED TABLE PUBLIC.FEATURENODE_AUD(
1616
    ID INTEGER NOT NULL,
1617
    REV INTEGER NOT NULL,
1618
    REVTYPE TINYINT,
1619
    CREATED TIMESTAMP,
1620
    UUID VARCHAR(36),
1621
    UPDATED TIMESTAMP,
1622
    SORTINDEX INTEGER,
1623
    TREEINDEX VARCHAR(255),
1624
    CREATEDBY_ID INTEGER,
1625
    UPDATEDBY_ID INTEGER,
1626
    FEATURE_ID INTEGER,
1627
    FEATURETREE_ID INTEGER,
1628
    PARENT_ID INTEGER
1629
);
1630
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_AUD;
1631
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF(
1632
    FEATURENODE_ID INTEGER NOT NULL,
1633
    INAPPLICABLEIF_ID INTEGER NOT NULL
1634
);
1635
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF;
1636
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD(
1637
    REV INTEGER NOT NULL,
1638
    FEATURENODE_ID INTEGER NOT NULL,
1639
    INAPPLICABLEIF_ID INTEGER NOT NULL,
1640
    REVTYPE TINYINT
1641
);
1642
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD;
1643
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE(
1644
    FEATURENODE_ID INTEGER NOT NULL,
1645
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL
1646
);
1647
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE;
1648
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD(
1649
    REV INTEGER NOT NULL,
1650
    FEATURENODE_ID INTEGER NOT NULL,
1651
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL,
1652
    REVTYPE TINYINT
1653
);
1654
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD;
1655
CREATE CACHED TABLE PUBLIC.FEATURETREE(
1656
    ID INTEGER NOT NULL,
1657
    CREATED TIMESTAMP,
1658
    UUID VARCHAR(36),
1659
    UPDATED TIMESTAMP,
1660
    LSID_AUTHORITY VARCHAR(255),
1661
    LSID_LSID VARCHAR(255),
1662
    LSID_NAMESPACE VARCHAR(255),
1663
    LSID_OBJECT VARCHAR(255),
1664
    LSID_REVISION VARCHAR(255),
1665
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
1666
    TITLECACHE VARCHAR(255),
1667
    URI CLOB,
1668
    DESCRIPTIONSEPARATED BOOLEAN NOT NULL,
1669
    CREATEDBY_ID INTEGER,
1670
    UPDATEDBY_ID INTEGER,
1671
    ROOT_ID INTEGER
1672
);
1673
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE;
1674
CREATE CACHED TABLE PUBLIC.FEATURETREE_AUD(
1675
    ID INTEGER NOT NULL,
1676
    REV INTEGER NOT NULL,
1677
    REVTYPE TINYINT,
1678
    CREATED TIMESTAMP,
1679
    UUID VARCHAR(36),
1680
    UPDATED TIMESTAMP,
1681
    LSID_AUTHORITY VARCHAR(255),
1682
    LSID_LSID VARCHAR(255),
1683
    LSID_NAMESPACE VARCHAR(255),
1684
    LSID_OBJECT VARCHAR(255),
1685
    LSID_REVISION VARCHAR(255),
1686
    PROTECTEDTITLECACHE BOOLEAN,
1687
    TITLECACHE VARCHAR(255),
1688
    URI CLOB,
1689
    DESCRIPTIONSEPARATED BOOLEAN,
1690
    CREATEDBY_ID INTEGER,
1691
    UPDATEDBY_ID INTEGER,
1692
    ROOT_ID INTEGER
1693
);
1694
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_AUD;
1695
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION(
1696
    FEATURETREE_ID INTEGER NOT NULL,
1697
    ANNOTATIONS_ID INTEGER NOT NULL
1698
);
1699
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION;
1700
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD(
1701
    REV INTEGER NOT NULL,
1702
    FEATURETREE_ID INTEGER NOT NULL,
1703
    ANNOTATIONS_ID INTEGER NOT NULL,
1704
    REVTYPE TINYINT
1705
);
1706
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION_AUD;
1707
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT(
1708
    FEATURETREE_ID INTEGER NOT NULL,
1709
    CREDITS_ID INTEGER NOT NULL,
1710
    SORTINDEX INTEGER NOT NULL
1711
);
1712
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT;
1713
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT_AUD(
1714
    REV INTEGER NOT NULL,
1715
    FEATURETREE_ID INTEGER NOT NULL,
1716
    CREDITS_ID INTEGER NOT NULL,
1717
    SORTINDEX INTEGER NOT NULL,
1718
    REVTYPE TINYINT
1719
);
1720
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT_AUD;
1721
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION(
1722
    FEATURETREE_ID INTEGER NOT NULL,
1723
    EXTENSIONS_ID INTEGER NOT NULL
1724
);
1725
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION;
1726
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION_AUD(
1727
    REV INTEGER NOT NULL,
1728
    FEATURETREE_ID INTEGER NOT NULL,
1729
    EXTENSIONS_ID INTEGER NOT NULL,
1730
    REVTYPE TINYINT
1731
);
1732
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION_AUD;
1733
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER(
1734
    FEATURETREE_ID INTEGER NOT NULL,
1735
    MARKERS_ID INTEGER NOT NULL
1736
);
1737
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER;
1738
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER_AUD(
1739
    REV INTEGER NOT NULL,
1740
    FEATURETREE_ID INTEGER NOT NULL,
1741
    MARKERS_ID INTEGER NOT NULL,
1742
    REVTYPE TINYINT
1743
);
1744
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER_AUD;
1745
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE(
1746
    FEATURETREE_ID INTEGER NOT NULL,
1747
    SOURCES_ID INTEGER NOT NULL
1748
);
1749
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE;
1750
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD(
1751
    REV INTEGER NOT NULL,
1752
    FEATURETREE_ID INTEGER NOT NULL,
1753
    SOURCES_ID INTEGER NOT NULL,
1754
    REVTYPE TINYINT
1755
);
1756
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD;
1757
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION(
1758
    FEATURETREE_ID INTEGER NOT NULL,
1759
    REPRESENTATIONS_ID INTEGER NOT NULL
1760
);
1761
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION;
1762
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD(
1763
    REV INTEGER NOT NULL,
1764
    FEATURETREE_ID INTEGER NOT NULL,
1765
    REPRESENTATIONS_ID INTEGER NOT NULL,
1766
    REVTYPE TINYINT
1767
);
1768
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION_AUD;
1769
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTS(
1770
    FEATURETREE_ID INTEGER NOT NULL,
1771
    RIGHTS_ID INTEGER NOT NULL
1772
);
1773
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTS;
1774
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTS_AUD(
1775
    REV INTEGER NOT NULL,
1776
    FEATURETREE_ID INTEGER NOT NULL,
1777
    RIGHTS_ID INTEGER NOT NULL,
1778
    REVTYPE TINYINT
1779
);
1780
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTS_AUD;
1781
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT(
1782
    ID INTEGER NOT NULL,
1783
    CREATED TIMESTAMP,
1784
    UUID VARCHAR(36),
1785
    UPDATED TIMESTAMP,
1786
    DESCRIPTION VARCHAR(255),
1787
    TIMEPERIOD_END VARCHAR(255),
1788
    TIMEPERIOD_FREETEXT VARCHAR(255),
1789
    TIMEPERIOD_START VARCHAR(255),
1790
    ABSOLUTEELEVATION INTEGER,
1791
    ABSOLUTEELEVATIONMAX INTEGER,
1792
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
1793
    COLLECTINGMETHOD VARCHAR(255),
1794
    DISTANCETOGROUND DOUBLE,
1795
    DISTANCETOGROUNDMAX DOUBLE,
1796
    DISTANCETOGROUNDTEXT VARCHAR(30),
1797
    DISTANCETOWATERSURFACE DOUBLE,
1798
    DISTANCETOWATERSURFACEMAX DOUBLE,
1799
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
1800
    EXACTLOCATION_ERRORRADIUS INTEGER,
1801
    EXACTLOCATION_LATITUDE DOUBLE,
1802
    EXACTLOCATION_LONGITUDE DOUBLE,
1803
    CREATEDBY_ID INTEGER,
1804
    UPDATEDBY_ID INTEGER,
1805
    ACTOR_ID INTEGER,
1806
    COUNTRY_ID INTEGER,
1807
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
1808
    LOCALITY_ID INTEGER
1809
);
1810
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT;
1811
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_AUD(
1812
    ID INTEGER NOT NULL,
1813
    REV INTEGER NOT NULL,
1814
    REVTYPE TINYINT,
1815
    CREATED TIMESTAMP,
1816
    UUID VARCHAR(36),
1817
    UPDATED TIMESTAMP,
1818
    DESCRIPTION VARCHAR(255),
1819
    TIMEPERIOD_END VARCHAR(255),
1820
    TIMEPERIOD_FREETEXT VARCHAR(255),
1821
    TIMEPERIOD_START VARCHAR(255),
1822
    ABSOLUTEELEVATION INTEGER,
1823
    ABSOLUTEELEVATIONMAX INTEGER,
1824
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
1825
    COLLECTINGMETHOD VARCHAR(255),
1826
    DISTANCETOGROUND DOUBLE,
1827
    DISTANCETOGROUNDMAX DOUBLE,
1828
    DISTANCETOGROUNDTEXT VARCHAR(30),
1829
    DISTANCETOWATERSURFACE DOUBLE,
1830
    DISTANCETOWATERSURFACEMAX DOUBLE,
1831
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
1832
    EXACTLOCATION_ERRORRADIUS INTEGER,
1833
    EXACTLOCATION_LATITUDE DOUBLE,
1834
    EXACTLOCATION_LONGITUDE DOUBLE,
1835
    CREATEDBY_ID INTEGER,
1836
    UPDATEDBY_ID INTEGER,
1837
    ACTOR_ID INTEGER,
1838
    COUNTRY_ID INTEGER,
1839
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
1840
    LOCALITY_ID INTEGER
1841
);
1842
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_AUD;
1843
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION(
1844
    GATHERINGEVENT_ID INTEGER NOT NULL,
1845
    ANNOTATIONS_ID INTEGER NOT NULL
1846
);
1847
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION;
1848
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD(
1849
    REV INTEGER NOT NULL,
1850
    GATHERINGEVENT_ID INTEGER NOT NULL,
1851
    ANNOTATIONS_ID INTEGER NOT NULL,
1852
    REVTYPE TINYINT
1853
);
1854
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION_AUD;
1855
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE(
1856
    GATHERINGEVENT_ID INTEGER NOT NULL,
1857
    COLLECTINGAREAS_ID INTEGER NOT NULL
1858
);
1859
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE;
1860
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD(
1861
    REV INTEGER NOT NULL,
1862
    GATHERINGEVENT_ID INTEGER NOT NULL,
1863
    COLLECTINGAREAS_ID INTEGER NOT NULL,
1864
    REVTYPE TINYINT
1865
);
1866
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD;
1867
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER(
1868
    GATHERINGEVENT_ID INTEGER NOT NULL,
1869
    MARKERS_ID INTEGER NOT NULL
1870
);
1871
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER;
1872
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD(
1873
    REV INTEGER NOT NULL,
1874
    GATHERINGEVENT_ID INTEGER NOT NULL,
1875
    MARKERS_ID INTEGER NOT NULL,
1876
    REVTYPE TINYINT
1877
);
1878
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER_AUD;
1879
CREATE CACHED TABLE PUBLIC.GRANTEDAUTHORITYIMPL(
1880
    ID INTEGER NOT NULL,
1881
    CREATED TIMESTAMP,
1882
    UUID VARCHAR(36),
1883
    AUTHORITY VARCHAR(255),
1884
    CREATEDBY_ID INTEGER
1885
);
1886
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GRANTEDAUTHORITYIMPL;
1887
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP(
1888
    ID INTEGER NOT NULL,
1889
    CREATED TIMESTAMP,
1890
    UUID VARCHAR(36),
1891
    UPDATED TIMESTAMP,
1892
    CREATEDBY_ID INTEGER,
1893
    UPDATEDBY_ID INTEGER
1894
);
1895
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP;
1896
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_AUD(
1897
    ID INTEGER NOT NULL,
1898
    REV INTEGER NOT NULL,
1899
    REVTYPE TINYINT,
1900
    CREATED TIMESTAMP,
1901
    UUID VARCHAR(36),
1902
    UPDATED TIMESTAMP,
1903
    CREATEDBY_ID INTEGER,
1904
    UPDATEDBY_ID INTEGER
1905
);
1906
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_AUD;
1907
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION(
1908
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1909
    ANNOTATIONS_ID INTEGER NOT NULL
1910
);
1911
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION;
1912
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD(
1913
    REV INTEGER NOT NULL,
1914
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1915
    ANNOTATIONS_ID INTEGER NOT NULL,
1916
    REVTYPE TINYINT
1917
);
1918
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD;
1919
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER(
1920
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1921
    MARKERS_ID INTEGER NOT NULL
1922
);
1923
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER;
1924
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD(
1925
    REV INTEGER NOT NULL,
1926
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
1927
    MARKERS_ID INTEGER NOT NULL,
1928
    REVTYPE TINYINT
1929
);
1930
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER_AUD;
1931
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP(
1932
    ID INTEGER NOT NULL,
1933
    CREATED TIMESTAMP,
1934
    UUID VARCHAR(36),
1935
    UPDATED TIMESTAMP,
1936
    CITATIONMICROREFERENCE VARCHAR(255),
1937
    ORIGINALNAMESTRING VARCHAR(255),
1938
    DOUBTFUL BOOLEAN NOT NULL,
1939
    RULECONSIDERED VARCHAR(255),
1940
    CREATEDBY_ID INTEGER,
1941
    UPDATEDBY_ID INTEGER,
1942
    CITATION_ID INTEGER,
1943
    RELATEDFROM_ID INTEGER,
1944
    RELATEDTO_ID INTEGER,
1945
    TYPE_ID INTEGER
1946
);
1947
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP;
1948
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD(
1949
    ID INTEGER NOT NULL,
1950
    REV INTEGER NOT NULL,
1951
    REVTYPE TINYINT,
1952
    CREATED TIMESTAMP,
1953
    UUID VARCHAR(36),
1954
    UPDATED TIMESTAMP,
1955
    CITATIONMICROREFERENCE VARCHAR(255),
1956
    ORIGINALNAMESTRING VARCHAR(255),
1957
    DOUBTFUL BOOLEAN,
1958
    RULECONSIDERED VARCHAR(255),
1959
    CREATEDBY_ID INTEGER,
1960
    UPDATEDBY_ID INTEGER,
1961
    CITATION_ID INTEGER,
1962
    RELATEDFROM_ID INTEGER,
1963
    RELATEDTO_ID INTEGER,
1964
    TYPE_ID INTEGER
1965
);
1966
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_AUD;
1967
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION(
1968
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1969
    ANNOTATIONS_ID INTEGER NOT NULL
1970
);
1971
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION;
1972
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD(
1973
    REV INTEGER NOT NULL,
1974
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1975
    ANNOTATIONS_ID INTEGER NOT NULL,
1976
    REVTYPE TINYINT
1977
);
1978
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD;
1979
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER(
1980
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1981
    MARKERS_ID INTEGER NOT NULL
1982
);
1983
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER;
1984
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD(
1985
    REV INTEGER NOT NULL,
1986
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
1987
    MARKERS_ID INTEGER NOT NULL,
1988
    REVTYPE TINYINT
1989
);
1990
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD;
1991
CREATE CACHED TABLE PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING(
1992
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1993
    DESCRIPTION_ID INTEGER NOT NULL,
1994
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
1995
);
1996
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING;
1997
CREATE CACHED TABLE PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING_AUD(
1998
    REV INTEGER NOT NULL,
1999
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
2000
    DESCRIPTION_ID INTEGER NOT NULL,
2001
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2002
    REVTYPE TINYINT
2003
);
2004
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALASSOCIATION_LANGUAGESTRING_AUD;
2005
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP(
2006
    ID INTEGER NOT NULL,
2007
    CREATED TIMESTAMP,
2008
    UUID VARCHAR(36),
2009
    UPDATED TIMESTAMP,
2010
    DEPARTMENT VARCHAR(255),
2011
    PERIOD_END VARCHAR(255),
2012
    PERIOD_FREETEXT VARCHAR(255),
2013
    PERIOD_START VARCHAR(255),
2014
    ROLE VARCHAR(255),
2015
    CREATEDBY_ID INTEGER,
2016
    UPDATEDBY_ID INTEGER,
2017
    INSTITUTE_ID INTEGER,
2018
    PERSON_ID INTEGER
2019
);
2020
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP;
2021
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD(
2022
    ID INTEGER NOT NULL,
2023
    REV INTEGER NOT NULL,
2024
    REVTYPE TINYINT,
2025
    CREATED TIMESTAMP,
2026
    UUID VARCHAR(36),
2027
    UPDATED TIMESTAMP,
2028
    DEPARTMENT VARCHAR(255),
2029
    PERIOD_END VARCHAR(255),
2030
    PERIOD_FREETEXT VARCHAR(255),
2031
    PERIOD_START VARCHAR(255),
2032
    ROLE VARCHAR(255),
2033
    CREATEDBY_ID INTEGER,
2034
    UPDATEDBY_ID INTEGER,
2035
    INSTITUTE_ID INTEGER,
2036
    PERSON_ID INTEGER
2037
);
2038
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP_AUD;
2039
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT(
2040
    ID INTEGER NOT NULL,
2041
    CREATED TIMESTAMP,
2042
    UUID VARCHAR(36),
2043
    UPDATED TIMESTAMP,
2044
    CREATEDBY_ID INTEGER,
2045
    UPDATEDBY_ID INTEGER
2046
);
2047
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT;
2048
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_AUD(
2049
    ID INTEGER NOT NULL,
2050
    REV INTEGER NOT NULL,
2051
    REVTYPE TINYINT,
2052
    CREATED TIMESTAMP,
2053
    UUID VARCHAR(36),
2054
    UPDATED TIMESTAMP,
2055
    CREATEDBY_ID INTEGER,
2056
    UPDATEDBY_ID INTEGER
2057
);
2058
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_AUD;
2059
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING(
2060
    KEYSTATEMENT_ID INTEGER NOT NULL,
2061
    LABEL_ID INTEGER NOT NULL,
2062
    LABEL_MAPKEY_ID INTEGER NOT NULL
2063
);
2064
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING;
2065
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD(
2066
    REV INTEGER NOT NULL,
2067
    KEYSTATEMENT_ID INTEGER NOT NULL,
2068
    LABEL_ID INTEGER NOT NULL,
2069
    LABEL_MAPKEY_ID INTEGER NOT NULL,
2070
    REVTYPE TINYINT
2071
);
2072
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD;
2073
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY(
2074
    ID INTEGER NOT NULL,
2075
    CREATED TIMESTAMP,
2076
    UUID VARCHAR(36),
2077
    AUTHORITY VARCHAR(255),
2078
    AUTHORITYWSDL CLOB,
2079
    PORT INTEGER NOT NULL,
2080
    SERVER VARCHAR(255),
2081
    URL VARCHAR(255),
2082
    CREATEDBY_ID INTEGER
2083
);
2084
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY;
2085
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES(
2086
    LSIDAUTHORITY_ID INTEGER NOT NULL,
2087
    NAMESPACES_ELEMENT VARCHAR(255),
2088
    NAMESPACES_MAPKEY VARCHAR(255) NOT NULL
2089
);
2090
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY_NAMESPACES;
2091
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING(
2092
    ID INTEGER NOT NULL,
2093
    CREATED TIMESTAMP,
2094
    UUID VARCHAR(36),
2095
    UPDATED TIMESTAMP,
2096
    TEXT CLOB,
2097
    CREATEDBY_ID INTEGER,
2098
    UPDATEDBY_ID INTEGER,
2099
    LANGUAGE_ID INTEGER
2100
);
2101
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING;
2102
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_AUD(
2103
    ID INTEGER NOT NULL,
2104
    REV INTEGER NOT NULL,
2105
    REVTYPE TINYINT,
2106
    CREATED TIMESTAMP,
2107
    UUID VARCHAR(36),
2108
    UPDATED TIMESTAMP,
2109
    TEXT CLOB,
2110
    CREATEDBY_ID INTEGER,
2111
    UPDATEDBY_ID INTEGER,
2112
    LANGUAGE_ID INTEGER
2113
);
2114
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_AUD;
2115
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION(
2116
    LANGUAGESTRING_ID INTEGER NOT NULL,
2117
    ANNOTATIONS_ID INTEGER NOT NULL
2118
);
2119
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION;
2120
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD(
2121
    REV INTEGER NOT NULL,
2122
    LANGUAGESTRING_ID INTEGER NOT NULL,
2123
    ANNOTATIONS_ID INTEGER NOT NULL,
2124
    REVTYPE TINYINT
2125
);
2126
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION_AUD;
2127
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER(
2128
    LANGUAGESTRING_ID INTEGER NOT NULL,
2129
    MARKERS_ID INTEGER NOT NULL
2130
);
2131
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER;
2132
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD(
2133
    REV INTEGER NOT NULL,
2134
    LANGUAGESTRING_ID INTEGER NOT NULL,
2135
    MARKERS_ID INTEGER NOT NULL,
2136
    REVTYPE TINYINT
2137
);
2138
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER_AUD;
2139
CREATE CACHED TABLE PUBLIC.LOCUS(
2140
    ID INTEGER NOT NULL,
2141
    CREATED TIMESTAMP,
2142
    UUID VARCHAR(36),
2143
    UPDATED TIMESTAMP,
2144
    DESCRIPTION VARCHAR(255),
2145
    NAME VARCHAR(255),
2146
    CREATEDBY_ID INTEGER,
2147
    UPDATEDBY_ID INTEGER
2148
);
2149
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS;
2150
CREATE CACHED TABLE PUBLIC.LOCUS_AUD(
2151
    ID INTEGER NOT NULL,
2152
    REV INTEGER NOT NULL,
2153
    REVTYPE TINYINT,
2154
    CREATED TIMESTAMP,
2155
    UUID VARCHAR(36),
2156
    UPDATED TIMESTAMP,
2157
    DESCRIPTION VARCHAR(255),
2158
    NAME VARCHAR(255),
2159
    CREATEDBY_ID INTEGER,
2160
    UPDATEDBY_ID INTEGER
2161
);
2162
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS_AUD;
2163
CREATE CACHED TABLE PUBLIC.MARKER(
2164
    ID INTEGER NOT NULL,
2165
    CREATED TIMESTAMP,
2166
    UUID VARCHAR(36),
2167
    UPDATED TIMESTAMP,
2168
    FLAG BOOLEAN NOT NULL,
2169
    MARKEDOBJ_TYPE VARCHAR(255),
2170
    MARKEDOBJ_ID INTEGER NOT NULL,
2171
    CREATEDBY_ID INTEGER,
2172
    UPDATEDBY_ID INTEGER,
2173
    MARKERTYPE_ID INTEGER
2174
);
2175
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER;
2176
CREATE CACHED TABLE PUBLIC.MARKER_AUD(
2177
    ID INTEGER NOT NULL,
2178
    REV INTEGER NOT NULL,
2179
    REVTYPE TINYINT,
2180
    CREATED TIMESTAMP,
2181
    UUID VARCHAR(36),
2182
    UPDATED TIMESTAMP,
2183
    FLAG BOOLEAN,
2184
    CREATEDBY_ID INTEGER,
2185
    UPDATEDBY_ID INTEGER,
2186
    MARKERTYPE_ID INTEGER
2187
);
2188

    
2189
CREATE TABLE MATERIALANDMETHOD (
2190
    ID INTEGER NOT NULL,
2191
    CREATED TIMESTAMP,
2192
    UUID VARCHAR(36),
2193
    UPDATED TIMESTAMP,
2194
    MATERIALMETHODTERM BINARY(255),
2195
    MATERIALMETHODTEXT VARCHAR(255),
2196
    CREATEDBY_ID INTEGER,
2197
    UPDATEDBY_ID INTEGER,
2198
    PRIMARY KEY (ID)
2199
);
2200

    
2201
CREATE TABLE MATERIALANDMETHOD_AUD (
2202
    ID INTEGER NOT NULL,
2203
    CREATED TIMESTAMP,
2204
    UUID VARCHAR(36),
2205
    UPDATED TIMESTAMP,
2206
    MATERIALMETHODTERM BINARY(255),
2207
    MATERIALMETHODTEXT VARCHAR(255),
2208
    CREATEDBY_ID INTEGER,
2209
    UPDATEDBY_ID INTEGER,
2210
);
2211

    
2212
CREATE TABLE MATERIALANDMETHOD_ANNOTATION (
2213
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2214
    ANNOTATIONS_ID INTEGER NOT NULL,
2215
    PRIMARY KEY (MATERIALANDMETHOD_ID, ANNOTATIONS_ID)
2216
);
2217

    
2218
CREATE TABLE MATERIALANDMETHOD_ANNOTATION_AUD (
2219
    REV INTEGER NOT NULL,
2220
    REVTYPE TINYINT,
2221
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2222
    ANNOTATIONS_ID INTEGER NOT NULL,
2223
);
2224

    
2225
CREATE TABLE MATERIALANDMETHOD_MARKER (
2226
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2227
    MARKERS_ID INTEGER NOT NULL,
2228
    PRIMARY KEY (MATERIALANDMETHOD_ID, MARKERS_ID)
2229
);
2230

    
2231
CREATE TABLE MATERIALANDMETHOD_MARKER_AUD (
2232
    REV INTEGER NOT NULL,
2233
    REVTYPE TINYINT,
2234
    MATERIALANDMETHOD_ID INTEGER NOT NULL,
2235
    MARKERS_ID INTEGER NOT NULL,
2236
);
2237

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

    
2966
CREATE TABLE PRIMER (
2967
    ID INTEGER NOT NULL,
2968
    CREATED TIMESTAMP,
2969
    UUID VARCHAR(36),
2970
    UPDATED TIMESTAMP,
2971
    LABEL VARCHAR(255),
2972
    CREATEDBY_ID INTEGER,
2973
    UPDATEDBY_ID INTEGER,
2974
    PUBLISHEDIN_ID INTEGER,
2975
    SEQUENCE_ID INTEGER,
2976
    PRIMARY KEY (ID)
2977
);
2978
CREATE TABLE PRIMER_AUD (
2979
    ID INTEGER NOT NULL,
2980
    CREATED TIMESTAMP,
2981
    UUID VARCHAR(36),
2982
    UPDATED TIMESTAMP,
2983
    LABEL VARCHAR(255),
2984
    CREATEDBY_ID INTEGER,
2985
    UPDATEDBY_ID INTEGER,
2986
    PUBLISHEDIN_ID INTEGER,
2987
    SEQUENCE_ID INTEGER
2988
);
2989

    
2990
CREATE TABLE PRIMER_ANNOTATION (
2991
    PRIMER_ID INTEGER NOT NULL,
2992
    ANNOTATIONS_ID INTEGER NOT NULL,
2993
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
2994
);
2995
CREATE TABLE PRIMER_ANNOTATION_AUD (
2996
    PRIMER_ID INTEGER NOT NULL,
2997
    ANNOTATIONS_ID INTEGER NOT NULL
2998
);
2999

    
3000
CREATE TABLE PRIMER_MARKER (
3001
    PRIMER_ID INTEGER NOT NULL,
3002
    MARKERS_ID INTEGER NOT NULL,
3003
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3004
);
3005
CREATE TABLE PRIMER_MARKER_AUD (
3006
    PRIMER_ID INTEGER NOT NULL,
3007
    MARKERS_ID INTEGER NOT NULL
3008
);
3009

    
3010

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

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

    
3356
CREATE TABLE SEQUENCE_ANNOTATION (
3357
    SEQUENCE_ID INTEGER NOT NULL,
3358
    ANNOTATIONS_ID INTEGER NOT NULL,
3359
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3360
);
3361
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3362
    REV INTEGER NOT NULL,
3363
    REVTYPE TINYINT,
3364
    SEQUENCE_ID INTEGER NOT NULL,
3365
    ANNOTATIONS_ID INTEGER NOT NULL
3366
);
3367

    
3368
CREATE TABLE SEQUENCE_MARKER (
3369
    SEQUENCE_ID INTEGER NOT NULL,
3370
    MARKERS_ID INTEGER NOT NULL,
3371
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3372
);
3373
CREATE TABLE SEQUENCE_MARKER_AUD (
3374
    REV INTEGER NOT NULL,
3375
    REVTYPE TINYINT,
3376
    SEQUENCE_ID INTEGER NOT NULL,
3377
    MARKERS_ID INTEGER NOT NULL
3378
);
3379
CREATE TABLE SEQUENCE_REFERENCE (
3380
    SEQUENCE_ID INTEGER NOT NULL,
3381
    CITATIONS_ID INTEGER NOT NULL,
3382
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3383
);
3384
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3385
    REV INTEGER NOT NULL,
3386
    REVTYPE TINYINT,
3387
    SEQUENCE_ID INTEGER NOT NULL,
3388
    CITATIONS_ID INTEGER NOT NULL
3389
);
3390

    
3391
CREATE TABLE SEQUENCE_SINGLESEQUENCE (
3392
    SEQUENCE_ID INTEGER NOT NULL,
3393
    SINGLESEQUENCES_ID INTEGER NOT NULL,
3394
    PRIMARY KEY (SEQUENCE_ID, SINGLESEQUENCES_ID)
3395
);
3396
CREATE TABLE SEQUENCE_SINGLESEQUENCE_AUD (
3397
    REV INTEGER NOT NULL,
3398
    REVTYPE TINYINT,
3399
    SEQUENCE_ID INTEGER NOT NULL,
3400
    SINGLESEQUENCES_ID INTEGER NOT NULL
3401
);
3402

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

    
3447
CREATE TABLE SINGLESEQUENCE_ANNOTATION (
3448
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3449
    ANNOTATIONS_ID INTEGER NOT NULL,
3450
    PRIMARY KEY (SINGLESEQUENCE_ID, ANNOTATIONS_ID)
3451
);
3452
CREATE TABLE SINGLESEQUENCE_ANNOTATION_AUD (
3453
    REV INTEGER NOT NULL,
3454
    REVTYPE TINYINT,
3455
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3456
    ANNOTATIONS_ID INTEGER NOT NULL
3457
);
3458

    
3459
CREATE TABLE SINGLESEQUENCE_MARKER (
3460
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3461
    MARKERS_ID INTEGER NOT NULL,
3462
    PRIMARY KEY (SINGLESEQUENCE_ID, MARKERS_ID)
3463
);
3464

    
3465
CREATE TABLE SINGLESEQUENCE_MARKER_AUD (
3466
    REV INTEGER NOT NULL,
3467
    REVTYPE TINYINT,
3468
    SINGLESEQUENCE_ID INTEGER NOT NULL,
3469
    MARKERS_ID INTEGER NOT NULL
3470
);
3471

    
3472

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