Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (372 KB)

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

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

    
10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
446

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

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

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

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

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

    
1346
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER(
1347
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1348
    IDENTIFIERS_ID INTEGER NOT NULL,
1349
    SORTINDEX INTEGER NOT NULL
1350
);
1351
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER;
1352
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD(
1353
    REV INTEGER NOT NULL,
1354
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1355
    IDENTIFIERS_ID INTEGER NOT NULL,
1356
    SORTINDEX INTEGER NOT NULL,
1357
    REVTYPE TINYINT
1358
);
1359
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD;
1360

    
1361
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE(
1362
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1363
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL
1364
);
1365
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE;
1366
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD(
1367
    REV INTEGER NOT NULL,
1368
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1369
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL,
1370
    REVTYPE TINYINT
1371
);
1372
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE_AUD;
1373
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE(
1374
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1375
    GEOSCOPES_ID INTEGER NOT NULL
1376
);
1377
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE;
1378
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD(
1379
    REV INTEGER NOT NULL,
1380
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1381
    GEOSCOPES_ID INTEGER NOT NULL,
1382
    REVTYPE TINYINT
1383
);
1384
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD;
1385
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER(
1386
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1387
    MARKERS_ID INTEGER NOT NULL
1388
);
1389
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER;
1390
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD(
1391
    REV INTEGER NOT NULL,
1392
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1393
    MARKERS_ID INTEGER NOT NULL,
1394
    REVTYPE TINYINT
1395
);
1396
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER_AUD;
1397
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE(
1398
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1399
    SOURCES_ID INTEGER NOT NULL
1400
);
1401
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE;
1402
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD(
1403
    REV INTEGER NOT NULL,
1404
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1405
    SOURCES_ID INTEGER NOT NULL,
1406
    REVTYPE TINYINT
1407
);
1408
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD;
1409
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE(
1410
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1411
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL
1412
);
1413
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE;
1414
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD(
1415
    REV INTEGER NOT NULL,
1416
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1417
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL,
1418
    REVTYPE TINYINT
1419
);
1420
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD;
1421
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO(
1422
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1423
    RIGHTS_ID INTEGER NOT NULL
1424
);
1425
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO;
1426
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD(
1427
    REV INTEGER NOT NULL,
1428
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1429
    RIGHTS_ID INTEGER NOT NULL,
1430
    REVTYPE TINYINT
1431
);
1432
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD;
1433
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE(
1434
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1435
    SCOPES_ID INTEGER NOT NULL
1436
);
1437
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE;
1438
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD(
1439
    REV INTEGER NOT NULL,
1440
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1441
    SCOPES_ID INTEGER NOT NULL,
1442
    REVTYPE TINYINT
1443
);
1444
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE_AUD;
1445
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE(
1446
    DTYPE VARCHAR(31) NOT NULL,
1447
    ID INTEGER NOT NULL,
1448
    CREATED TIMESTAMP,
1449
    UUID VARCHAR(36),
1450
    UPDATED TIMESTAMP,
1451
    NAME VARCHAR(255),
1452
    TIMEPERIOD_START VARCHAR(255),
1453
    TIMEPERIOD_END VARCHAR(255),
1454
    TIMEPERIOD_FREETEXT VARCHAR(255),
1455
    ORDERRELEVANT BOOLEAN,
1456
--  MINIMUM DOUBLE,
1457
--        MAXIMUM DOUBLE,
1458
--        AVERAGE DOUBLE,
1459
--        TYPCALLOWERBOUNDARY DOUBLE,
1460
--        TYPCALHIGHERBOUNDARY DOUBLE,
1461
--        VARIANCE DOUBLE,
1462
--        STANDARDDEVIATION DOUBLE,
1463
--        SINGLEVALUE DOUBLE,
1464
--        SAMPLESIZE INTEGER,
1465
        UNKNOWNDATA BOOLEAN,
1466
        SORTINDEX INTEGER,
1467
    CREATEDBY_ID INTEGER,
1468
    UPDATEDBY_ID INTEGER,
1469
    FEATURE_ID INTEGER,
1470
    INDESCRIPTION_ID INTEGER,
1471
    AREA_ID INTEGER,
1472
    LANGUAGE_ID INTEGER,
1473
    STATUS_ID INTEGER,
1474
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1475
    UNIT_ID INTEGER,
1476
    TAXON2_ID INTEGER,
1477
    FORMAT_ID INTEGER,
1478
        
1479
);
1480
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE;
1481
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD(
1482
    DTYPE VARCHAR(31) NOT NULL,
1483
    ID INTEGER NOT NULL,
1484
    REV INTEGER NOT NULL,
1485
    REVTYPE TINYINT,
1486
    CREATED TIMESTAMP,
1487
    UUID VARCHAR(36),
1488
    UPDATED TIMESTAMP,
1489
    NAME VARCHAR(255),
1490
    TIMEPERIOD_START VARCHAR(255),
1491
    TIMEPERIOD_END VARCHAR(255),
1492
    TIMEPERIOD_FREETEXT VARCHAR(255),
1493
--  MINIMUM DOUBLE,
1494
--        MAXIMUM DOUBLE,
1495
--        AVERAGE DOUBLE,
1496
--        TYPCALLOWERBOUNDARY DOUBLE,
1497
--        TYPCALHIGHERBOUNDARY DOUBLE,
1498
--        VARIANCE DOUBLE,
1499
--        STANDARDDEVIATION DOUBLE,
1500
--        SINGLEVALUE DOUBLE,
1501
--        SAMPLESIZE INTEGER,
1502
    ORDERRELEVANT BOOLEAN,
1503
        UNKNOWNDATA BOOLEAN,
1504
    SORTINDEX INTEGER,
1505
        CREATEDBY_ID INTEGER,
1506
    UPDATEDBY_ID INTEGER,
1507
    FEATURE_ID INTEGER,
1508
    INDESCRIPTION_ID INTEGER,
1509
    AREA_ID INTEGER,
1510
    STATUS_ID INTEGER,
1511
    TAXON2_ID INTEGER,
1512
    UNIT_ID INTEGER,
1513
    FORMAT_ID INTEGER,
1514
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1515
    LANGUAGE_ID INTEGER
1516
);
1517
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_AUD;
1518
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION(
1519
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1520
    ANNOTATIONS_ID INTEGER NOT NULL
1521
);
1522
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION;
1523
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD(
1524
    REV INTEGER NOT NULL,
1525
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1526
    ANNOTATIONS_ID INTEGER NOT NULL,
1527
    REVTYPE TINYINT
1528
);
1529
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD;
1530
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING(
1531
    TEXTDATA_ID INTEGER NOT NULL,
1532
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1533
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL
1534
);
1535
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING;
1536
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD(
1537
    REV INTEGER NOT NULL,
1538
    TEXTDATA_ID INTEGER NOT NULL,
1539
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1540
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL,
1541
    REVTYPE TINYINT
1542
);
1543
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD;
1544
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER(
1545
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1546
    MARKERS_ID INTEGER NOT NULL
1547
);
1548
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER;
1549
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD(
1550
    REV INTEGER NOT NULL,
1551
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1552
    MARKERS_ID INTEGER NOT NULL,
1553
    REVTYPE TINYINT
1554
);
1555
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD;
1556
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA(
1557
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1558
    MEDIA_ID INTEGER NOT NULL,
1559
    SORTINDEX INTEGER NOT NULL
1560
);
1561
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA;
1562
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD(
1563
    REV INTEGER NOT NULL,
1564
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1565
    MEDIA_ID INTEGER NOT NULL,
1566
    SORTINDEX INTEGER NOT NULL,
1567
    REVTYPE TINYINT
1568
);
1569
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD;
1570
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER(
1571
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1572
    MODIFIERS_ID INTEGER NOT NULL
1573
);
1574
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER;
1575
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD(
1576
    REV INTEGER NOT NULL,
1577
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1578
    MODIFIERS_ID INTEGER NOT NULL,
1579
    REVTYPE TINYINT
1580
);
1581
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD;
1582
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT(
1583
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1584
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1585
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
1586
);
1587
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT;
1588
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD(
1589
    REV INTEGER NOT NULL,
1590
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1591
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1592
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
1593
    REVTYPE TINYINT
1594
);
1595
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD;
1596
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE(
1597
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1598
    SOURCES_ID INTEGER NOT NULL
1599
);
1600
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE;
1601
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD(
1602
    REV INTEGER NOT NULL,
1603
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1604
    SOURCES_ID INTEGER NOT NULL,
1605
    REVTYPE TINYINT
1606
);
1607
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD;
1608
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET(
1609
    DTYPE VARCHAR(31) NOT NULL,
1610
    ID INTEGER NOT NULL,
1611
    CREATED TIMESTAMP,
1612
    UUID VARCHAR(36),
1613
    UPDATED TIMESTAMP,
1614
    PROTECTEDTITLECACHE BOOLEAN,
1615
    TITLECACHE VARCHAR(255),
1616
        LSID_AUTHORITY VARCHAR(255),
1617
    LSID_LSID VARCHAR(255),
1618
    LSID_NAMESPACE VARCHAR(255),
1619
    LSID_OBJECT VARCHAR(255),
1620
    LSID_REVISION VARCHAR(255),
1621
    CREATEDBY_ID INTEGER,
1622
    UPDATEDBY_ID INTEGER,
1623
    DESCRIPTIVESYSTEM_ID INTEGER,
1624
        MAXRANK_ID INTEGER,
1625
        MINRANK_ID INTEGER
1626
);
1627
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET;
1628
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_AUD(
1629
    DTYPE VARCHAR(31) NOT NULL,
1630
    ID INTEGER NOT NULL,
1631
    REV INTEGER NOT NULL,
1632
    REVTYPE TINYINT,
1633
    CREATED TIMESTAMP,
1634
    UUID VARCHAR(36),
1635
    UPDATED TIMESTAMP,
1636
    PROTECTEDTITLECACHE BOOLEAN,
1637
    TITLECACHE VARCHAR(255),
1638
        LSID_AUTHORITY VARCHAR(255),
1639
    LSID_LSID VARCHAR(255),
1640
    LSID_NAMESPACE VARCHAR(255),
1641
    LSID_OBJECT VARCHAR(255),
1642
    LSID_REVISION VARCHAR(255),
1643
    CREATEDBY_ID INTEGER,
1644
    UPDATEDBY_ID INTEGER,
1645
    DESCRIPTIVESYSTEM_ID INTEGER,
1646
        MAXRANK_ID INTEGER,
1647
        MINRANK_ID INTEGER
1648
);
1649
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_AUD;
1650
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ANNOTATION(
1651
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1652
    ANNOTATIONS_ID INTEGER NOT NULL
1653
);
1654
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ANNOTATION;
1655
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ANNOTATION_AUD(
1656
    REV INTEGER NOT NULL,
1657
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1658
    ANNOTATIONS_ID INTEGER NOT NULL,
1659
    REVTYPE TINYINT
1660
);
1661
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ANNOTATION_AUD;
1662
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_CREDIT(
1663
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1664
    CREDITS_ID INTEGER NOT NULL,
1665
    SORTINDEX INTEGER NOT NULL
1666
);
1667
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_CREDIT;
1668
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_CREDIT_AUD(
1669
    REV INTEGER NOT NULL,
1670
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1671
    CREDITS_ID INTEGER NOT NULL,
1672
    SORTINDEX INTEGER NOT NULL,
1673
    REVTYPE TINYINT
1674
);
1675
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_CREDIT_AUD;
1676
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE(
1677
    DESCRIPTIVEDATASETS_ID INTEGER NOT NULL,
1678
    DESCRIPTIONS_ID INTEGER NOT NULL
1679
);
1680
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE;
1681
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE_AUD(
1682
    REV INTEGER NOT NULL,
1683
    DESCRIPTIVEDATASETS_ID INTEGER NOT NULL,
1684
    DESCRIPTIONS_ID INTEGER NOT NULL,
1685
    REVTYPE TINYINT
1686
);
1687
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_DESCRIPTIONBASE_AUD;
1688
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_EXTENSION(
1689
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1690
    EXTENSIONS_ID INTEGER NOT NULL
1691
);
1692
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_EXTENSION;
1693
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTIVEDATASET_AUD(
1694
    REV INTEGER NOT NULL,
1695
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1696
    EXTENSIONS_ID INTEGER NOT NULL,
1697
    REVTYPE TINYINT
1698
);
1699
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_EXTENSION_AUD;
1700
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER(
1701
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1702
    IDENTIFIERS_ID INTEGER NOT NULL,
1703
    SORTINDEX INTEGER NOT NULL
1704
);
1705
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER;
1706
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER_AUD(
1707
    REV INTEGER NOT NULL,
1708
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1709
    IDENTIFIERS_ID INTEGER NOT NULL,
1710
    SORTINDEX INTEGER NOT NULL,
1711
    REVTYPE TINYINT
1712
);
1713
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_IDENTIFIER_AUD;
1714
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_MARKER(
1715
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1716
    MARKERS_ID INTEGER NOT NULL
1717
);
1718
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_MARKER;
1719
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_MARKER_AUD(
1720
    REV INTEGER NOT NULL,
1721
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1722
    MARKERS_ID INTEGER NOT NULL,
1723
    REVTYPE TINYINT
1724
);
1725
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_MARKER_AUD;
1726
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA(
1727
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1728
    GEOFILTER_ID INTEGER NOT NULL
1729
);
1730
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA;
1731
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA_AUD(
1732
    REV INTEGER NOT NULL,
1733
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1734
    GEOFILTER_ID INTEGER NOT NULL,
1735
    REVTYPE TINYINT
1736
);
1737
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_NAMEDAREA_AUD;
1738
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE(
1739
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1740
    SOURCES_ID INTEGER NOT NULL
1741
);
1742
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE;
1743
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE_AUD(
1744
    REV INTEGER NOT NULL,
1745
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1746
    SOURCES_ID INTEGER NOT NULL,
1747
    REVTYPE TINYINT
1748
);
1749
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_ORIGINALSOURCEBASE_AUD;
1750
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION(
1751
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1752
    REPRESENTATIONS_ID INTEGER NOT NULL
1753
);
1754
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION;
1755
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION_AUD(
1756
    REV INTEGER NOT NULL,
1757
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1758
    REPRESENTATIONS_ID INTEGER NOT NULL,
1759
    REVTYPE TINYINT
1760
);
1761
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_REPRESENTATION_AUD;
1762
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_RIGHTSINFO(
1763
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1764
    RIGHTS_ID INTEGER NOT NULL
1765
);
1766
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO;
1767
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_RIGHTSINFO_AUD(
1768
    REV INTEGER NOT NULL,
1769
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1770
    RIGHTS_ID INTEGER NOT NULL,
1771
    REVTYPE TINYINT
1772
);
1773
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO_AUD;
1774
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_TAXONNODE(
1775
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1776
    TAXONSUBTREEFILTER_ID INTEGER NOT NULL
1777
);
1778
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_TAXONNODE;
1779
CREATE CACHED TABLE PUBLIC.DESCRIPTIVEDATASET_TAXONNODE_AUD(
1780
    REV INTEGER NOT NULL,
1781
    DESCRIPTIVEDATASET_ID INTEGER NOT NULL,
1782
    TAXONSUBTREEFILTER_ID INTEGER NOT NULL,
1783
    REVTYPE TINYINT
1784
);
1785
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIVEDATASET_TAXONNODE_AUD;
1786
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT(
1787
    ID INTEGER NOT NULL,
1788
    CREATED TIMESTAMP,
1789
    UUID VARCHAR(36),
1790
    UPDATED TIMESTAMP,
1791
    DESCRIPTION VARCHAR(255),
1792
    TIMEPERIOD_END VARCHAR(255),
1793
    TIMEPERIOD_FREETEXT VARCHAR(255),
1794
    TIMEPERIOD_START VARCHAR(255),
1795
    PREFERREDFLAG BOOLEAN NOT NULL,
1796
    CREATEDBY_ID INTEGER,
1797
    UPDATEDBY_ID INTEGER,
1798
    ACTOR_ID INTEGER,
1799
    IDENTIFIEDUNIT_ID INTEGER,
1800
    MODIFIER_ID INTEGER,
1801
    TAXON_ID INTEGER,
1802
        TAXONNAME_ID INTEGER
1803
);
1804
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT;
1805
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_AUD(
1806
    ID INTEGER NOT NULL,
1807
    REV INTEGER NOT NULL,
1808
    REVTYPE TINYINT,
1809
    CREATED TIMESTAMP,
1810
    UUID VARCHAR(36),
1811
    UPDATED TIMESTAMP,
1812
    DESCRIPTION VARCHAR(255),
1813
    TIMEPERIOD_END VARCHAR(255),
1814
    TIMEPERIOD_FREETEXT VARCHAR(255),
1815
    TIMEPERIOD_START VARCHAR(255),
1816
    PREFERREDFLAG BOOLEAN,
1817
    CREATEDBY_ID INTEGER,
1818
    UPDATEDBY_ID INTEGER,
1819
    ACTOR_ID INTEGER,
1820
    IDENTIFIEDUNIT_ID INTEGER,
1821
    MODIFIER_ID INTEGER,
1822
    TAXON_ID INTEGER,
1823
        TAXONNAME_ID INTEGER
1824
);
1825
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_AUD;
1826
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION(
1827
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1828
    ANNOTATIONS_ID INTEGER NOT NULL
1829
);
1830
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION;
1831
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD(
1832
    REV INTEGER NOT NULL,
1833
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1834
    ANNOTATIONS_ID INTEGER NOT NULL,
1835
    REVTYPE TINYINT
1836
);
1837
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD;
1838
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER(
1839
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1840
    MARKERS_ID INTEGER NOT NULL
1841
);
1842
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER;
1843
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD(
1844
    REV INTEGER NOT NULL,
1845
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1846
    MARKERS_ID INTEGER NOT NULL,
1847
    REVTYPE TINYINT
1848
);
1849
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER_AUD;
1850
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE(
1851
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1852
    SETOFREFERENCES_ID INTEGER NOT NULL
1853
);
1854
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE;
1855
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD(
1856
    REV INTEGER NOT NULL,
1857
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1858
    SETOFREFERENCES_ID INTEGER NOT NULL,
1859
    REVTYPE TINYINT
1860
);
1861

    
1862
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD;
1863
CREATE CACHED TABLE PUBLIC.DNAQUALITY(
1864
    ID INTEGER NOT NULL,
1865
    CREATED TIMESTAMP,
1866
    UUID VARCHAR(36) NOT NULL,
1867
    UPDATED TIMESTAMP,
1868
    PURIFICATIONMETHOD VARCHAR(255),
1869
    RATIOOFABSORBANCE260_230 DOUBLE,
1870
    RATIOOFABSORBANCE260_280 DOUBLE,
1871
    QUALITYCHECKDATE TIMESTAMP,
1872
    CONCENTRATION DOUBLE,
1873
    CREATEDBY_ID INTEGER,
1874
    UPDATEDBY_ID INTEGER,
1875
    CONCENTRATIONUNIT_ID INTEGER,
1876
    QUALITYTERM_ID INTEGER,
1877
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1878
);
1879
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY;
1880
CREATE CACHED TABLE PUBLIC.DNAQUALITY_AUD(
1881
    ID INTEGER NOT NULL,
1882
    REV INTEGER NOT NULL,
1883
    REVTYPE TINYINT,
1884
    CREATED TIMESTAMP,
1885
    UUID VARCHAR(36) NOT NULL,
1886
    UPDATED TIMESTAMP,
1887
    PURIFICATIONMETHOD VARCHAR(255),
1888
    RATIOOFABSORBANCE260_230 DOUBLE,
1889
    RATIOOFABSORBANCE260_280 DOUBLE,
1890
    QUALITYCHECKDATE TIMESTAMP,
1891
    CONCENTRATION DOUBLE,
1892
    CREATEDBY_ID INTEGER,
1893
    UPDATEDBY_ID INTEGER,
1894
    CONCENTRATIONUNIT_ID INTEGER,
1895
    QUALITYTERM_ID INTEGER,
1896
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1897
);
1898
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY_AUD;
1899

    
1900
CREATE CACHED TABLE PUBLIC.ENTITYVALIDATION(
1901
    ID INTEGER NOT NULL,
1902
    UUID VARCHAR(36),
1903
    CREATED TIMESTAMP,
1904
    VALIDATEDENTITYID INTEGER,
1905
    VALIDATEDENTITYUUID VARCHAR(36),
1906
    VALIDATEDENTITYCLASS VARCHAR(255),
1907
    VALIDATIONCOUNT INTEGER,
1908
    UPDATED TIMESTAMP,
1909
    USERFRIENDLYDESCRIPTION VARCHAR(255),
1910
    USERFRIENDLYTYPENAME VARCHAR(255),
1911
    CREATEDBY_ID INTEGER,
1912
    UPDATEDBY_ID INTEGER,
1913
    CRUDEVENTTYPE VARCHAR(24),
1914
    STATUS VARCHAR(16)
1915
);
1916
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYVALIDATION;
1917

    
1918
CREATE CACHED TABLE PUBLIC.ENTITYCONSTRAINTVIOLATION(
1919
    ID INTEGER NOT NULL,
1920
    UUID VARCHAR(36),
1921
    CREATED TIMESTAMP,
1922
    PROPERTYPATH VARCHAR(255),
1923
    USERFRIENDLYFIELDNAME VARCHAR(255),
1924
    INVALIDVALUE VARCHAR(255),
1925
    SEVERITY VARCHAR(24),
1926
    MESSAGE VARCHAR(255),
1927
    VALIDATOR VARCHAR(255),
1928
    VALIDATIONGROUP VARCHAR(63),
1929
    CREATEDBY_ID INTEGER,
1930
    UPDATEDBY_ID INTEGER,
1931
    ENTITYVALIDATION_ID INTEGER
1932
);
1933
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYCONSTRAINTVIOLATION;
1934

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

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

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

    
2743
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2744
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2745
    ANNOTATIONS_ID INTEGER NOT NULL,
