Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

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

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

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

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

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

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

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

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

    
2682
CREATE TABLE MATERIALORMETHODEVENT (
2683
    ID INTEGER NOT NULL,
2684
    DTYPE VARCHAR(255),
2685
    CREATED TIMESTAMP,
2686
    UUID VARCHAR(36),
2687
    UPDATED TIMESTAMP,
2688
    MATERIALMETHODTEXT VARCHAR(255),
2689
    DESCRIPTION VARCHAR(255),
2690
    TIMEPERIOD_END VARCHAR(255),
2691
    TIMEPERIOD_FREETEXT VARCHAR(255),
2692
    TIMEPERIOD_START VARCHAR(255),
2693
        STRAIN VARCHAR(255),
2694
    TEMPERATURE DOUBLE,
2695
    CREATEDBY_ID INTEGER,
2696
    UPDATEDBY_ID INTEGER,
2697
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2698
    ACTOR_ID INTEGER,
2699
    FORWARDPRIMER_ID INTEGER,
2700
    REVERSEPRIMER_ID INTEGER,
2701
    MEDIUM_ID INTEGER,
2702
    PRIMARY KEY (ID)
2703
);
2704

    
2705
CREATE TABLE MATERIALORMETHODEVENT_AUD (
2706
    ID INTEGER NOT NULL,
2707
    REV INTEGER NOT NULL,
2708
    REVTYPE TINYINT,
2709
        DTYPE VARCHAR(255),
2710
    CREATED TIMESTAMP,
2711
    UUID VARCHAR(36),
2712
    UPDATED TIMESTAMP,
2713
    MATERIALMETHODTEXT VARCHAR(255),
2714
    DESCRIPTION VARCHAR(255),
2715
    TIMEPERIOD_END VARCHAR(255),
2716
    TIMEPERIOD_FREETEXT VARCHAR(255),
2717
    TIMEPERIOD_START VARCHAR(255),
2718
        STRAIN VARCHAR(255),
2719
    TEMPERATURE DOUBLE,
2720
    CREATEDBY_ID INTEGER,
2721
    UPDATEDBY_ID INTEGER,
2722
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2723
    ACTOR_ID INTEGER,
2724
    FORWARDPRIMER_ID INTEGER,
2725
    REVERSEPRIMER_ID INTEGER,
2726
    MEDIUM_ID INTEGER
2727
);
2728

    
2729
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2730
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2731
    ANNOTATIONS_ID INTEGER NOT NULL,
2732
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2733
);
2734

    
2735
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2736
    REV INTEGER NOT NULL,
2737
    REVTYPE TINYINT,
2738
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2739
    ANNOTATIONS_ID INTEGER NOT NULL,
2740
);
2741

    
2742
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2743
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2744
    MARKERS_ID INTEGER NOT NULL,
2745
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2746
);
2747

    
2748
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2749
    REV INTEGER NOT NULL,
2750
    REVTYPE TINYINT,
2751
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2752
    MARKERS_ID INTEGER NOT NULL,
