Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (367 KB)

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

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

    
10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
444

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

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

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

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

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

    
1333
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER(
1334
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1335
    IDENTIFIERS_ID INTEGER NOT NULL,
1336
    SORTINDEX INTEGER NOT NULL
1337
);
1338
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER;
1339
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD(
1340
    REV INTEGER NOT NULL,
1341
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1342
    IDENTIFIERS_ID INTEGER NOT NULL,
1343
    SORTINDEX INTEGER NOT NULL,
1344
    REVTYPE TINYINT
1345
);
1346
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD;
1347

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

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

    
1707
CREATE CACHED TABLE PUBLIC.ENTITYVALIDATION(
1708
    ID INTEGER NOT NULL,
1709
    UUID VARCHAR(36),
1710
    CREATED TIMESTAMP,
1711
    VALIDATEDENTITYID INTEGER,
1712
    VALIDATEDENTITYUUID VARCHAR(36),
1713
    VALIDATEDENTITYCLASS VARCHAR(255),
1714
    VALIDATIONCOUNT INTEGER,
1715
    UPDATED TIMESTAMP,
1716
    USERFRIENDLYDESCRIPTION VARCHAR(255),
1717
    USERFRIENDLYTYPENAME VARCHAR(255),
1718
    CREATEDBY_ID INTEGER,
1719
    UPDATEDBY_ID INTEGER,
1720
    CRUDEVENTTYPE VARCHAR(24),
1721
    STATUS VARCHAR(16)
1722
);
1723
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYVALIDATION;
1724

    
1725
CREATE CACHED TABLE PUBLIC.ENTITYCONSTRAINTVIOLATION(
1726
    ID INTEGER NOT NULL,
1727
    UUID VARCHAR(36),
1728
    CREATED TIMESTAMP,
1729
    PROPERTYPATH VARCHAR(255),
1730
    USERFRIENDLYFIELDNAME VARCHAR(255),
1731
    INVALIDVALUE VARCHAR(255),
1732
    SEVERITY VARCHAR(24),
1733
    MESSAGE VARCHAR(255),
1734
    VALIDATOR VARCHAR(255),
1735
    VALIDATIONGROUP VARCHAR(63),
1736
    CREATEDBY_ID INTEGER,
1737
    UPDATEDBY_ID INTEGER,
1738
    ENTITYVALIDATION_ID INTEGER
1739
);
1740
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYCONSTRAINTVIOLATION;
1741

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

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

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

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

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

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

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

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

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

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

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

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

    
3348

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

    
3664
CREATE TABLE SEQUENCE (
3665
    ID INTEGER NOT NULL,
3666
    CREATED TIMESTAMP,
3667
    UUID VARCHAR(36),
3668
    UPDATED TIMESTAMP,
3669
    BARCODESEQUENCEPART_LENGTH INTEGER,
3670
    BARCODESEQUENCEPART_STRING CLOB,
3671
    BOLDPROCESSID VARCHAR(255),
3672
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3673
    CONSENSUSSEQUENCE_STRING CLOB,
3674
    GENETICACCESSIONNUMBER VARCHAR(255),
3675
    HAPLOTYPE VARCHAR(255),
3676
    ISBARCODE BOOLEAN,
3677
    CREATEDBY_ID INTEGER,
3678
    UPDATEDBY_ID INTEGER,
3679
    CONTIGFILE_ID INTEGER,
3680
    DNASAMPLE_ID INTEGER,
3681
    DNAMARKER_ID INTEGER,
3682
    PRIMARY KEY (ID)
3683
);
3684
CREATE TABLE SEQUENCE_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
    BARCODESEQUENCEPART_LENGTH INTEGER,
3692
    BARCODESEQUENCEPART_STRING CLOB,
3693
    BOLDPROCESSID VARCHAR(255),
3694
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3695
    CONSENSUSSEQUENCE_STRING CLOB,
3696
    GENETICACCESSIONNUMBER VARCHAR(255),
3697
    HAPLOTYPE VARCHAR(255),
