Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

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

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

    
3553
CREATE TABLE PRIMER_ANNOTATION (
3554
    PRIMER_ID INTEGER NOT NULL,
3555
    ANNOTATIONS_ID INTEGER NOT NULL,
3556
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3557
);
3558
CREATE TABLE PRIMER_ANNOTATION_AUD (
3559
    PRIMER_ID INTEGER NOT NULL,
3560
    ANNOTATIONS_ID INTEGER NOT NULL
3561
);
3562

    
3563
CREATE TABLE PRIMER_MARKER (
3564
    PRIMER_ID INTEGER NOT NULL,
3565
    MARKERS_ID INTEGER NOT NULL,
3566
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3567
);
3568
CREATE TABLE PRIMER_MARKER_AUD (
3569
    PRIMER_ID INTEGER NOT NULL,
3570
    MARKERS_ID INTEGER NOT NULL
3571
);
3572

    
3573

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

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

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

    
4024
CREATE TABLE SEQUENCE_ANNOTATION (
4025
    SEQUENCE_ID INTEGER NOT NULL,
4026
    ANNOTATIONS_ID INTEGER NOT NULL,
4027
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
4028
);
4029
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
4030
    REV INTEGER NOT NULL,
4031
    REVTYPE TINYINT,
4032
    SEQUENCE_ID INTEGER NOT NULL,
4033
    ANNOTATIONS_ID INTEGER NOT NULL
4034
);
4035

    
4036
CREATE TABLE SEQUENCE_MARKER (
4037
    SEQUENCE_ID INTEGER NOT NULL,
4038
    MARKERS_ID INTEGER NOT NULL,
4039
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
4040
);
4041
CREATE TABLE SEQUENCE_MARKER_AUD (
4042
    REV INTEGER NOT NULL,
4043
    REVTYPE TINYINT,
4044
    SEQUENCE_ID INTEGER NOT NULL,
4045
    MARKERS_ID INTEGER NOT NULL
4046
);
4047
CREATE TABLE SEQUENCE_REFERENCE (
4048
    SEQUENCE_ID INTEGER NOT NULL,
4049
    CITATIONS_ID INTEGER NOT NULL,
4050
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
4051
);
4052
CREATE TABLE SEQUENCE_REFERENCE_AUD (
4053
    REV INTEGER NOT NULL,
4054
    REVTYPE TINYINT,
4055
    SEQUENCE_ID INTEGER NOT NULL,
4056
    CITATIONS_ID INTEGER NOT NULL
4057
);
4058

    
4059
CREATE TABLE SINGLEREADALIGNMENT (
4060
    ID INTEGER NOT NULL,
4061
    CREATED TIMESTAMP,
4062
    UUID VARCHAR(36),
4063
    UPDATED TIMESTAMP,
4064
        EDITEDSEQUENCE CLOB,
4065
        SHIFTS CLOB,
4066
    REVERSECOMPLEMENT BIT,
4067
        FIRSTSEQPOSITION INTEGER,
4068
        LEFTCUTPOSITION INTEGER,
4069
        RIGHTCUTPOSITION INTEGER,
4070
        CREATEDBY_ID INTEGER,
4071
    UPDATEDBY_ID INTEGER,
4072
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4073
    SINGLEREAD_ID INTEGER NOT NULL,
4074
    PRIMARY KEY (ID)
4075
);
4076

    
4077
CREATE TABLE SINGLEREADALIGNMENT_AUD (
4078
    ID INTEGER NOT NULL,
4079
    REV INTEGER NOT NULL,
4080
    REVTYPE TINYINT,
4081
    CREATED TIMESTAMP,
4082
    UUID VARCHAR(36),
4083
    UPDATED TIMESTAMP,
4084
        EDITEDSEQUENCE CLOB,
4085
        SHIFTS CLOB,
4086
    REVERSECOMPLEMENT BIT,
4087
        FIRSTSEQPOSITION INTEGER,
4088
        LEFTCUTPOSITION INTEGER,
4089
        RIGHTCUTPOSITION INTEGER,
4090
        CREATEDBY_ID INTEGER,
4091
    UPDATEDBY_ID INTEGER,
4092
    CONSENSUSALIGNMENT_ID INTEGER NULL,
4093
    SINGLEREAD_ID INTEGER NOT NULL
4094
);
4095

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

    
4140
CREATE TABLE SINGLEREAD_ANNOTATION (
4141
    SINGLEREAD_ID INTEGER NOT NULL,
4142
    ANNOTATIONS_ID INTEGER NOT NULL,
4143
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
4144
);
4145
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
4146
    REV INTEGER NOT NULL,
4147
    REVTYPE TINYINT,
4148
    SINGLEREAD_ID INTEGER NOT NULL,
4149
    ANNOTATIONS_ID INTEGER NOT NULL
4150
);
4151

    
4152
CREATE TABLE SINGLEREAD_MARKER (
4153
    SINGLEREAD_ID INTEGER NOT NULL,
4154
    MARKERS_ID INTEGER NOT NULL,
4155
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
4156
);
4157

    
4158
CREATE TABLE SINGLEREAD_MARKER_AUD (
4159
    REV INTEGER NOT NULL,
4160
    REVTYPE TINYINT,
4161
    SINGLEREAD_ID INTEGER NOT NULL,
4162
    MARKERS_ID INTEGER NOT NULL
4163
);
4164

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

    
4303
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4304
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4305
    IDENTIFIERS_ID INTEGER NOT NULL,
4306
    SORTINDEX INTEGER NOT NULL
4307
);
4308
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4309
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4310
    REV INTEGER NOT NULL,
4311
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4312
    IDENTIFIERS_ID INTEGER NOT NULL,
4313
    SORTINDEX INTEGER NOT NULL,
4314
    REVTYPE TINYINT
4315
);
4316
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4317

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