2753
);
2754

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

    
3521
CREATE TABLE PRIMER (
3522
    ID INTEGER NOT NULL,
3523
    CREATED TIMESTAMP,
3524
    UUID VARCHAR(36),
3525
    UPDATED TIMESTAMP,
3526
    LABEL VARCHAR(255),
3527
        SEQUENCE_LENGTH INTEGER,
3528
        SEQUENCE_STRING CLOB,
3529
    CREATEDBY_ID INTEGER,
3530
    UPDATEDBY_ID INTEGER,
3531
    DNAMARKER_ID INTEGER,
3532
        PUBLISHEDIN_ID INTEGER,
3533
        PRIMARY KEY (ID)
3534
);
3535
CREATE TABLE PRIMER_AUD (
3536
    ID INTEGER NOT NULL,
3537
    CREATED TIMESTAMP,
3538
    UUID VARCHAR(36),
3539
    UPDATED TIMESTAMP,
3540
    LABEL VARCHAR(255),
3541
    SEQUENCE_LENGTH INTEGER,
3542
    SEQUENCE_STRING CLOB,
3543
    CREATEDBY_ID INTEGER,
3544
    UPDATEDBY_ID INTEGER,
3545
        DNAMARKER_ID INTEGER,
3546
        PUBLISHEDIN_ID INTEGER,
3547
);
3548

    
3549
CREATE TABLE PRIMER_ANNOTATION (
3550
    PRIMER_ID INTEGER NOT NULL,
3551
    ANNOTATIONS_ID INTEGER NOT NULL,
3552
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3553
);
3554
CREATE TABLE PRIMER_ANNOTATION_AUD (
3555
    PRIMER_ID INTEGER NOT NULL,
3556
    ANNOTATIONS_ID INTEGER NOT NULL
3557
);
3558

    
3559
CREATE TABLE PRIMER_MARKER (
3560
    PRIMER_ID INTEGER NOT NULL,
3561
    MARKERS_ID INTEGER NOT NULL,
3562
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3563
);
3564
CREATE TABLE PRIMER_MARKER_AUD (
3565
    PRIMER_ID INTEGER NOT NULL,
3566
    MARKERS_ID INTEGER NOT NULL
3567
);
3568

    
3569

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

    
3856
CREATE CACHED TABLE PUBLIC.TERMBASE_INVERSEREPRESENTATION(
3857
    TERM_ID INTEGER NOT NULL,
3858
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL
3859
);
3860
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.TERMBASE_INVERSEREPRESENTATION;
3861
CREATE CACHED TABLE PUBLIC.TERMBASE_INVERSEREPRESENTATION_AUD(
3862
    REV INTEGER NOT NULL,
3863
    TERM_ID INTEGER NOT NULL,
3864
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL,
3865
    REVTYPE TINYINT
3866
);
3867
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.TERMBASE_INVERSEREPRESENTATION_AUD;
3868
CREATE CACHED TABLE PUBLIC.REPRESENTATION(
3869
    ID INTEGER NOT NULL,
3870
    CREATED TIMESTAMP,
3871
    UUID VARCHAR(36),
3872
    UPDATED TIMESTAMP,
3873
    TEXT CLOB,
3874
    ABBREVIATEDLABEL VARCHAR(255),
3875
    LABEL VARCHAR(255),
3876
    CREATEDBY_ID INTEGER,
3877
    UPDATEDBY_ID INTEGER,
3878
    LANGUAGE_ID INTEGER
3879
);
3880
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION;
3881
CREATE CACHED TABLE PUBLIC.REPRESENTATION_AUD(
3882
    ID INTEGER NOT NULL,
3883
    REV INTEGER NOT NULL,
3884
    REVTYPE TINYINT,
3885
    CREATED TIMESTAMP,
3886
    UUID VARCHAR(36),
3887
    UPDATED TIMESTAMP,
3888
    TEXT CLOB,
3889
    ABBREVIATEDLABEL VARCHAR(255),
3890
    LABEL VARCHAR(255),
3891
    CREATEDBY_ID INTEGER,
3892
    UPDATEDBY_ID INTEGER,
3893
    LANGUAGE_ID INTEGER
3894
);
3895
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_AUD;
3896
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION(
3897
    REPRESENTATION_ID INTEGER NOT NULL,
3898
    ANNOTATIONS_ID INTEGER NOT NULL
3899
);
3900
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION;
3901
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD(
3902
    REV INTEGER NOT NULL,
3903
    REPRESENTATION_ID INTEGER NOT NULL,
3904
    ANNOTATIONS_ID INTEGER NOT NULL,
3905
    REVTYPE TINYINT
3906
);
3907
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3908
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER(
3909
    REPRESENTATION_ID INTEGER NOT NULL,
3910
    MARKERS_ID INTEGER NOT NULL
3911
);
3912
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER;
3913
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER_AUD(
3914
    REV INTEGER NOT NULL,
3915
    REPRESENTATION_ID INTEGER NOT NULL,
3916
    MARKERS_ID INTEGER NOT NULL,
3917
    REVTYPE TINYINT
3918
);
3919
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER_AUD;
3920
CREATE CACHED TABLE PUBLIC.RIGHTSINFO(
3921
    ID INTEGER NOT NULL,
3922
    CREATED TIMESTAMP,
3923
    UUID VARCHAR(36),
3924
    UPDATED TIMESTAMP,
3925
    TEXT CLOB,
3926
    ABBREVIATEDTEXT VARCHAR(255),
3927
    URI CLOB,
3928
    CREATEDBY_ID INTEGER,
3929
    UPDATEDBY_ID INTEGER,
3930
    LANGUAGE_ID INTEGER,
3931
    AGENT_ID INTEGER,
3932
    TYPE_ID INTEGER
3933
);
3934
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO;
3935
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_AUD(
3936
    ID INTEGER NOT NULL,
3937
    REV INTEGER NOT NULL,
3938
    REVTYPE TINYINT,
3939
    CREATED TIMESTAMP,
3940
    UUID VARCHAR(36),
3941
    UPDATED TIMESTAMP,
3942
    TEXT CLOB,
3943
    ABBREVIATEDTEXT VARCHAR(255),
3944
    URI CLOB,
3945
    CREATEDBY_ID INTEGER,
3946
    UPDATEDBY_ID INTEGER,
3947
    LANGUAGE_ID INTEGER,
3948
    AGENT_ID INTEGER,
3949
    TYPE_ID INTEGER
3950
);
3951
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_AUD;
3952
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION(
3953
    RIGHTS_ID INTEGER NOT NULL,
3954
    ANNOTATIONS_ID INTEGER NOT NULL
3955
);
3956
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION;
3957
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD(
3958
    REV INTEGER NOT NULL,
3959
    RIGHTS_ID INTEGER NOT NULL,
3960
    ANNOTATIONS_ID INTEGER NOT NULL,
3961
    REVTYPE TINYINT
3962
);
3963
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION_AUD;
3964
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER(
3965
    RIGHTS_ID INTEGER NOT NULL,
3966
    MARKERS_ID INTEGER NOT NULL
3967
);
3968
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_MARKER;
3969
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER_AUD(
3970
    REV INTEGER NOT NULL,
3971
    RIGHTS_ID INTEGER NOT NULL,
3972
    MARKERS_ID INTEGER NOT NULL,
3973
    REVTYPE TINYINT
3974
);
3975

    
3976
CREATE TABLE SEQUENCE (
3977
    ID INTEGER NOT NULL,
3978
    CREATED TIMESTAMP,
3979
    UUID VARCHAR(36),
3980
    UPDATED TIMESTAMP,
3981
    BARCODESEQUENCEPART_LENGTH INTEGER,
3982
    BARCODESEQUENCEPART_STRING CLOB,
3983
    BOLDPROCESSID VARCHAR(255),
3984
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3985
    CONSENSUSSEQUENCE_STRING CLOB,
3986
    GENETICACCESSIONNUMBER VARCHAR(255),
3987
    HAPLOTYPE VARCHAR(255),
3988
    ISBARCODE BOOLEAN,
3989
    CREATEDBY_ID INTEGER,
3990
    UPDATEDBY_ID INTEGER,
3991
    CONTIGFILE_ID INTEGER,
3992
    DNASAMPLE_ID INTEGER,
3993
    DNAMARKER_ID INTEGER,
3994
    PRIMARY KEY (ID)
3995
);
3996
CREATE TABLE SEQUENCE_AUD (
3997
    ID INTEGER NOT NULL,
3998
    REV INTEGER NOT NULL,
3999
    REVTYPE TINYINT,
4000
    CREATED TIMESTAMP,
4001
    UUID VARCHAR(36),
4002
    UPDATED TIMESTAMP,
4003
    BARCODESEQUENCEPART_LENGTH INTEGER,
4004
    BARCODESEQUENCEPART_STRING CLOB,
4005
    BOLDPROCESSID VARCHAR(255),
4006
    CONSENSUSSEQUENCE_LENGTH INTEGER,
4007
    CONSENSUSSEQUENCE_STRING CLOB,
4008
    GENETICACCESSIONNUMBER VARCHAR(255),
4009
    HAPLOTYPE VARCHAR(255),
4010
    ISBARCODE BOOLEAN,
4011
    CREATEDBY_ID INTEGER,
4012
    UPDATEDBY_ID INTEGER,
4013
    CONTIGFILE_ID INTEGER,
4014
    DNASAMPLE_ID INTEGER,
4015
    DNAMARKER_ID INTEGER
4016
);
4017

    
4018
CREATE TABLE SEQUENCE_ANNOTATION (
4019
    SEQUENCE_ID INTEGER NOT NULL,
4020
    ANNOTATIONS_ID INTEGER NOT NULL,
4021
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
4022
);
4023
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
4024
    REV INTEGER NOT NULL,