3698
    ISBARCODE BOOLEAN,
3699
    CREATEDBY_ID INTEGER,
3700
    UPDATEDBY_ID INTEGER,
3701
    CONTIGFILE_ID INTEGER,
3702
    DNASAMPLE_ID INTEGER,
3703
    DNAMARKER_ID INTEGER
3704
);
3705

    
3706
CREATE TABLE SEQUENCE_ANNOTATION (
3707
    SEQUENCE_ID INTEGER NOT NULL,
3708
    ANNOTATIONS_ID INTEGER NOT NULL,
3709
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3710
);
3711
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3712
    REV INTEGER NOT NULL,
3713
    REVTYPE TINYINT,
3714
    SEQUENCE_ID INTEGER NOT NULL,
3715
    ANNOTATIONS_ID INTEGER NOT NULL
3716
);
3717

    
3718
CREATE TABLE SEQUENCE_MARKER (
3719
    SEQUENCE_ID INTEGER NOT NULL,
3720
    MARKERS_ID INTEGER NOT NULL,
3721
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3722
);
3723
CREATE TABLE SEQUENCE_MARKER_AUD (
3724
    REV INTEGER NOT NULL,
3725
    REVTYPE TINYINT,
3726
    SEQUENCE_ID INTEGER NOT NULL,
3727
    MARKERS_ID INTEGER NOT NULL
3728
);
3729
CREATE TABLE SEQUENCE_REFERENCE (
3730
    SEQUENCE_ID INTEGER NOT NULL,
3731
    CITATIONS_ID INTEGER NOT NULL,
3732
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3733
);
3734
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3735
    REV INTEGER NOT NULL,
3736
    REVTYPE TINYINT,
3737
    SEQUENCE_ID INTEGER NOT NULL,
3738
    CITATIONS_ID INTEGER NOT NULL