2746
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2747
);
2748

    
2749
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2750
    REV INTEGER NOT NULL,
2751
    REVTYPE TINYINT,
2752
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2753
    ANNOTATIONS_ID INTEGER NOT NULL,
2754
);
2755

    
2756
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2757
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2758
    MARKERS_ID INTEGER NOT NULL,
2759
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2760
);
2761

    
2762
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2763
    REV INTEGER NOT NULL,
2764
    REVTYPE TINYINT,
2765
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2766
    MARKERS_ID INTEGER NOT NULL,
2767
);
2768

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

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

    
3579
CREATE TABLE PRIMER_ANNOTATION (
3580
    PRIMER_ID INTEGER NOT NULL,
3581
    ANNOTATIONS_ID INTEGER NOT NULL,
3582
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3583
);
3584
CREATE TABLE PRIMER_ANNOTATION_AUD (
3585
    PRIMER_ID INTEGER NOT NULL,
3586
    ANNOTATIONS_ID INTEGER NOT NULL
3587
);
3588

    
3589
CREATE TABLE PRIMER_MARKER (
3590
    PRIMER_ID INTEGER NOT NULL,
3591
    MARKERS_ID INTEGER NOT NULL,
3592
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3593
);
3594
CREATE TABLE PRIMER_MARKER_AUD (
3595
    PRIMER_ID INTEGER NOT NULL,
3596
    MARKERS_ID INTEGER NOT NULL
3597
);
3598

    
3599

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

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

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

    
4052
CREATE TABLE SEQUENCE_ANNOTATION (
4053
    SEQUENCE_ID INTEGER NOT NULL,
4054
    ANNOTATIONS_ID INTEGER NOT NULL,
4055
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
4056
);
4057
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
4058
    REV INTEGER NOT NULL,