4025
    REVTYPE TINYINT,
4026
    SEQUENCE_ID INTEGER NOT NULL,
4027
    ANNOTATIONS_ID INTEGER NOT NULL
4028
);
4029

    
4030
CREATE TABLE SEQUENCE_MARKER (
4031
    SEQUENCE_ID INTEGER NOT NULL,
4032
    MARKERS_ID INTEGER NOT NULL,
4033
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
4034
);
4035
CREATE TABLE SEQUENCE_MARKER_AUD (
4036
    REV INTEGER NOT NULL,
4037
    REVTYPE TINYINT,
4038
    SEQUENCE_ID INTEGER NOT NULL,
4039
    MARKERS_ID INTEGER NOT NULL
4040
);
4041
CREATE TABLE SEQUENCE_REFERENCE (
4042
    SEQUENCE_ID INTEGER NOT NULL,
4043
    CITATIONS_ID INTEGER NOT NULL,
4044
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
4045
);
4046
CREATE TABLE SEQUENCE_REFERENCE_AUD (
4047
    REV INTEGER NOT NULL,
4048
    REVTYPE TINYINT,
4049
    SEQUENCE_ID INTEGER NOT NULL,
4050
    CITATIONS_ID INTEGER NOT NULL
4051
);
4052

    
4053
CREATE TABLE SINGLEREADALIGNMENT (
4054
    ID INTEGER NOT NULL,
4055
    CREATED TIMESTAMP,
4056
    UUID VARCHAR(36),
4057
    UPDATED TIMESTAMP,
4058
        EDITEDSEQUENCE CLOB,
4059
        SHIFTS CLOB,
4060
    REVERSECOMPLEMENT BIT,
4061
        FIRSTSEQPOSITION INTEGER,
4062
        LEFTCUTPOSITION INTEGER,
4063
        RIGHTCUTPOSITION INTEGER,
4064
        CREATEDBY_ID INTEGER,
4065
    UPDATEDBY_ID INTEGER,
4066
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4067
    SINGLEREAD_ID INTEGER NOT NULL,
4068
    PRIMARY KEY (ID)
4069
);
4070

    
4071
CREATE TABLE SINGLEREADALIGNMENT_AUD (
4072
    ID INTEGER NOT NULL,
4073
    REV INTEGER NOT NULL,
4074
    REVTYPE TINYINT,
4075
    CREATED TIMESTAMP,
4076
    UUID VARCHAR(36),
4077
    UPDATED TIMESTAMP,
4078
        EDITEDSEQUENCE CLOB,
4079
        SHIFTS CLOB,
4080
    REVERSECOMPLEMENT BIT,
4081
        FIRSTSEQPOSITION INTEGER,
4082
        LEFTCUTPOSITION INTEGER,
4083
        RIGHTCUTPOSITION INTEGER,
4084
        CREATEDBY_ID INTEGER,
4085
    UPDATEDBY_ID INTEGER,
4086
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4087
    SINGLEREAD_ID INTEGER NOT NULL
4088
);
4089

    
4090
CREATE TABLE SINGLEREAD (
4091
    ID INTEGER NOT NULL,
4092
    CREATED TIMESTAMP,
4093
    UUID VARCHAR(36),
4094
    UPDATED TIMESTAMP,
4095
    DESCRIPTION VARCHAR(255),
4096
    TIMEPERIOD_END VARCHAR(255),
4097
    TIMEPERIOD_FREETEXT VARCHAR(255),
4098
    TIMEPERIOD_START VARCHAR(255),
4099
    DIRECTION VARCHAR(3),
4100
    SEQUENCE_LENGTH INTEGER,
4101
    SEQUENCE_STRING CLOB,
4102
    CREATEDBY_ID INTEGER,
4103
    UPDATEDBY_ID INTEGER,
4104
    ACTOR_ID INTEGER,
4105
    AMPLIFICATIONRESULT_ID INTEGER,
4106
    MATERIALORMETHOD_ID INTEGER,
4107
    PHEROGRAM_ID INTEGER,
4108
    PRIMER_ID INTEGER,
4109
    PRIMARY KEY (ID)
4110
);
4111
CREATE TABLE SINGLEREAD_AUD (
4112
    ID INTEGER NOT NULL,
4113
    REV INTEGER NOT NULL,
4114
    REVTYPE TINYINT,
4115
    CREATED TIMESTAMP,
4116
    UUID VARCHAR(36),
4117
    UPDATED TIMESTAMP,
4118
    DESCRIPTION VARCHAR(255),
4119
    TIMEPERIOD_END VARCHAR(255),
4120
    TIMEPERIOD_FREETEXT VARCHAR(255),
4121
    TIMEPERIOD_START VARCHAR(255),
4122
    DIRECTION VARCHAR(3),
4123
    SEQUENCE_LENGTH INTEGER,
4124
    SEQUENCE_STRING CLOB,
4125
    CREATEDBY_ID INTEGER,
4126
    UPDATEDBY_ID INTEGER,
4127
    ACTOR_ID INTEGER,
4128
    AMPLIFICATIONRESULT_ID INTEGER,
4129
    MATERIALORMETHOD_ID INTEGER,
4130
    PHEROGRAM_ID INTEGER,
4131
    PRIMER_ID INTEGER
4132
);
4133

    
4134
CREATE TABLE SINGLEREAD_ANNOTATION (
4135
    SINGLEREAD_ID INTEGER NOT NULL,
4136
    ANNOTATIONS_ID INTEGER NOT NULL,
4137
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
4138
);
4139
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
4140
    REV INTEGER NOT NULL,