3739
);
3740

    
3741
CREATE TABLE SINGLEREADALIGNMENT (
3742
    ID INTEGER NOT NULL,
3743
    CREATED TIMESTAMP,
3744
    UUID VARCHAR(36),
3745
    UPDATED TIMESTAMP,
3746
        EDITEDSEQUENCE CLOB,
3747
        SHIFTS CLOB,
3748
    REVERSECOMPLEMENT BIT,
3749
        FIRSTSEQPOSITION INTEGER,
3750
        LEFTCUTPOSITION INTEGER,
3751
        RIGHTCUTPOSITION INTEGER,
3752
        CREATEDBY_ID INTEGER,
3753
    UPDATEDBY_ID INTEGER,
3754
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3755
    SINGLEREAD_ID INTEGER NOT NULL,
3756
    PRIMARY KEY (ID)
3757
);
3758

    
3759
CREATE TABLE SINGLEREADALIGNMENT_AUD (
3760
    ID INTEGER NOT NULL,
3761
    REV INTEGER NOT NULL,
3762
    REVTYPE TINYINT,
3763
    CREATED TIMESTAMP,
3764
    UUID VARCHAR(36),
3765
    UPDATED TIMESTAMP,
3766
        EDITEDSEQUENCE CLOB,
3767
        SHIFTS CLOB,
3768
    REVERSECOMPLEMENT BIT,
3769
        FIRSTSEQPOSITION INTEGER,
3770
        LEFTCUTPOSITION INTEGER,
3771
        RIGHTCUTPOSITION INTEGER,
3772
        CREATEDBY_ID INTEGER,
3773
    UPDATEDBY_ID INTEGER,
3774
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3775
    SINGLEREAD_ID INTEGER NOT NULL
3776
);
3777

    
3778
CREATE TABLE SINGLEREAD (
3779
    ID INTEGER NOT NULL,
3780
    CREATED TIMESTAMP,
3781
    UUID VARCHAR(36),
3782
    UPDATED TIMESTAMP,
3783
    DESCRIPTION VARCHAR(255),
3784
    TIMEPERIOD_END VARCHAR(255),
3785
    TIMEPERIOD_FREETEXT VARCHAR(255),
3786
    TIMEPERIOD_START VARCHAR(255),
3787
    DIRECTION VARCHAR(3),
3788
    SEQUENCE_LENGTH INTEGER,
3789
    SEQUENCE_STRING CLOB,
3790
    CREATEDBY_ID INTEGER,
3791
    UPDATEDBY_ID INTEGER,
3792
    ACTOR_ID INTEGER,
3793
    AMPLIFICATIONRESULT_ID INTEGER,
3794
    MATERIALORMETHOD_ID INTEGER,
3795
    PHEROGRAM_ID INTEGER,
3796
    PRIMER_ID INTEGER,
3797
    PRIMARY KEY (ID)
3798
);
3799
CREATE TABLE SINGLEREAD_AUD (
3800
    ID INTEGER NOT NULL,
3801
    REV INTEGER NOT NULL,
3802
    REVTYPE TINYINT,
3803
    CREATED TIMESTAMP,
3804
    UUID VARCHAR(36),
3805
    UPDATED TIMESTAMP,
3806
    DESCRIPTION VARCHAR(255),
3807
    TIMEPERIOD_END VARCHAR(255),
3808
    TIMEPERIOD_FREETEXT VARCHAR(255),
3809
    TIMEPERIOD_START VARCHAR(255),
3810
    DIRECTION VARCHAR(3),
3811
    SEQUENCE_LENGTH INTEGER,
3812
    SEQUENCE_STRING CLOB,
3813
    CREATEDBY_ID INTEGER,
3814
    UPDATEDBY_ID INTEGER,
3815
    ACTOR_ID INTEGER,
3816
    AMPLIFICATIONRESULT_ID INTEGER,
3817
    MATERIALORMETHOD_ID INTEGER,
3818
    PHEROGRAM_ID INTEGER,
3819
    PRIMER_ID INTEGER
3820
);
3821

    
3822
CREATE TABLE SINGLEREAD_ANNOTATION (
3823
    SINGLEREAD_ID INTEGER NOT NULL,
3824
    ANNOTATIONS_ID INTEGER NOT NULL,
3825
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
3826
);
3827
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
3828
    REV INTEGER NOT NULL,
3829
    REVTYPE TINYINT,
3830
    SINGLEREAD_ID INTEGER NOT NULL,
3831
    ANNOTATIONS_ID INTEGER NOT NULL
3832
);
3833

    
3834
CREATE TABLE SINGLEREAD_MARKER (
3835
    SINGLEREAD_ID INTEGER NOT NULL,
3836
    MARKERS_ID INTEGER NOT NULL,
3837
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
3838
);
3839

    
3840
CREATE TABLE SINGLEREAD_MARKER_AUD (
3841
    REV INTEGER NOT NULL,
3842
    REVTYPE TINYINT,
3843
    SINGLEREAD_ID INTEGER NOT NULL,
3844
    MARKERS_ID INTEGER NOT NULL
3845
);
3846

    
3847

    
3848
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
3849
    DTYPE VARCHAR(31) NOT NULL,
3850
    ID INTEGER NOT NULL,
3851
    CREATED TIMESTAMP,
3852
    UUID VARCHAR(36),
3853
    UPDATED TIMESTAMP,
3854
    RECORDBASIS  VARCHAR(4) NOT NULL,
3855
    LSID_AUTHORITY VARCHAR(255),
3856
    LSID_LSID VARCHAR(255),
3857
    LSID_NAMESPACE VARCHAR(255),
3858
    LSID_OBJECT VARCHAR(255),
3859
    LSID_REVISION VARCHAR(255),
3860
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3861
    TITLECACHE VARCHAR(255),
3862
    PUBLISH BOOLEAN,
3863
    INDIVIDUALCOUNT INTEGER,
3864
        PREFERREDSTABLEURI CLOB,
3865
    ACCESSIONNUMBER VARCHAR(255),
3866
    BARCODE VARCHAR(255),