4059
    REVTYPE TINYINT,
4060
    SEQUENCE_ID INTEGER NOT NULL,
4061
    ANNOTATIONS_ID INTEGER NOT NULL
4062
);
4063

    
4064
CREATE TABLE SEQUENCE_MARKER (
4065
    SEQUENCE_ID INTEGER NOT NULL,
4066
    MARKERS_ID INTEGER NOT NULL,
4067
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
4068
);
4069
CREATE TABLE SEQUENCE_MARKER_AUD (
4070
    REV INTEGER NOT NULL,
4071
    REVTYPE TINYINT,
4072
    SEQUENCE_ID INTEGER NOT NULL,
4073
    MARKERS_ID INTEGER NOT NULL
4074
);
4075
CREATE TABLE SEQUENCE_REFERENCE (
4076
    SEQUENCE_ID INTEGER NOT NULL,
4077
    CITATIONS_ID INTEGER NOT NULL,
4078
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
4079
);
4080
CREATE TABLE SEQUENCE_REFERENCE_AUD (
4081
    REV INTEGER NOT NULL,
4082
    REVTYPE TINYINT,
4083
    SEQUENCE_ID INTEGER NOT NULL,
4084
    CITATIONS_ID INTEGER NOT NULL
4085
);
4086

    
4087
CREATE TABLE SINGLEREADALIGNMENT (
4088
    ID INTEGER NOT NULL,
4089
    CREATED TIMESTAMP,
4090
    UUID VARCHAR(36),
4091
    UPDATED TIMESTAMP,
4092
        EDITEDSEQUENCE CLOB,
4093
        SHIFTS CLOB,
4094
    REVERSECOMPLEMENT BIT,
4095
        FIRSTSEQPOSITION INTEGER,
4096
        LEFTCUTPOSITION INTEGER,
4097
        RIGHTCUTPOSITION INTEGER,
4098
        CREATEDBY_ID INTEGER,
4099
    UPDATEDBY_ID INTEGER,
4100
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4101
    SINGLEREAD_ID INTEGER NOT NULL,
4102
    PRIMARY KEY (ID)
4103
);
4104

    
4105
CREATE TABLE SINGLEREADALIGNMENT_AUD (
4106
    ID INTEGER NOT NULL,
4107
    REV INTEGER NOT NULL,
4108
    REVTYPE TINYINT,
4109
    CREATED TIMESTAMP,
4110
    UUID VARCHAR(36),
4111
    UPDATED TIMESTAMP,
4112
        EDITEDSEQUENCE CLOB,
4113
        SHIFTS CLOB,
4114
    REVERSECOMPLEMENT BIT,
4115
        FIRSTSEQPOSITION INTEGER,
4116
        LEFTCUTPOSITION INTEGER,
4117
        RIGHTCUTPOSITION INTEGER,
4118
        CREATEDBY_ID INTEGER,
4119
    UPDATEDBY_ID INTEGER,
4120
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4121
    SINGLEREAD_ID INTEGER NOT NULL
4122
);
4123

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

    
4168
CREATE TABLE SINGLEREAD_ANNOTATION (
4169
    SINGLEREAD_ID INTEGER NOT NULL,
4170
    ANNOTATIONS_ID INTEGER NOT NULL,
4171
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
4172
);
4173
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
4174
    REV INTEGER NOT NULL,