4141
    REVTYPE TINYINT,
4142
    SINGLEREAD_ID INTEGER NOT NULL,
4143
    ANNOTATIONS_ID INTEGER NOT NULL
4144
);
4145

    
4146
CREATE TABLE SINGLEREAD_MARKER (
4147
    SINGLEREAD_ID INTEGER NOT NULL,
4148
    MARKERS_ID INTEGER NOT NULL,
4149
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
4150
);
4151

    
4152
CREATE TABLE SINGLEREAD_MARKER_AUD (
4153
    REV INTEGER NOT NULL,
4154
    REVTYPE TINYINT,
4155
    SINGLEREAD_ID INTEGER NOT NULL,
4156
    MARKERS_ID INTEGER NOT NULL
4157
);
4158

    
4159
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
4160
    DTYPE VARCHAR(31) NOT NULL,
4161
    ID INTEGER NOT NULL,
4162
    CREATED TIMESTAMP,
4163
    UUID VARCHAR(36),
4164
    UPDATED TIMESTAMP,
4165
    RECORDBASIS  VARCHAR(4) NOT NULL,
4166
    LSID_AUTHORITY VARCHAR(255),
4167
    LSID_LSID VARCHAR(255),
4168
    LSID_NAMESPACE VARCHAR(255),
4169
    LSID_OBJECT VARCHAR(255),