3867
    CATALOGNUMBER VARCHAR(255),
3868
    COLLECTORSNUMBER VARCHAR(255),
3869
    EXSICCATUM VARCHAR(255),
3870
    ORIGINALLABELINFO CLOB,
3871
    FIELDNOTES VARCHAR(255),
3872
    FIELDNUMBER VARCHAR(255),
3873
    CREATEDBY_ID INTEGER,
3874
    UPDATEDBY_ID INTEGER,
3875
    LIFESTAGE_ID INTEGER,
3876
    SEX_ID INTEGER,
3877
    KINDOFUNIT_ID INTEGER,
3878
    COLLECTION_ID INTEGER,
3879
    DERIVEDFROM_ID INTEGER,
3880
    STOREDUNDER_ID INTEGER,
3881
    PRESERVATION_ID INTEGER,
3882
    GATHERINGEVENT_ID INTEGER,
3883
    PRIMARYCOLLECTOR_ID INTEGER,
3884
    MEDIASPECIMEN_ID INTEGER,
3885
    DNAQUALITY_ID INTEGER
3886
);
3887
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
3888
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
3889
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
3890
    DTYPE VARCHAR(31) NOT NULL,
3891
    ID INTEGER NOT NULL,
3892
    REV INTEGER NOT NULL,
3893
    REVTYPE TINYINT,
3894
    CREATED TIMESTAMP,
3895
    UUID VARCHAR(36),
3896
    UPDATED TIMESTAMP,
3897
    RECORDBASIS  VARCHAR(4) NOT NULL,
3898
    LSID_AUTHORITY VARCHAR(255),
3899
    LSID_LSID VARCHAR(255),
3900
    LSID_NAMESPACE VARCHAR(255),
3901
    LSID_OBJECT VARCHAR(255),
3902
    LSID_REVISION VARCHAR(255),
3903
    PROTECTEDTITLECACHE BOOLEAN,
3904
    TITLECACHE VARCHAR(255),
3905
    PUBLISH BOOLEAN,
3906
    INDIVIDUALCOUNT INTEGER,
3907
    PREFERREDSTABLEURI CLOB,
3908
    ACCESSIONNUMBER VARCHAR(255),
3909
    BARCODE VARCHAR(255),
3910
    CATALOGNUMBER VARCHAR(255),
3911
    COLLECTORSNUMBER VARCHAR(255),
3912
    EXSICCATUM VARCHAR(255),
3913
    ORIGINALLABELINFO CLOB,
3914
    FIELDNOTES VARCHAR(255),
3915
    FIELDNUMBER VARCHAR(255),
3916
    CREATEDBY_ID INTEGER,
3917
    UPDATEDBY_ID INTEGER,
3918
    LIFESTAGE_ID INTEGER,
3919
    SEX_ID INTEGER,
3920
    KINDOFUNIT_ID INTEGER,
3921
    COLLECTION_ID INTEGER,
3922
    DERIVEDFROM_ID INTEGER,
3923
    STOREDUNDER_ID INTEGER,
3924
    PRESERVATION_ID INTEGER,
3925
    GATHERINGEVENT_ID INTEGER,
3926
    PRIMARYCOLLECTOR_ID INTEGER,
3927
    MEDIASPECIMEN_ID INTEGER,
3928
    DNAQUALITY_ID INTEGER
3929
);
3930
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
3931
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
3932
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3933
    ANNOTATIONS_ID INTEGER NOT NULL
3934
);
3935
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
3936
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
3937
    REV INTEGER NOT NULL,
3938
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3939
    ANNOTATIONS_ID INTEGER NOT NULL,
3940
    REVTYPE TINYINT
3941
);
3942
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
3943
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
3944
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3945
    CREDITS_ID INTEGER NOT NULL,
3946
    SORTINDEX INTEGER NOT NULL
3947
);
3948
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
3949
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
3950
    REV INTEGER NOT NULL,
3951
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3952
    CREDITS_ID INTEGER NOT NULL,
3953
    SORTINDEX INTEGER NOT NULL,