4175
    REVTYPE TINYINT,
4176
    SINGLEREAD_ID INTEGER NOT NULL,
4177
    ANNOTATIONS_ID INTEGER NOT NULL
4178
);
4179

    
4180
CREATE TABLE SINGLEREAD_MARKER (
4181
    SINGLEREAD_ID INTEGER NOT NULL,
4182
    MARKERS_ID INTEGER NOT NULL,
4183
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
4184
);
4185

    
4186
CREATE TABLE SINGLEREAD_MARKER_AUD (
4187
    REV INTEGER NOT NULL,
4188
    REVTYPE TINYINT,
4189
    SINGLEREAD_ID INTEGER NOT NULL,
4190
    MARKERS_ID INTEGER NOT NULL
4191
);
4192

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

    
4331
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4332
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4333
    IDENTIFIERS_ID INTEGER NOT NULL,
4334
    SORTINDEX INTEGER NOT NULL
4335
);
4336
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4337
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4338
    REV INTEGER NOT NULL,
4339
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4340
    IDENTIFIERS_ID INTEGER NOT NULL,
4341
    SORTINDEX INTEGER NOT NULL,
4342
    REVTYPE TINYINT
4343
);
4344
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4345

    
4346
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
4347
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4348
    DEFINITION_ID INTEGER NOT NULL,
4349
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
4350
);
4351
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
4352
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
4353
    REV INTEGER NOT NULL,
4354
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4355
    DEFINITION_ID INTEGER NOT</