4170
    LSID_REVISION VARCHAR(255),
4171
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4172
    TITLECACHE VARCHAR(255),
4173
    PROTECTEDIDENTITYCACHE BOOLEAN,
4174
    IDENTITYCACHE VARCHAR(255),
4175
    PUBLISH BOOLEAN,
4176
    INDIVIDUALCOUNT VARCHAR(255),
4177
        PREFERREDSTABLEURI CLOB,
4178
    ACCESSIONNUMBER VARCHAR(255),
4179
    BARCODE VARCHAR(255),
4180
    CATALOGNUMBER VARCHAR(255),
4181
    COLLECTORSNUMBER VARCHAR(255),
4182
    EXSICCATUM VARCHAR(255),
4183
    ORIGINALLABELINFO CLOB,
4184
    FIELDNOTES VARCHAR(255),
4185
    FIELDNUMBER VARCHAR(255),
4186
    CREATEDBY_ID INTEGER,
4187
    UPDATEDBY_ID INTEGER,
4188
    LIFESTAGE_ID INTEGER,
4189
    SEX_ID INTEGER,
4190
    KINDOFUNIT_ID INTEGER,
4191
    COLLECTION_ID INTEGER,
4192
    DERIVEDFROM_ID INTEGER,
4193
    STOREDUNDER_ID INTEGER,
4194
    PRESERVATION_ID INTEGER,
4195
    GATHERINGEVENT_ID INTEGER,
4196
    PRIMARYCOLLECTOR_ID INTEGER,
4197
    MEDIASPECIMEN_ID INTEGER,
4198
    DNAQUALITY_ID INTEGER
4199
);
4200
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
4201
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
4202
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
4203
    DTYPE VARCHAR(31) NOT NULL,
4204
    ID INTEGER NOT NULL,
4205
    REV INTEGER NOT NULL,
4206
    REVTYPE TINYINT,
4207
    CREATED TIMESTAMP,
4208
    UUID VARCHAR(36),
4209
    UPDATED TIMESTAMP,
4210
    RECORDBASIS  VARCHAR(4) NOT NULL,
4211
    LSID_AUTHORITY VARCHAR(255),
4212
    LSID_LSID VARCHAR(255),
4213
    LSID_NAMESPACE VARCHAR(255),
4214
    LSID_OBJECT VARCHAR(255),
4215
    LSID_REVISION VARCHAR(255),
4216
    PROTECTEDTITLECACHE BOOLEAN,
4217
    TITLECACHE VARCHAR(255),
4218
    PROTECTEDIDENTITYCACHE BOOLEAN NULL,
4219
    IDENTITYCACHE VARCHAR(255),