3954
    REVTYPE TINYINT
3955
);
3956
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
3957
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
3958
    ORIGINALS_ID INTEGER NOT NULL,
3959
    DERIVATIONEVENTS_ID INTEGER NOT NULL
3960
);
3961
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
3962
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
3963
    REV INTEGER NOT NULL,
3964
    ORIGINALS_ID INTEGER NOT NULL,
3965
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
3966
    REVTYPE TINYINT
3967
);
3968
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
3969
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
3970
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3971
    EXTENSIONS_ID INTEGER NOT NULL
3972
);
3973
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
3974
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
3975
    REV INTEGER NOT NULL,
3976
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3977
    EXTENSIONS_ID INTEGER NOT NULL,
3978
    REVTYPE TINYINT
3979
);
3980
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;
3981

    
3982
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
3983
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3984
    IDENTIFIERS_ID INTEGER NOT NULL,
3985
    SORTINDEX INTEGER NOT NULL
3986
);
3987
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
3988
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
3989
    REV INTEGER NOT NULL,
3990
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3991
    IDENTIFIERS_ID INTEGER NOT NULL,
3992
    SORTINDEX INTEGER NOT NULL,
3993
    REVTYPE TINYINT
3994
);
3995
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
3996

    
3997
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
3998
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3999
    DEFINITION_ID INTEGER NOT NULL,
4000
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
4001
);
4002
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
4003
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
4004
    REV INTEGER NOT NULL,
4005
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4006
    DEFINITION_ID INTEGER NOT NULL,
4007
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
4008
    REVTYPE TINYINT
4009
);
4010
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
4011
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
4012
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4013
    MARKERS_ID INTEGER NOT NULL
4014
);
4015
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
4016
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
4017
    REV INTEGER NOT NULL,
4018
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4019
    MARKERS_ID INTEGER NOT NULL,
4020
    REVTYPE TINYINT
4021
);
4022
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
4023
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
4024
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4025
    SOURCES_ID INTEGER NOT NULL
4026
);
4027
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
4028
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
4029
    REV INTEGER NOT NULL,
4030
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4031
    SOURCES_ID INTEGER NOT NULL,
4032
    REVTYPE TINYINT
4033
);
4034
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
4035
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO(
4036
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4037
    RIGHTS_ID INTEGER NOT NULL
4038
);
4039
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO;
4040
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD(
4041
    REV INTEGER NOT NULL,
4042
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4043
    RIGHTS_ID INTEGER NOT NULL,
4044
    REVTYPE TINYINT
4045
);
4046
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD;
4047

    
4048
CREATE CACHED TABLE PUBLIC.STATEDATA(
4049
    ID INTEGER NOT NULL,
4050
    CREATED TIMESTAMP,
4051
    UUID VARCHAR(36),
4052
    UPDATED TIMESTAMP,
4053
    CREATEDBY_ID INTEGER,
4054
    UPDATEDBY_ID INTEGER,
4055
        CATEGORICALDATA_ID INTEGER,
4056
    STATE_ID INTEGER
4057
);
4058
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA;
4059
CREATE CACHED TABLE PUBLIC.STATEDATA_AUD(
4060
    ID INTEGER NOT NULL,
4061
    REV INTEGER NOT NULL,
4062
    REVTYPE TINYINT,
4063
    CREATED TIMESTAMP,
4064
    UUID VARCHAR(36),
4065
    UPDATED TIMESTAMP,
4066
    CREATEDBY_ID INTEGER,
4067
    UPDATEDBY_ID INTEGER,
4068
        CATEGORICALDATA_ID INTEGER,
4069
    STATE_ID INTEGER
4070
);
4071
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_AUD;
4072
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE(
4073
    STATEDATA_ID INTEGER NOT NULL,
4074
    MODIFIERS_ID INTEGER NOT NULL
4075
);
4076
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE;
4077
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD(
4078
    REV INTEGER NOT NULL,
4079
    STATEDATA_ID INTEGER NOT NULL,
4080
    MODIFIERS_ID INTEGER NOT NULL,
4081
    REVTYPE TINYINT
4082
);
4083
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD;
4084
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING(
4085
    STATEDATA_ID INTEGER NOT NULL,
4086
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4087
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
4088
);
4089
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING;
4090
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD(
4091
    REV INTEGER NOT NULL,
4092
    STATEDATA_ID INTEGER NOT NULL,
4093
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4094
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
4095
    REVTYPE TINYINT
4096
);
4097
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING_AUD;
4098
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE(
4099
    ID INTEGER NOT NULL,
4100
    CREATED TIMESTAMP,
4101
    UUID VARCHAR(36),
4102
    UPDATED TIMESTAMP,
4103
    VALUE DOUBLE NOT NULL,
4104
    CREATEDBY_ID INTEGER,
4105
    UPDATEDBY_ID INTEGER,
4106
        QUANTITATIVEDATA_ID INTEGER,
4107
    TYPE_ID INTEGER
4108
);
4109
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE;
4110
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD(
4111
    ID INTEGER NOT NULL,
4112
    REV INTEGER NOT NULL,
4113
    REVTYPE TINYINT,
4114
    CREATED TIMESTAMP,
4115
    UUID VARCHAR(36),
4116
    UPDATED TIMESTAMP,
4117
    VALUE DOUBLE,
4118
    CREATEDBY_ID INTEGER,
4119
    UPDATEDBY_ID INTEGER,
4120
        QUANTITATIVEDATA_ID INTEGER,
4121
    TYPE_ID INTEGER
4122
);
4123
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_AUD;
4124
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE(
4125
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4126
    MODIFIERS_ID INTEGER NOT NULL
4127
);
4128
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE;
4129
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD(
4130
    REV INTEGER NOT NULL,
4131
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4132
    MODIFIERS_ID INTEGER NOT NULL,
4133
    REVTYPE TINYINT
4134
);
4135
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD;
4136
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP(
4137
    ID INTEGER NOT NULL,
4138
    CREATED TIMESTAMP,
4139
    UUID VARCHAR(36),
4140
    UPDATED TIMESTAMP,
4141
    CITATIONMICROREFERENCE VARCHAR(255),
4142
    ORIGINALNAMESTRING VARCHAR(255),
4143
    DOUBTFUL BOOLEAN NOT NULL,
4144
    PARTIAL BOOLEAN NOT NULL,
4145
    PROPARTE BOOLEAN NOT NULL,
4146
    CREATEDBY_ID INTEGER,
4147
    UPDATEDBY_ID INTEGER,
4148
    CITATION_ID INTEGER,
4149
    RELATEDFROM_ID INTEGER,
4150
    RELATEDTO_ID INTEGER,
4151
    TYPE_ID INTEGER
4152
);
4153
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP;
4154
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_AUD(
4155
    ID INTEGER NOT NULL,
4156
    REV INTEGER NOT NULL,
4157
    REVTYPE TINYINT,
4158
    CREATED TIMESTAMP,
4159
    UUID VARCHAR(36),
4160
    UPDATED TIMESTAMP,
4161
    CITATIONMICROREFERENCE VARCHAR(255),
4162
    ORIGINALNAMESTRING VARCHAR(255),
4163
    DOUBTFUL BOOLEAN,
4164
    PARTIAL BOOLEAN,
4165
    PROPARTE BOOLEAN,
4166
    CREATEDBY_ID INTEGER,
4167
    UPDATEDBY_ID INTEGER,
4168
    CITATION_ID INTEGER,
4169
    RELATEDFROM_ID INTEGER,
4170
    RELATEDTO_ID INTEGER,
4171
    TYPE_ID INTEGER
4172
);
4173
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_AUD;
4174
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION(
4175
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4176
    ANNOTATIONS_ID INTEGER NOT NULL
4177
);
4178
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION;
4179
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION_AUD(
4180
    REV INTEGER NOT NULL,
4181
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4182
    ANNOTATIONS_ID INTEGER NOT NULL,
4183
    REVTYPE TINYINT
4184
);
4185
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION_AUD;
4186
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_MARKER(
4187
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4188
    MARKERS_ID INTEGER NOT NULL
4189
);
4190
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_MARKER;
4191
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_MARKER_AUD(
4192
    REV INTEGER NOT NULL,
4193
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4194
    MARKERS_ID INTEGER NOT NULL,
4195
    REVTYPE TINYINT
4196
);
4197
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_MARKER_AUD;
4198
CREATE CACHED TABLE PUBLIC.TAXONBASE(
4199
    DTYPE VARCHAR(31) NOT NULL,
4200
    ID INTEGER NOT NULL,
4201
    CREATED TIMESTAMP,
4202
    UUID VARCHAR(36),
4203
    UPDATED TIMESTAMP,
4204
    LSID_AUTHORITY VARCHAR(255),
4205
    LSID_LSID VARCHAR(255),
4206
    LSID_NAMESPACE VARCHAR(255),
4207
    LSID_OBJECT VARCHAR(255),
4208
    LSID_REVISION VARCHAR(255),
4209
        SECMICROREFERENCE VARCHAR(255),
4210
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4211
    TITLECACHE VARCHAR(255),
4212
    APPENDEDPHRASE VARCHAR(255),
4213
    DOUBTFUL BOOLEAN NOT NULL,
4214
    PUBLISH BOOLEAN,
4215
    USENAMECACHE BOOLEAN NOT NULL,
4216
    EXCLUDED BOOLEAN,
4217
    TAXONSTATUSUNKNOWN BOOLEAN,
4218
    TAXONOMICCHILDRENCOUNT INTEGER,
4219
    UNPLACED BOOLEAN,
4220
    CREATEDBY_ID INTEGER,
4221
    UPDATEDBY_ID INTEGER,
4222
    NAME_ID INTEGER,
4223
    SEC_ID INTEGER,
4224
    TAXONOMICPARENTCACHE_ID INTEGER
4225
);
4226
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE;
4227
CREATE INDEX PUBLIC.TAXONBASETITLECACHEINDEX ON PUBLIC.TAXONBASE(TITLECACHE);
4228
CREATE CACHED TABLE PUBLIC.TAXONBASE_AUD(
4229
    DTYPE VARCHAR(31) NOT NULL,
4230
    ID INTEGER NOT NULL,
4231
    REV INTEGER NOT NULL,
4232
    REVTYPE TINYINT,
4233
    CREATED TIMESTAMP,
4234
    UUID VARCHAR(36),
4235
    UPDATED TIMESTAMP,
4236
    LSID_AUTHORITY VARCHAR(255),
4237
    LSID_LSID VARCHAR(255),
4238
    LSID_NAMESPACE VARCHAR(255),
4239
    LSID_OBJECT VARCHAR(255),
4240
    LSID_REVISION VARCHAR(255),
4241
    PROTECTEDTITLECACHE BOOLEAN,
4242
    TITLECACHE VARCHAR(255),
4243
    APPENDEDPHRASE VARCHAR(255),
4244
        SECMICROREFERENCE VARCHAR(255),
4245
    DOUBTFUL BOOLEAN,
4246
    PUBLISH BOOLEAN,
4247
    USENAMECACHE BOOLEAN,
4248
    CREATEDBY_ID INTEGER,
4249
    UPDATEDBY_ID INTEGER,
4250
    NAME_ID INTEGER,
4251
    SEC_ID INTEGER,
4252
    EXCLUDED BOOLEAN,
4253
    TAXONSTATUSUNKNOWN BOOLEAN,
4254
    TAXONOMICCHILDRENCOUNT INTEGER,
4255
    UNPLACED BOOLEAN,
4256
    TAXONOMICPARENTCACHE_ID INTEGER
4257
);
4258
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_AUD;
4259
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION(
4260
    TAXONBASE_ID INTEGER NOT NULL,
4261
    ANNOTATIONS_ID INTEGER NOT NULL
4262
);
4263
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION;
4264
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION_AUD(
4265
    REV INTEGER NOT NULL,
4266
    TAXONBASE_ID INTEGER NOT NULL,
4267
    ANNOTATIONS_ID INTEGER NOT NULL,
4268
    REVTYPE TINYINT
4269
);
4270
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION_AUD;
4271
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT(
4272
    TAXONBASE_ID INTEGER NOT NULL,
4273
    CREDITS_ID INTEGER NOT NULL,
4274
    SORTINDEX INTEGER NOT NULL
4275
);
4276
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT;
4277
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT_AUD(
4278
    REV INTEGER NOT NULL,
4279
    TAXONBASE_ID INTEGER NOT NULL,
4280
    CREDITS_ID INTEGER NOT NULL,
4281
    SORTINDEX INTEGER NOT NULL,
4282
    REVTYPE TINYINT
4283
);
4284
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT_AUD;
4285
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION(
4286
    TAXONBASE_ID INTEGER NOT NULL,
4287
    EXTENSIONS_ID INTEGER NOT NULL
4288
);
4289
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION;
4290
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION_AUD(
4291
    REV INTEGER NOT NULL,
4292
    TAXONBASE_ID INTEGER NOT NULL,
4293
    EXTENSIONS_ID INTEGER NOT NULL,
4294
    REVTYPE TINYINT
4295
);
4296
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION_AUD;
4297
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER(
4298
    TAXONBASE_ID INTEGER NOT NULL,
4299
    IDENTIFIERS_ID INTEGER NOT NULL,
4300
    SORTINDEX INTEGER NOT NULL
4301
);
4302
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER;
4303
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER_AUD(
4304
    REV INTEGER NOT NULL,
4305
    TAXONBASE_ID INTEGER NOT NULL,
4306
    IDENTIFIERS_ID INTEGER NOT NULL,
4307
    SORTINDEX INTEGER NOT NULL,
4308
    REVTYPE TINYINT
4309
);
4310
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER_AUD;
4311
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER(
4312
    TAXONBASE_ID INTEGER NOT NULL,
4313
    MARKERS_ID INTEGER NOT NULL
4314
);
4315
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER;
4316
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER_AUD(
4317
    REV INTEGER NOT NULL,
4318
    TAXONBASE_ID INTEGER NOT NULL,
4319
    MARKERS_ID INTEGER NOT NULL,
4320
    REVTYPE TINYINT
4321
);
4322
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER_AUD;
4323
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE(
4324
    TAXONBASE_ID INTEGER NOT NULL,
4325
    SOURCES_ID INTEGER NOT NULL
4326
);
4327
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE;
4328
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD(
4329
    REV INTEGER NOT NULL,
4330
    TAXONBASE_ID INTEGER NOT NULL,
4331
    SOURCES_ID INTEGER NOT NULL,
4332
    REVTYPE TINYINT
4333
);
4334
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD;
4335
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTSINFO(
4336
    TAXONBASE_ID INTEGER NOT NULL,
4337
    RIGHTS_ID INTEGER NOT NULL
4338
);
4339
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTSINFO;
4340
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTSINFO_AUD(
4341
    REV INTEGER NOT NULL,
4342
    TAXONBASE_ID INTEGER NOT NULL,
4343
    RIGHTS_ID INTEGER NOT NULL,
4344
    REVTYPE TINYINT
4345
);
4346
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTSINFO_AUD;
4347
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING(
4348
    TAXONINTERACTION_ID INTEGER NOT NULL,
4349
    DESCRIPTION_ID INTEGER NOT NULL,
4350
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
4351
);
4352
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONINTERACTION_LANGUAGESTRING;
4353
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD(
4354
    REV INTEGER NOT NULL,
4355
    TAXONINTERACTION_ID INTEGER NOT NULL,
4356
    DESCRIPTION_ID INTEGER NOT NULL,