4220
        PUBLISH BOOLEAN,
4221
    INDIVIDUALCOUNT VARCHAR(255),
4222
    PREFERREDSTABLEURI CLOB,
4223
    ACCESSIONNUMBER VARCHAR(255),
4224
    BARCODE VARCHAR(255),
4225
    CATALOGNUMBER VARCHAR(255),
4226
    COLLECTORSNUMBER VARCHAR(255),
4227
    EXSICCATUM VARCHAR(255),
4228
    ORIGINALLABELINFO CLOB,
4229
    FIELDNOTES VARCHAR(255),
4230
    FIELDNUMBER VARCHAR(255),
4231
    CREATEDBY_ID INTEGER,
4232
    UPDATEDBY_ID INTEGER,
4233
    LIFESTAGE_ID INTEGER,
4234
    SEX_ID INTEGER,
4235
    KINDOFUNIT_ID INTEGER,
4236
    COLLECTION_ID INTEGER,
4237
    DERIVEDFROM_ID INTEGER,
4238
    STOREDUNDER_ID INTEGER,
4239
    PRESERVATION_ID INTEGER,
4240
    GATHERINGEVENT_ID INTEGER,
4241
    PRIMARYCOLLECTOR_ID INTEGER,
4242
    MEDIASPECIMEN_ID INTEGER,
4243
    DNAQUALITY_ID INTEGER
4244
);
4245
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
4246
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
4247
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4248
    ANNOTATIONS_ID INTEGER NOT NULL
4249
);
4250
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
4251
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
4252
    REV INTEGER NOT NULL,
4253
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4254
    ANNOTATIONS_ID INTEGER NOT NULL,
4255
    REVTYPE TINYINT
4256
);
4257
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
4258
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
4259
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4260
    CREDITS_ID INTEGER NOT NULL,
4261
    SORTINDEX INTEGER NOT NULL
4262
);
4263
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
4264
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
4265
    REV INTEGER NOT NULL,
4266
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4267
    CREDITS_ID INTEGER NOT NULL,
4268
    SORTINDEX INTEGER NOT NULL,
4269
    REVTYPE TINYINT
4270
);
4271
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
4272
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
4273
    ORIGINALS_ID INTEGER NOT NULL,
4274
    DERIVATIONEVENTS_ID INTEGER NOT NULL
4275
);
4276
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
4277
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
4278
    REV INTEGER NOT NULL,
4279
    ORIGINALS_ID INTEGER NOT NULL,
4280
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
4281
    REVTYPE TINYINT
4282
);
4283
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
4284
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
4285
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4286
    EXTENSIONS_ID INTEGER NOT NULL
4287
);
4288
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
4289
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
4290
    REV INTEGER NOT NULL,
4291
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4292
    EXTENSIONS_ID INTEGER NOT NULL,
4293
    REVTYPE TINYINT
4294
);
4295
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;
4296

    
4297
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4298
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4299
    IDENTIFIERS_ID INTEGER NOT NULL,
4300
    SORTINDEX INTEGER NOT NULL
4301
);
4302
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4303
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4304
    REV INTEGER NOT NULL,
4305
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4306
    IDENTIFIERS_ID INTEGER NOT NULL,
4307
    SORTINDEX INTEGER NOT NULL,
4308
    REVTYPE TINYINT
4309
);
4310
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4311

    
4312
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
4313
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4314
    DEFINITION_ID INTEGER NOT NULL,
4315
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
4316
);
4317
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
4318
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
4319
    REV INTEGER NOT NULL,
4320
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4321
    DEFINITION_ID INTEGER NOT NULL,
4322
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
4323
    REVTYPE TINYINT
4324
);
4325
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
4326
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
4327
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4328
    MARKERS_ID INTEGER NOT NULL
4329
);
4330
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
4331
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
4332
    REV INTEGER NOT NULL,
4333
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4334
    MARKERS_ID INTEGER NOT NULL,
4335
    REVTYPE TINYINT
4336
);
4337
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
4338
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
4339
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4340
    SOURCES_ID INTEGER NOT NULL
4341
);
4342
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
4343
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
4344
    REV INTEGER NOT NULL,
4345
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4346
    SOURCES_ID INTEGER NOT NULL,
4347
    REVTYPE TINYINT
4348
);
4349
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
4350
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO(
4351
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4352
    RIGHTS_ID INTEGER NOT NULL
4353
);
4354
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO;
4355
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD(
4356
    REV INTEGER NOT NULL,
4357
    SPECIMENOROBSERVATIONBASE_ID