Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (363 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.AUTHORITY(
509
    DTYPE VARCHAR(31) NOT NULL,
510
    ID INTEGER NOT NULL,
511
    CREATED TIMESTAMP,
512
    UUID VARCHAR(36),
513
    PROPERTY VARCHAR(255),
514
        PERMISSIONCLASS VARCHAR(255),
515
        OPERATIONS VARCHAR(255),
516
        TARGETUUID VARCHAR(36),
517
    ROLE VARCHAR(255),
518
    CREATEDBY_ID INTEGER
519
);
520
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AUTHORITY;
521
CREATE CACHED TABLE PUBLIC.CDMMETADATA(
522
    ID INTEGER NOT NULL,
523
    CREATED TIMESTAMP,
524
    UUID VARCHAR(36),
525
    PROPERTYNAME VARCHAR(20),
526
    VALUE VARCHAR(255),
527
    CREATEDBY_ID INTEGER
528
);
529
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMMETADATA;
530
CREATE CACHED TABLE PUBLIC.CDMPREFERENCE(
531
    KEY_SUBJECT VARCHAR(100),
532
    KEY_PREDICATE VARCHAR(100),
533
    VALUE VARCHAR(1023),
534
        ALLOWOVERRIDE BOOLEAN NOT NULL
535
);
536
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMPREFERENCE;
537
CREATE CACHED TABLE PUBLIC.CLASSIFICATION(
538
    ID INTEGER NOT NULL,
539
    CREATED TIMESTAMP,
540
    UUID VARCHAR(36),
541
    UPDATED TIMESTAMP,
542
    LSID_AUTHORITY VARCHAR(255),
543
    LSID_LSID VARCHAR(255),
544
    LSID_NAMESPACE VARCHAR(255),
545
    LSID_OBJECT VARCHAR(255),
546
    LSID_REVISION VARCHAR(255),
547
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
548
    TITLECACHE VARCHAR(255),
549
    MICROREFERENCE VARCHAR(255),
550
    TIMEPERIOD_START VARCHAR(255),
551
    TIMEPERIOD_FREETEXT VARCHAR(255),
552
    TIMEPERIOD_END VARCHAR(255),
553
    CREATEDBY_ID INTEGER,
554
    UPDATEDBY_ID INTEGER,
555
    NAME_ID INTEGER,
556
    REFERENCE_ID INTEGER,
557
    ROOTNODE_ID INTEGER
558
);
559
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION;
560
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_AUD(
561
    ID INTEGER NOT NULL,
562
    REV INTEGER NOT NULL,
563
    REVTYPE TINYINT,
564
    CREATED TIMESTAMP,
565
    UUID VARCHAR(36),
566
    UPDATED TIMESTAMP,
567
    LSID_AUTHORITY VARCHAR(255),
568
    LSID_LSID VARCHAR(255),
569
    LSID_NAMESPACE VARCHAR(255),
570
    LSID_OBJECT VARCHAR(255),
571
    LSID_REVISION VARCHAR(255),
572
    PROTECTEDTITLECACHE BOOLEAN,
573
    TITLECACHE VARCHAR(255),
574
    MICROREFERENCE VARCHAR(255),
575
    TIMEPERIOD_START VARCHAR(255),
576
    TIMEPERIOD_FREETEXT VARCHAR(255),
577
    TIMEPERIOD_END VARCHAR(255),
578
    CREATEDBY_ID INTEGER,
579
    UPDATEDBY_ID INTEGER,
580
    NAME_ID INTEGER,
581
    REFERENCE_ID INTEGER,
582
    ROOTNODE_ID INTEGER
583
);
584
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_AUD;
585
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION(
586
    CLASSIFICATION_ID INTEGER NOT NULL,
587
    ANNOTATIONS_ID INTEGER NOT NULL
588
);
589
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION;
590
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION_AUD(
591
    REV INTEGER NOT NULL,
592
    CLASSIFICATION_ID INTEGER NOT NULL,
593
    ANNOTATIONS_ID INTEGER NOT NULL,
594
    REVTYPE TINYINT
595
);
596
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION_AUD;
597
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT(
598
    CLASSIFICATION_ID INTEGER NOT NULL,
599
    CREDITS_ID INTEGER NOT NULL,
600
    SORTINDEX INTEGER NOT NULL
601
);
602
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT;
603
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT_AUD(
604
    REV INTEGER NOT NULL,
605
    CLASSIFICATION_ID INTEGER NOT NULL,
606
    CREDITS_ID INTEGER NOT NULL,
607
    SORTINDEX INTEGER NOT NULL,
608
    REVTYPE TINYINT
609
);
610
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT_AUD;
611

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

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

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

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

    
1354
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER(
1355
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1356
    IDENTIFIERS_ID INTEGER NOT NULL,
1357
    SORTINDEX INTEGER NOT NULL
1358
);
1359
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER;
1360
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD(
1361
    REV INTEGER NOT NULL,
1362
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1363
    IDENTIFIERS_ID INTEGER NOT NULL,
1364
    SORTINDEX INTEGER NOT NULL,
1365
    REVTYPE TINYINT
1366
);
1367
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD;
1368

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

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

    
1908
CREATE CACHED TABLE PUBLIC.ENTITYVALIDATION(
1909
    ID INTEGER NOT NULL,
1910
    UUID VARCHAR(36),
1911
    CREATED TIMESTAMP,
1912
    VALIDATEDENTITYID INTEGER,
1913
    VALIDATEDENTITYUUID VARCHAR(36),
1914
    VALIDATEDENTITYCLASS VARCHAR(255),
1915
    VALIDATIONCOUNT INTEGER,
1916
    UPDATED TIMESTAMP,
1917
    USERFRIENDLYDESCRIPTION VARCHAR(255),
1918
    USERFRIENDLYTYPENAME VARCHAR(255),
1919
    CREATEDBY_ID INTEGER,
1920
    UPDATEDBY_ID INTEGER,
1921
    CRUDEVENTTYPE VARCHAR(24),
1922
    STATUS VARCHAR(16)
1923
);
1924
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYVALIDATION;
1925

    
1926
CREATE CACHED TABLE PUBLIC.ENTITYCONSTRAINTVIOLATION(
1927
    ID INTEGER NOT NULL,
1928
    UUID VARCHAR(36),
1929
    CREATED TIMESTAMP,
1930
    PROPERTYPATH VARCHAR(255),
1931
    USERFRIENDLYFIELDNAME VARCHAR(255),
1932
    INVALIDVALUE VARCHAR(255),
1933
    SEVERITY VARCHAR(24),
1934
    MESSAGE VARCHAR(255),
1935
    VALIDATOR VARCHAR(255),
1936
    VALIDATIONGROUP VARCHAR(63),
1937
    CREATEDBY_ID INTEGER,
1938
    UPDATEDBY_ID INTEGER,
1939
    ENTITYVALIDATION_ID INTEGER
1940
);
1941
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYCONSTRAINTVIOLATION;
1942

    
1943
CREATE CACHED TABLE PUBLIC.EXTENSION(
1944
    ID INTEGER NOT NULL,
1945
    CREATED TIMESTAMP,
1946
    UUID VARCHAR(36),
1947
    UPDATED TIMESTAMP,
1948
    VALUE CLOB,
1949
    CREATEDBY_ID INTEGER,
1950
    UPDATEDBY_ID INTEGER,
1951
    TYPE_ID INTEGER
1952
);
1953
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION;
1954
CREATE CACHED TABLE PUBLIC.EXTENSION_AUD(
1955
    ID INTEGER NOT NULL,
1956
    REV INTEGER NOT NULL,
1957
    REVTYPE TINYINT,
1958
    CREATED TIMESTAMP,
1959
    UUID VARCHAR(36),
1960
    UPDATED TIMESTAMP,
1961
    VALUE CLOB,
1962
    CREATEDBY_ID INTEGER,
1963
    UPDATEDBY_ID INTEGER,
1964
    TYPE_ID INTEGER
1965
);
1966
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION_AUD;
1967
CREATE CACHED TABLE PUBLIC.EXTERNALLINK(
1968
    ID INTEGER NOT NULL,
1969
    CREATED TIMESTAMP,
1970
    UUID VARCHAR(36),
1971
    UPDATED TIMESTAMP,
1972
    SIZE INTEGER,
1973
    URI CLOB,
1974
        LINKTYPE VARCHAR(10),
1975
    CREATEDBY_ID INTEGER,
1976
    UPDATEDBY_ID INTEGER,
1977
    SORTINDEX INTEGER
1978
);
1979
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART;
1980
CREATE CACHED TABLE PUBLIC.EXTERNALLINK_AUD(
1981
    ID INTEGER NOT NULL,
1982
    REV INTEGER NOT NULL,
1983
    REVTYPE TINYINT,
1984
    CREATED TIMESTAMP,
1985
    UUID VARCHAR(36),
1986
    UPDATED TIMESTAMP,
1987
    SIZE INTEGER,
1988
    URI CLOB,
1989
        LINKTYPE VARCHAR(10),
1990
    CREATEDBY_ID INTEGER,
1991
    UPDATEDBY_ID INTEGER,
1992
);
1993
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART_AUD;
1994
CREATE CACHED TABLE PUBLIC.EXTERNALLINK_LANGUAGESTRING(
1995
    EXTERNALLINK_ID INTEGER NOT NULL,
1996
    DESCRIPTION_ID INTEGER NOT NULL,
1997
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
1998
);
1999
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTERNALLINK_LANGUAGESTRING;
2000
CREATE CACHED TABLE PUBLIC.EXTERNALLINK_LANGUAGESTRING_AUD(
2001
    REV INTEGER NOT NULL,
2002
    EXTERNALLINK_ID INTEGER NOT NULL,
2003
    DESCRIPTION_ID INTEGER NOT NULL,
2004
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2005
    REVTYPE TINYINT
2006
);
2007
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTERNALLINK_LANGUAGESTRING_AUD;
2008
CREATE CACHED TABLE PUBLIC.FEATURESTATE(
2009
    ID INTEGER NOT NULL,
2010
    CREATED TIMESTAMP,
2011
    UUID VARCHAR(36),
2012
    UPDATED TIMESTAMP,
2013
    FEATURE_ID INTEGER,
2014
    STATE_ID INTEGER,
2015
        CREATEDBY_ID INTEGER,
2016
    UPDATEDBY_ID INTEGER,
2017
);
2018
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURESTATE;
2019
CREATE CACHED TABLE PUBLIC.FEATURESTATE_AUD(
2020
    ID INTEGER NOT NULL,
2021
    CREATED TIMESTAMP,
2022
        REV INTEGER NOT NULL,
2023
    REVTYPE TINYINT,
2024
    UUID VARCHAR(36),
2025
    UPDATED TIMESTAMP,
2026
    FEATURE_ID INTEGER,
2027
    STATE_ID INTEGER,
2028
        CREATEDBY_ID INTEGER,
2029
    UPDATEDBY_ID INTEGER,
2030
);
2031
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURESTATE_AUD;
2032
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT(
2033
    ID INTEGER NOT NULL,
2034
    CREATED TIMESTAMP,
2035
    UUID VARCHAR(36),
2036
    UPDATED TIMESTAMP,
2037
    DESCRIPTION VARCHAR(255),
2038
    TIMEPERIOD_END VARCHAR(255),
2039
    TIMEPERIOD_FREETEXT VARCHAR(255),
2040
    TIMEPERIOD_START VARCHAR(255),
2041
    ABSOLUTEELEVATION INTEGER,
2042
    ABSOLUTEELEVATIONMAX INTEGER,
2043
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
2044
    COLLECTINGMETHOD VARCHAR(255),
2045
    DISTANCETOGROUND DOUBLE,
2046
    DISTANCETOGROUNDMAX DOUBLE,
2047
    DISTANCETOGROUNDTEXT VARCHAR(30),
2048
    DISTANCETOWATERSURFACE DOUBLE,
2049
    DISTANCETOWATERSURFACEMAX DOUBLE,
2050
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
2051
    EXACTLOCATION_ERRORRADIUS INTEGER,
2052
    EXACTLOCATION_LATITUDE DOUBLE,
2053
    EXACTLOCATION_LONGITUDE DOUBLE,
2054
    CREATEDBY_ID INTEGER,
2055
    UPDATEDBY_ID INTEGER,
2056
    ACTOR_ID INTEGER,
2057
    COUNTRY_ID INTEGER,
2058
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
2059
    LOCALITY_ID INTEGER
2060
);
2061
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT;
2062
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_AUD(
2063
    ID INTEGER NOT NULL,
2064
    REV INTEGER NOT NULL,
2065
    REVTYPE TINYINT,
2066
    CREATED TIMESTAMP,
2067
    UUID VARCHAR(36),
2068
    UPDATED TIMESTAMP,
2069
    DESCRIPTION VARCHAR(255),
2070
    TIMEPERIOD_END VARCHAR(255),
2071
    TIMEPERIOD_FREETEXT VARCHAR(255),
2072
    TIMEPERIOD_START VARCHAR(255),
2073
    ABSOLUTEELEVATION INTEGER,
2074
    ABSOLUTEELEVATIONMAX INTEGER,
2075
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
2076
    COLLECTINGMETHOD VARCHAR(255),
2077
    DISTANCETOGROUND DOUBLE,
2078
    DISTANCETOGROUNDMAX DOUBLE,
2079
    DISTANCETOGROUNDTEXT VARCHAR(30),
2080
    DISTANCETOWATERSURFACE DOUBLE,
2081
    DISTANCETOWATERSURFACEMAX DOUBLE,
2082
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
2083
    EXACTLOCATION_ERRORRADIUS INTEGER,
2084
    EXACTLOCATION_LATITUDE DOUBLE,
2085
    EXACTLOCATION_LONGITUDE DOUBLE,
2086
    CREATEDBY_ID INTEGER,
2087
    UPDATEDBY_ID INTEGER,
2088
    ACTOR_ID INTEGER,
2089
    COUNTRY_ID INTEGER,
2090
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
2091
    LOCALITY_ID INTEGER
2092
);
2093
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_AUD;
2094
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION(
2095
    GATHERINGEVENT_ID INTEGER NOT NULL,
2096
    ANNOTATIONS_ID INTEGER NOT NULL
2097
);
2098
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION;
2099
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD(
2100
    REV INTEGER NOT NULL,
2101
    GATHERINGEVENT_ID INTEGER NOT NULL,
2102
    ANNOTATIONS_ID INTEGER NOT NULL,
2103
    REVTYPE TINYINT
2104
);
2105
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION_AUD;
2106
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE(
2107
    GATHERINGEVENT_ID INTEGER NOT NULL,
2108
    COLLECTINGAREAS_ID INTEGER NOT NULL
2109
);
2110
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE;
2111
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD(
2112
    REV INTEGER NOT NULL,
2113
    GATHERINGEVENT_ID INTEGER NOT NULL,
2114
    COLLECTINGAREAS_ID INTEGER NOT NULL,
2115
    REVTYPE TINYINT
2116
);
2117
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD;
2118
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER(
2119
    GATHERINGEVENT_ID INTEGER NOT NULL,
2120
    MARKERS_ID INTEGER NOT NULL
2121
);
2122
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER;
2123
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD(
2124
    REV INTEGER NOT NULL,
2125
    GATHERINGEVENT_ID INTEGER NOT NULL,
2126
    MARKERS_ID INTEGER NOT NULL,
2127
    REVTYPE TINYINT
2128
);
2129
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER_AUD;
2130
CREATE CACHED TABLE PUBLIC.GRANTEDAUTHORITYIMPL(
2131
    ID INTEGER NOT NULL,
2132
    CREATED TIMESTAMP,
2133
    UUID VARCHAR(36),
2134
    AUTHORITY VARCHAR(255) NOT NULL,
2135
    CREATEDBY_ID INTEGER
2136
);
2137
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GRANTEDAUTHORITYIMPL;
2138
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP(
2139
    ID INTEGER NOT NULL,
2140
    CREATED TIMESTAMP,
2141
    UUID VARCHAR(36),
2142
    UPDATED TIMESTAMP,
2143
    CREATEDBY_ID INTEGER,
2144
    UPDATEDBY_ID INTEGER
2145
);
2146
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP;
2147
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_AUD(
2148
    ID INTEGER NOT NULL,
2149
    REV INTEGER NOT NULL,
2150
    REVTYPE TINYINT,
2151
    CREATED TIMESTAMP,
2152
    UUID VARCHAR(36),
2153
    UPDATED TIMESTAMP,
2154
    CREATEDBY_ID INTEGER,
2155
    UPDATEDBY_ID INTEGER
2156
);
2157
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_AUD;
2158
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION(
2159
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2160
    ANNOTATIONS_ID INTEGER NOT NULL
2161
);
2162
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION;
2163
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD(
2164
    REV INTEGER NOT NULL,
2165
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2166
    ANNOTATIONS_ID INTEGER NOT NULL,
2167
    REVTYPE TINYINT
2168
);
2169
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD;
2170
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER(
2171
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2172
    MARKERS_ID INTEGER NOT NULL
2173
);
2174
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER;
2175
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD(
2176
    REV INTEGER NOT NULL,
2177
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2178
    MARKERS_ID INTEGER NOT NULL,
2179
    REVTYPE TINYINT
2180
);
2181
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER_AUD;
2182
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP(
2183
    ID INTEGER NOT NULL,
2184
    CREATED TIMESTAMP,
2185
    UUID VARCHAR(36),
2186
    UPDATED TIMESTAMP,
2187
    CITATIONMICROREFERENCE VARCHAR(255),
2188
    ORIGINALNAMESTRING VARCHAR(255),
2189
    DOUBTFUL BOOLEAN NOT NULL,
2190
    RULECONSIDERED VARCHAR(255),
2191
        CODEEDITION VARCHAR(20),
2192
    CREATEDBY_ID INTEGER,
2193
    UPDATEDBY_ID INTEGER,
2194
    CITATION_ID INTEGER,
2195
    RELATEDFROM_ID INTEGER,
2196
    RELATEDTO_ID INTEGER,
2197
    TYPE_ID INTEGER
2198
);
2199
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP;
2200
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD(
2201
    ID INTEGER NOT NULL,
2202
    REV INTEGER NOT NULL,
2203
    REVTYPE TINYINT,
2204
    CREATED TIMESTAMP,
2205
    UUID VARCHAR(36),
2206
    UPDATED TIMESTAMP,
2207
    CITATIONMICROREFERENCE VARCHAR(255),
2208
    ORIGINALNAMESTRING VARCHAR(255),
2209
    DOUBTFUL BOOLEAN,
2210
    RULECONSIDERED VARCHAR(255),
2211
    CODEEDITION VARCHAR(20),
2212
    CREATEDBY_ID INTEGER,
2213
    UPDATEDBY_ID INTEGER,
2214
    CITATION_ID INTEGER,
2215
    RELATEDFROM_ID INTEGER,
2216
    RELATEDTO_ID INTEGER,
2217
    TYPE_ID INTEGER
2218
);
2219
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_AUD;
2220
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION(
2221
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2222
    ANNOTATIONS_ID INTEGER NOT NULL
2223
);
2224
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION;
2225
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD(
2226
    REV INTEGER NOT NULL,
2227
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2228
    ANNOTATIONS_ID INTEGER NOT NULL,
2229
    REVTYPE TINYINT
2230
);
2231
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD;
2232
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER(
2233
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2234
    MARKERS_ID INTEGER NOT NULL
2235
);
2236
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER;
2237
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD(
2238
    REV INTEGER NOT NULL,
2239
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2240
    MARKERS_ID INTEGER NOT NULL,
2241
    REVTYPE TINYINT
2242
);
2243
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD;
2244
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING(
2245
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2246
    DESCRIPTION_ID INTEGER NOT NULL,
2247
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2248
);
2249
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING;
2250
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD(
2251
    REV INTEGER NOT NULL,
2252
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2253
    DESCRIPTION_ID INTEGER NOT NULL,
2254
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2255
    REVTYPE TINYINT
2256
);
2257
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD;
2258
CREATE CACHED TABLE PUBLIC.IDENTIFIER(
2259
    ID INTEGER NOT NULL,
2260
    UUID VARCHAR(36),
2261
    CREATED TIMESTAMP,
2262
    UPDATED TIMESTAMP,
2263
    IDENTIFIER VARCHAR(800),
2264
    CREATEDBY_ID INTEGER,
2265
    UPDATEDBY_ID INTEGER,
2266
          TYPE_ID INTEGER  
2267
);
2268
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER;
2269
CREATE CACHED TABLE PUBLIC.IDENTIFIER_AUD(
2270
        ID INTEGER NOT NULL,
2271
    REV INTEGER NOT NULL,
2272
    REVTYPE TINYINT,
2273
    UUID VARCHAR(36),
2274
    CREATED TIMESTAMP,
2275
    UPDATED TIMESTAMP,
2276
    IDENTIFIER VARCHAR(800),
2277
    CREATEDBY_ID INTEGER,
2278
    UPDATEDBY_ID INTEGER,
2279
          TYPE_ID INTEGER  
2280
);
2281
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_AUD;
2282
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION(
2283
    IDENTIFIER_ID INTEGER NOT NULL,
2284
    ANNOTATIONS_ID INTEGER NOT NULL
2285
);
2286
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION;
2287
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION_AUD(
2288
    REV INTEGER NOT NULL,
2289
    IDENTIFIER_ID INTEGER NOT NULL,
2290
    ANNOTATIONS_ID INTEGER NOT NULL,
2291
    REVTYPE TINYINT
2292
);
2293
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION_AUD;
2294
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER(
2295
    IDENTIFIER_ID INTEGER NOT NULL,
2296
    MARKERS_ID INTEGER NOT NULL
2297
);
2298
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER;
2299
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER_AUD(
2300
    REV INTEGER NOT NULL,
2301
    IDENTIFIER_ID INTEGER NOT NULL,
2302
    MARKERS_ID INTEGER NOT NULL,
2303
    REVTYPE TINYINT
2304
);
2305
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER_AUD;
2306
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE(
2307
    ID INTEGER NOT NULL,
2308
    UUID VARCHAR(36),
2309
    CREATED TIMESTAMP,
2310
    UPDATED TIMESTAMP,
2311
    CREATEDBY_ID INTEGER,
2312
    UPDATEDBY_ID INTEGER,
2313
          STARTPOS INT,
2314
          ENDPOS INT,
2315
          AGENT_ID INT,
2316
          ANNOTATION_ID INT,
2317
          LANGUAGESTRING_ID INT,
2318
          MEDIA_ID INT,
2319
          OCCURRENCE_ID INT,
2320
          REFERENCE_ID INT,
2321
        SOURCE_ID INT,
2322
          TAXON_ID INT,
2323
          TAXONNAME_ID INT,
2324
        KEY_ID INT
2325
);
2326
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE;
2327
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE_AUD(
2328
    ID INTEGER NOT NULL,
2329
    REV INTEGER NOT NULL,
2330
    REVTYPE TINYINT,
2331
    UUID VARCHAR(36),
2332
    CREATED TIMESTAMP,
2333
    UPDATED TIMESTAMP,
2334
    CREATEDBY_ID INTEGER,
2335
    UPDATEDBY_ID INTEGER,
2336
          STARTPOS INT,
2337
          ENDPOS INT,
2338
          AGENT_ID INT,
2339
          ANNOTATION_ID INT,
2340
          LANGUAGESTRING_ID INT,
2341
          MEDIA_ID INT,
2342
          OCCURRENCE_ID INT,
2343
          REFERENCE_ID INT,
2344
        SOURCE_ID INT,
2345
          TAXON_ID INT,
2346
          TAXONNAME_ID INT,
2347
        KEY_ID INT
2348
);
2349
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE_AUD;
2350
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP(
2351
    ID INTEGER NOT NULL,
2352
    CREATED TIMESTAMP,
2353
    UUID VARCHAR(36),
2354
    UPDATED TIMESTAMP,
2355
    DEPARTMENT VARCHAR(255),
2356
    PERIOD_END VARCHAR(255),
2357
    PERIOD_FREETEXT VARCHAR(255),
2358
    PERIOD_START VARCHAR(255),
2359
    ROLE VARCHAR(255),
2360
    CREATEDBY_ID INTEGER,
2361
    UPDATEDBY_ID INTEGER,
2362
    INSTITUTE_ID INTEGER,
2363
    PERSON_ID INTEGER
2364
);
2365
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP;
2366
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD(
2367
    ID INTEGER NOT NULL,
2368
    REV INTEGER NOT NULL,
2369
    REVTYPE TINYINT,
2370
    CREATED TIMESTAMP,
2371
    UUID VARCHAR(36),
2372
    UPDATED TIMESTAMP,
2373
    DEPARTMENT VARCHAR(255),
2374
    PERIOD_END VARCHAR(255),
2375
    PERIOD_FREETEXT VARCHAR(255),
2376
    PERIOD_START VARCHAR(255),
2377
    ROLE VARCHAR(255),
2378
    CREATEDBY_ID INTEGER,
2379
    UPDATEDBY_ID INTEGER,
2380
    INSTITUTE_ID INTEGER,
2381
    PERSON_ID INTEGER
2382
);
2383
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP_AUD;
2384
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT(
2385
    ID INTEGER NOT NULL,
2386
    CREATED TIMESTAMP,
2387
    UUID VARCHAR(36),
2388
    UPDATED TIMESTAMP,
2389
    CREATEDBY_ID INTEGER,
2390
    UPDATEDBY_ID INTEGER
2391
);
2392
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT;
2393
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_AUD(
2394
    ID INTEGER NOT NULL,
2395
    REV INTEGER NOT NULL,
2396
    REVTYPE TINYINT,
2397
    CREATED TIMESTAMP,
2398
    UUID VARCHAR(36),
2399
    UPDATED TIMESTAMP,
2400
    CREATEDBY_ID INTEGER,
2401
    UPDATEDBY_ID INTEGER
2402
);
2403
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_AUD;
2404
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING(
2405
    KEYSTATEMENT_ID INTEGER NOT NULL,
2406
    LABEL_ID INTEGER NOT NULL,
2407
    LABEL_MAPKEY_ID INTEGER NOT NULL
2408
);
2409
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING;
2410
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD(
2411
    REV INTEGER NOT NULL,
2412
    KEYSTATEMENT_ID INTEGER NOT NULL,
2413
    LABEL_ID INTEGER NOT NULL,
2414
    LABEL_MAPKEY_ID INTEGER NOT NULL,
2415
    REVTYPE TINYINT
2416
);
2417
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD;
2418
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY(
2419
    ID INTEGER NOT NULL,
2420
    CREATED TIMESTAMP,
2421
    UUID VARCHAR(36),
2422
    AUTHORITY VARCHAR(255),
2423
    AUTHORITYWSDL CLOB,
2424
    PORT INTEGER NOT NULL,
2425
    SERVER VARCHAR(255),
2426
    URL VARCHAR(255),
2427
    CREATEDBY_ID INTEGER
2428
);
2429
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY;
2430
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES(
2431
    LSIDAUTHORITY_ID INTEGER NOT NULL,
2432
    NAMESPACES_ELEMENT VARCHAR(255),
2433
    NAMESPACES_MAPKEY VARCHAR(255) NOT NULL
2434
);
2435
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY_NAMESPACES;
2436
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING(
2437
    ID INTEGER NOT NULL,
2438
    CREATED TIMESTAMP,
2439
    UUID VARCHAR(36),
2440
    UPDATED TIMESTAMP,
2441
    TEXT CLOB,
2442
    CREATEDBY_ID INTEGER,
2443
    UPDATEDBY_ID INTEGER,
2444
    LANGUAGE_ID INTEGER
2445
);
2446
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING;
2447
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_AUD(
2448
    ID INTEGER NOT NULL,
2449
    REV INTEGER NOT NULL,
2450
    REVTYPE TINYINT,
2451
    CREATED TIMESTAMP,
2452
    UUID VARCHAR(36),
2453
    UPDATED TIMESTAMP,
2454
    TEXT CLOB,
2455
    CREATEDBY_ID INTEGER,
2456
    UPDATEDBY_ID INTEGER,
2457
    LANGUAGE_ID INTEGER
2458
);
2459
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_AUD;
2460
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION(
2461
    LANGUAGESTRING_ID INTEGER NOT NULL,
2462
    ANNOTATIONS_ID INTEGER NOT NULL
2463
);
2464
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION;
2465
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD(
2466
    REV INTEGER NOT NULL,
2467
    LANGUAGESTRING_ID INTEGER NOT NULL,
2468
    ANNOTATIONS_ID INTEGER NOT NULL,
2469
    REVTYPE TINYINT
2470
);
2471
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION_AUD;
2472
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER(
2473
    LANGUAGESTRING_ID INTEGER NOT NULL,
2474
    MARKERS_ID INTEGER NOT NULL
2475
);
2476
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER;
2477
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD(
2478
    REV INTEGER NOT NULL,
2479
    LANGUAGESTRING_ID INTEGER NOT NULL,
2480
    MARKERS_ID INTEGER NOT NULL,
2481
    REVTYPE TINYINT
2482
);
2483
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER_AUD;
2484
CREATE CACHED TABLE PUBLIC.LOCUS(
2485
    ID INTEGER NOT NULL,
2486
    CREATED TIMESTAMP,
2487
    UUID VARCHAR(36),
2488
    UPDATED TIMESTAMP,
2489
    DESCRIPTION VARCHAR(255),
2490
    NAME VARCHAR(255),
2491
    CREATEDBY_ID INTEGER,
2492
    UPDATEDBY_ID INTEGER
2493
);
2494
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS;
2495
CREATE CACHED TABLE PUBLIC.LOCUS_AUD(
2496
    ID INTEGER NOT NULL,
2497
    REV INTEGER NOT NULL,
2498
    REVTYPE TINYINT,
2499
    CREATED TIMESTAMP,
2500
    UUID VARCHAR(36),
2501
    UPDATED TIMESTAMP,
2502
    DESCRIPTION VARCHAR(255),
2503
    NAME VARCHAR(255),
2504
    CREATEDBY_ID INTEGER,
2505
    UPDATEDBY_ID INTEGER
2506
);
2507
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS_AUD;
2508
CREATE CACHED TABLE PUBLIC.MARKER(
2509
    ID INTEGER NOT NULL,
2510
    CREATED TIMESTAMP,
2511
    UUID VARCHAR(36),
2512
    UPDATED TIMESTAMP,
2513
    FLAG BOOLEAN NOT NULL,
2514
    CREATEDBY_ID INTEGER,
2515
    UPDATEDBY_ID INTEGER,
2516
    MARKERTYPE_ID INTEGER
2517
);
2518
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER;
2519
CREATE CACHED TABLE PUBLIC.MARKER_AUD(
2520
    ID INTEGER NOT NULL,
2521
    REV INTEGER NOT NULL,
2522
    REVTYPE TINYINT,
2523
    CREATED TIMESTAMP,
2524
    UUID VARCHAR(36),
2525
    UPDATED TIMESTAMP,
2526
    FLAG BOOLEAN,
2527
    CREATEDBY_ID INTEGER,
2528
    UPDATEDBY_ID INTEGER,
2529
    MARKERTYPE_ID INTEGER
2530
);
2531

    
2532
CREATE TABLE MATERIALORMETHODEVENT (
2533
    ID INTEGER NOT NULL,
2534
    DTYPE VARCHAR(255),
2535
    CREATED TIMESTAMP,
2536
    UUID VARCHAR(36),
2537
    UPDATED TIMESTAMP,
2538
    MATERIALMETHODTEXT VARCHAR(255),
2539
    DESCRIPTION VARCHAR(255),
2540
    TIMEPERIOD_END VARCHAR(255),
2541
    TIMEPERIOD_FREETEXT VARCHAR(255),
2542
    TIMEPERIOD_START VARCHAR(255),
2543
        STRAIN VARCHAR(255),
2544
    TEMPERATURE DOUBLE,
2545
    CREATEDBY_ID INTEGER,
2546
    UPDATEDBY_ID INTEGER,
2547
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2548
    ACTOR_ID INTEGER,
2549
    FORWARDPRIMER_ID INTEGER,
2550
    REVERSEPRIMER_ID INTEGER,
2551
    MEDIUM_ID INTEGER,
2552
    PRIMARY KEY (ID)
2553
);
2554

    
2555
CREATE TABLE MATERIALORMETHODEVENT_AUD (
2556
    ID INTEGER NOT NULL,
2557
    REV INTEGER NOT NULL,
2558
    REVTYPE TINYINT,
2559
        DTYPE VARCHAR(255),
2560
    CREATED TIMESTAMP,
2561
    UUID VARCHAR(36),
2562
    UPDATED TIMESTAMP,
2563
    MATERIALMETHODTEXT VARCHAR(255),
2564
    DESCRIPTION VARCHAR(255),
2565
    TIMEPERIOD_END VARCHAR(255),
2566
    TIMEPERIOD_FREETEXT VARCHAR(255),
2567
    TIMEPERIOD_START VARCHAR(255),
2568
        STRAIN VARCHAR(255),
2569
    TEMPERATURE DOUBLE,
2570
    CREATEDBY_ID INTEGER,
2571
    UPDATEDBY_ID INTEGER,
2572
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2573
    ACTOR_ID INTEGER,
2574
    FORWARDPRIMER_ID INTEGER,
2575
    REVERSEPRIMER_ID INTEGER,
2576
    MEDIUM_ID INTEGER
2577
);
2578

    
2579
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2580
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2581
    ANNOTATIONS_ID INTEGER NOT NULL,
2582
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2583
);
2584

    
2585
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2586
    REV INTEGER NOT NULL,
2587
    REVTYPE TINYINT,
2588
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2589
    ANNOTATIONS_ID INTEGER NOT NULL,
2590
);
2591

    
2592
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2593
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2594
    MARKERS_ID INTEGER NOT NULL,
2595
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2596
);
2597

    
2598
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2599
    REV INTEGER NOT NULL,
2600
    REVTYPE TINYINT,
2601
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2602
    MARKERS_ID INTEGER NOT NULL,
2603
);
2604

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

    
3396
CREATE TABLE PRIMER (
3397
    ID INTEGER NOT NULL,
3398
    CREATED TIMESTAMP,
3399
    UUID VARCHAR(36),
3400
    UPDATED TIMESTAMP,
3401
    LABEL VARCHAR(255),
3402
        SEQUENCE_LENGTH INTEGER,
3403
        SEQUENCE_STRING CLOB,
3404
    CREATEDBY_ID INTEGER,
3405
    UPDATEDBY_ID INTEGER,
3406
    DNAMARKER_ID INTEGER,
3407
        PUBLISHEDIN_ID INTEGER,
3408
        PRIMARY KEY (ID)
3409
);
3410
CREATE TABLE PRIMER_AUD (
3411
    ID INTEGER NOT NULL,
3412
    CREATED TIMESTAMP,
3413
    UUID VARCHAR(36),
3414
    UPDATED TIMESTAMP,
3415
    LABEL VARCHAR(255),
3416
    SEQUENCE_LENGTH INTEGER,
3417
    SEQUENCE_STRING CLOB,
3418
    CREATEDBY_ID INTEGER,
3419
    UPDATEDBY_ID INTEGER,
3420
        DNAMARKER_ID INTEGER,
3421
        PUBLISHEDIN_ID INTEGER,
3422
);
3423

    
3424
CREATE TABLE PRIMER_ANNOTATION (
3425
    PRIMER_ID INTEGER NOT NULL,
3426
    ANNOTATIONS_ID INTEGER NOT NULL,
3427
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3428
);
3429
CREATE TABLE PRIMER_ANNOTATION_AUD (
3430
    PRIMER_ID INTEGER NOT NULL,
3431
    ANNOTATIONS_ID INTEGER NOT NULL
3432
);
3433

    
3434
CREATE TABLE PRIMER_MARKER (
3435
    PRIMER_ID INTEGER NOT NULL,
3436
    MARKERS_ID INTEGER NOT NULL,
3437
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3438
);
3439
CREATE TABLE PRIMER_MARKER_AUD (
3440
    PRIMER_ID INTEGER NOT NULL,
3441
    MARKERS_ID INTEGER NOT NULL
3442
);
3443

    
3444

    
3445
CREATE CACHED TABLE PUBLIC.REFERENCE(
3446
    ID INTEGER NOT NULL,
3447
    CREATED TIMESTAMP,
3448
    UUID VARCHAR(36),
3449
    UPDATED TIMESTAMP,
3450
    LSID_AUTHORITY VARCHAR(255),
3451
    LSID_LSID VARCHAR(255),
3452
    LSID_NAMESPACE VARCHAR(255),
3453
    LSID_OBJECT VARCHAR(255),
3454
    LSID_REVISION VARCHAR(255),
3455
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3456
    TITLECACHE VARCHAR(800),
3457
    DATEPUBLISHED_END VARCHAR(255),
3458
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3459
    DATEPUBLISHED_START VARCHAR(255),
3460
        DATEPUBLISHED_VERBATIMDATE VARCHAR(255),
3461
    EDITION VARCHAR(255),
3462
    EDITOR VARCHAR(255),
3463
    ISBN VARCHAR(255),
3464
    ISSN VARCHAR(255),
3465
    DOI VARCHAR(255),
3466
    NOMENCLATURALLYRELEVANT BOOLEAN NOT NULL,
3467
    ORGANIZATION VARCHAR(255),
3468
    PAGES VARCHAR(255),
3469
    PARSINGPROBLEM INTEGER NOT NULL,
3470
    PLACEPUBLISHED VARCHAR(255),
3471
    PROBLEMENDS INTEGER NOT NULL,
3472
    PROBLEMSTARTS INTEGER NOT NULL,
3473
    PUBLISHER VARCHAR(255),
3474
    REFERENCEABSTRACT CLOB,
3475
    SERIESPART VARCHAR(255),
3476
    TITLE CLOB,
3477
    ABBREVTITLE VARCHAR(255),
3478
    ABBREVTITLECACHE CLOB,
3479
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3480
    REFTYPE VARCHAR(4),
3481
    URI CLOB,
3482
    VOLUME VARCHAR(255),
3483
    ACCESSED TIMESTAMP,
3484
    LASTRETRIEVED TIMESTAMP,
3485
    EXTERNALID VARCHAR(255),
3486
    EXTERNALLINK CLOB,
3487
    AUTHORITYTYPE VARCHAR(10),
3488
        IMPORTMETHOD VARCHAR(30),
3489
    CREATEDBY_ID INTEGER,
3490
    UPDATEDBY_ID INTEGER,
3491
    AUTHORSHIP_ID INTEGER,
3492
    INREFERENCE_ID INTEGER,
3493
    INSTITUTION_ID INTEGER,
3494
    SCHOOL_ID INTEGER
3495
);
3496
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE;
3497
CREATE INDEX PUBLIC.REFERENCETITLECACHEINDEX ON PUBLIC.REFERENCE(TITLECACHE);
3498
CREATE CACHED TABLE PUBLIC.REFERENCE_AUD(
3499
    ID INTEGER NOT NULL,
3500
    REV INTEGER NOT NULL,
3501
    REVTYPE TINYINT,
3502
    CREATED TIMESTAMP,
3503
    UUID VARCHAR(36),
3504
    UPDATED TIMESTAMP,
3505
    LSID_AUTHORITY VARCHAR(255),
3506
    LSID_LSID VARCHAR(255),
3507
    LSID_NAMESPACE VARCHAR(255),
3508
    LSID_OBJECT VARCHAR(255),
3509
    LSID_REVISION VARCHAR(255),
3510
    PROTECTEDTITLECACHE BOOLEAN,
3511
    TITLECACHE VARCHAR(800),
3512
    DATEPUBLISHED_END VARCHAR(255),
3513
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3514
    DATEPUBLISHED_START VARCHAR(255),
3515
    DATEPUBLISHED_VERBATIMDATE VARCHAR(255),
3516
    EDITION VARCHAR(255),
3517
    EDITOR VARCHAR(255),
3518
    ISBN VARCHAR(255),
3519
    ISSN VARCHAR(255),
3520
    DOI VARCHAR(255),
3521
    NOMENCLATURALLYRELEVANT BOOLEAN,
3522
    ORGANIZATION VARCHAR(255),
3523
    PAGES VARCHAR(255),
3524
    PARSINGPROBLEM INTEGER,
3525
    PLACEPUBLISHED VARCHAR(255),
3526
    PROBLEMENDS INTEGER,
3527
    PROBLEMSTARTS INTEGER,
3528
    PUBLISHER VARCHAR(255),
3529
    REFERENCEABSTRACT CLOB,
3530
    SERIESPART VARCHAR(255),
3531
    TITLE CLOB,
3532
    ABBREVTITLE VARCHAR(255),
3533
    ABBREVTITLECACHE CLOB,
3534
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3535
    REFTYPE  VARCHAR(4),
3536
    URI CLOB,
3537
    VOLUME VARCHAR(255),
3538
    ACCESSED TIMESTAMP,
3539
    LASTRETRIEVED TIMESTAMP,
3540
    EXTERNALID VARCHAR(255),
3541
    EXTERNALLINK CLOB,
3542
    AUTHORITYTYPE  VARCHAR(10),
3543
        IMPORTMETHOD VARCHAR(30),
3544
    CREATEDBY_ID INTEGER,
3545
    UPDATEDBY_ID INTEGER,
3546
    AUTHORSHIP_ID INTEGER,
3547
    INREFERENCE_ID INTEGER,
3548
    INSTITUTION_ID INTEGER,
3549
    SCHOOL_ID INTEGER
3550
);
3551
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_AUD;
3552
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION(
3553
    REFERENCE_ID INTEGER NOT NULL,
3554
    ANNOTATIONS_ID INTEGER NOT NULL
3555
);
3556
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION;
3557
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION_AUD(
3558
    REV INTEGER NOT NULL,
3559
    REFERENCE_ID INTEGER NOT NULL,
3560
    ANNOTATIONS_ID INTEGER NOT NULL,
3561
    REVTYPE TINYINT
3562
);
3563
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION_AUD;
3564
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT(
3565
    REFERENCE_ID INTEGER NOT NULL,
3566
    CREDITS_ID INTEGER NOT NULL,
3567
    SORTINDEX INTEGER NOT NULL
3568
);
3569
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT;
3570
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT_AUD(
3571
    REV INTEGER NOT NULL,
3572
    REFERENCE_ID INTEGER NOT NULL,
3573
    CREDITS_ID INTEGER NOT NULL,
3574
    SORTINDEX INTEGER NOT NULL,
3575
    REVTYPE TINYINT
3576
);
3577
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT_AUD;
3578
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION(
3579
    REFERENCE_ID INTEGER NOT NULL,
3580
    EXTENSIONS_ID INTEGER NOT NULL
3581
);
3582
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION;
3583
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION_AUD(
3584
    REV INTEGER NOT NULL,
3585
    REFERENCE_ID INTEGER NOT NULL,
3586
    EXTENSIONS_ID INTEGER NOT NULL,
3587
    REVTYPE TINYINT
3588
);
3589
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION_AUD;
3590
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER(
3591
    REFERENCE_ID INTEGER NOT NULL,
3592
    IDENTIFIERS_ID INTEGER NOT NULL,
3593
    SORTINDEX INTEGER NOT NULL
3594
);
3595
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER;
3596
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER_AUD(
3597
    REV INTEGER NOT NULL,
3598
    REFERENCE_ID INTEGER NOT NULL,
3599
    IDENTIFIERS_ID INTEGER NOT NULL,
3600
    SORTINDEX INTEGER NOT NULL,
3601
    REVTYPE TINYINT
3602
);
3603
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER_AUD;
3604
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER(
3605
    REFERENCE_ID INTEGER NOT NULL,
3606
    MARKERS_ID INTEGER NOT NULL
3607
);
3608
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER;
3609
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER_AUD(
3610
    REV INTEGER NOT NULL,
3611
    REFERENCE_ID INTEGER NOT NULL,
3612
    MARKERS_ID INTEGER NOT NULL,
3613
    REVTYPE TINYINT
3614
);
3615
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER_AUD;
3616
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA(
3617
    REFERENCE_ID INTEGER NOT NULL,
3618
    MEDIA_ID INTEGER NOT NULL
3619
);
3620
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA;
3621
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA_AUD(
3622
    REV INTEGER NOT NULL,
3623
    REFERENCE_ID INTEGER NOT NULL,
3624
    MEDIA_ID INTEGER NOT NULL,
3625
    REVTYPE TINYINT
3626
);
3627
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA_AUD;
3628
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE(
3629
    REFERENCE_ID INTEGER NOT NULL,
3630
    SOURCES_ID INTEGER NOT NULL
3631
);
3632
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE;
3633
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD(
3634
    REV INTEGER NOT NULL,
3635
    REFERENCE_ID INTEGER NOT NULL,
3636
    SOURCES_ID INTEGER NOT NULL,
3637
    REVTYPE TINYINT
3638
);
3639
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD;
3640
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO(
3641
    REFERENCE_ID INTEGER NOT NULL,
3642
    RIGHTS_ID INTEGER NOT NULL
3643
);
3644
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO;
3645
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO_AUD(
3646
    REV INTEGER NOT NULL,
3647
    REFERENCE_ID INTEGER NOT NULL,
3648
    RIGHTS_ID INTEGER NOT NULL,
3649
    REVTYPE TINYINT
3650
);
3651
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO_AUD;
3652
CREATE CACHED TABLE PUBLIC.REGISTRATION(
3653
    ID INTEGER NOT NULL,
3654
    CREATED TIMESTAMP,
3655
    UUID VARCHAR(36),
3656
    UPDATED TIMESTAMP,
3657
        IDENTIFIER VARCHAR(255),
3658
        REGISTRATIONDATE TIMESTAMP,
3659
        SPECIFICIDENTIFIER VARCHAR(255),
3660
        STATUS VARCHAR(255),
3661
    CREATEDBY_ID INTEGER,
3662
    UPDATEDBY_ID INTEGER,
3663
        INSTITUTION_ID INTEGER,
3664
        NAME_ID INTEGER,
3665
        SUBMITTER_ID INTEGER
3666
);
3667
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION;
3668
CREATE CACHED TABLE PUBLIC.REGISTRATION_AUD(
3669
    ID INTEGER NOT NULL,
3670
    REV INTEGER NOT NULL,
3671
    REVTYPE TINYINT,
3672
    CREATED TIMESTAMP,
3673
    UUID VARCHAR(36),
3674
    UPDATED TIMESTAMP,
3675
        IDENTIFIER VARCHAR(255),
3676
        REGISTRATIONDATE TIMESTAMP,
3677
        SPECIFICIDENTIFIER VARCHAR(255),
3678
        STATUS VARCHAR(255),
3679
    CREATEDBY_ID INTEGER,
3680
    UPDATEDBY_ID INTEGER,
3681
        INSTITUTION_ID INTEGER,
3682
        NAME_ID INTEGER,
3683
        SUBMITTER_ID INTEGER
3684
);
3685
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_AUD;
3686
CREATE CACHED TABLE PUBLIC.REGISTRATION_ANNOTATION(
3687
    REGISTRATION_ID INTEGER NOT NULL,
3688
    ANNOTATIONS_ID INTEGER NOT NULL
3689
);
3690
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_ANNOTATION;
3691
CREATE CACHED TABLE PUBLIC.REGISTRATION_ANNOTATION_AUD(
3692
    REV INTEGER NOT NULL,
3693
    REGISTRATION_ID INTEGER NOT NULL,
3694
    ANNOTATIONS_ID INTEGER NOT NULL,
3695
    REVTYPE TINYINT
3696
);
3697
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3698
CREATE CACHED TABLE PUBLIC.REGISTRATION_MARKER(
3699
    REGISTRATION_ID INTEGER NOT NULL,
3700
    MARKERS_ID INTEGER NOT NULL
3701
);
3702
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_MARKER;
3703
CREATE CACHED TABLE PUBLIC.REGISTRATION_MARKER_AUD(
3704
    REV INTEGER NOT NULL,
3705
    REGISTRATION_ID INTEGER NOT NULL,
3706
    MARKERS_ID INTEGER NOT NULL,
3707
    REVTYPE TINYINT
3708
);
3709
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_MARKER_AUD;
3710
CREATE CACHED TABLE PUBLIC.REGISTRATION_REGISTRATION(
3711
    REGISTRATION_ID INTEGER NOT NULL,
3712
    BLOCKEDBY_ID INTEGER NOT NULL
3713
);
3714
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_REGISTRATION;
3715
CREATE CACHED TABLE PUBLIC.REGISTRATION_REGISTRATION_AUD(
3716
    REV INTEGER NOT NULL,
3717
    REGISTRATION_ID INTEGER NOT NULL,
3718
    BLOCKEDBY_ID INTEGER NOT NULL,
3719
    REVTYPE TINYINT
3720
);
3721
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_REGISTRATION_AUD;
3722
CREATE CACHED TABLE PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE(
3723
    REGISTRATIONS_ID INTEGER NOT NULL,
3724
    TYPEDESIGNATIONS_ID INTEGER NOT NULL
3725
);
3726
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE;
3727
CREATE CACHED TABLE PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE_AUD(
3728
    REV INTEGER NOT NULL,
3729
    REGISTRATIONS_ID INTEGER NOT NULL,
3730
    TYPEDESIGNATIONS_ID INTEGER NOT NULL,
3731
    REVTYPE TINYINT
3732
);
3733
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REGISTRATION_TYPEDESIGNATIONBASE_AUD;
3734

    
3735
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION(
3736
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
3737
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL
3738
);
3739
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION;
3740
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION_AUD(
3741
    REV INTEGER NOT NULL,
3742
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
3743
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL,
3744
    REVTYPE TINYINT
3745
);
3746
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION_AUD;
3747
CREATE CACHED TABLE PUBLIC.REPRESENTATION(
3748
    ID INTEGER NOT NULL,
3749
    CREATED TIMESTAMP,
3750
    UUID VARCHAR(36),
3751
    UPDATED TIMESTAMP,
3752
    TEXT CLOB,
3753
    ABBREVIATEDLABEL VARCHAR(255),
3754
    LABEL VARCHAR(255),
3755
    PLURAL VARCHAR(255),
3756
    CREATEDBY_ID INTEGER,
3757
    UPDATEDBY_ID INTEGER,
3758
    LANGUAGE_ID INTEGER
3759
);
3760
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION;
3761
CREATE CACHED TABLE PUBLIC.REPRESENTATION_AUD(
3762
    ID INTEGER NOT NULL,
3763
    REV INTEGER NOT NULL,
3764
    REVTYPE TINYINT,
3765
    CREATED TIMESTAMP,
3766
    UUID VARCHAR(36),
3767
    UPDATED TIMESTAMP,
3768
    TEXT CLOB,
3769
    ABBREVIATEDLABEL VARCHAR(255),
3770
    LABEL VARCHAR(255),
3771
    PLURAL VARCHAR(255),
3772
    CREATEDBY_ID INTEGER,
3773
    UPDATEDBY_ID INTEGER,
3774
    LANGUAGE_ID INTEGER
3775
);
3776
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_AUD;
3777
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION(
3778
    REPRESENTATION_ID INTEGER NOT NULL,
3779
    ANNOTATIONS_ID INTEGER NOT NULL
3780
);
3781
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION;
3782
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD(
3783
    REV INTEGER NOT NULL,
3784
    REPRESENTATION_ID INTEGER NOT NULL,
3785
    ANNOTATIONS_ID INTEGER NOT NULL,
3786
    REVTYPE TINYINT
3787
);
3788
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3789
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER(
3790
    REPRESENTATION_ID INTEGER NOT NULL,
3791
    MARKERS_ID INTEGER NOT NULL
3792
);
3793
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER;
3794
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER_AUD(
3795
    REV INTEGER NOT NULL,
3796
    REPRESENTATION_ID INTEGER NOT NULL,
3797
    MARKERS_ID INTEGER NOT NULL,
3798
    REVTYPE TINYINT
3799
);
3800
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER_AUD;
3801
CREATE CACHED TABLE PUBLIC.RIGHTSINFO(
3802
    ID INTEGER NOT NULL,
3803
    CREATED TIMESTAMP,
3804
    UUID VARCHAR(36),
3805
    UPDATED TIMESTAMP,
3806
    TEXT CLOB,
3807
    ABBREVIATEDTEXT VARCHAR(255),
3808
    URI CLOB,
3809
    CREATEDBY_ID INTEGER,
3810
    UPDATEDBY_ID INTEGER,
3811
    LANGUAGE_ID INTEGER,
3812
    AGENT_ID INTEGER,
3813
    TYPE_ID INTEGER
3814
);
3815
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO;
3816
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_AUD(
3817
    ID INTEGER NOT NULL,
3818
    REV INTEGER NOT NULL,
3819
    REVTYPE TINYINT,
3820
    CREATED TIMESTAMP,
3821
    UUID VARCHAR(36),
3822
    UPDATED TIMESTAMP,
3823
    TEXT CLOB,
3824
    ABBREVIATEDTEXT VARCHAR(255),
3825
    URI CLOB,
3826
    CREATEDBY_ID INTEGER,
3827
    UPDATEDBY_ID INTEGER,
3828
    LANGUAGE_ID INTEGER,
3829
    AGENT_ID INTEGER,
3830
    TYPE_ID INTEGER
3831
);
3832
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_AUD;
3833
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION(
3834
    RIGHTS_ID INTEGER NOT NULL,
3835
    ANNOTATIONS_ID INTEGER NOT NULL
3836
);
3837
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION;
3838
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD(
3839
    REV INTEGER NOT NULL,
3840
    RIGHTS_ID INTEGER NOT NULL,
3841
    ANNOTATIONS_ID INTEGER NOT NULL,
3842
    REVTYPE TINYINT
3843
);
3844
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION_AUD;
3845
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER(
3846
    RIGHTS_ID INTEGER NOT NULL,
3847
    MARKERS_ID INTEGER NOT NULL
3848
);
3849
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_MARKER;
3850
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER_AUD(
3851
    REV INTEGER NOT NULL,
3852
    RIGHTS_ID INTEGER NOT NULL,
3853
    MARKERS_ID INTEGER NOT NULL,
3854
    REVTYPE TINYINT
3855
);
3856

    
3857
CREATE TABLE SEQUENCE (
3858
    ID INTEGER NOT NULL,
3859
    CREATED TIMESTAMP,
3860
    UUID VARCHAR(36),
3861
    UPDATED TIMESTAMP,
3862
    BARCODESEQUENCEPART_LENGTH INTEGER,
3863
    BARCODESEQUENCEPART_STRING CLOB,
3864
    BOLDPROCESSID VARCHAR(255),
3865
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3866
    CONSENSUSSEQUENCE_STRING CLOB,
3867
    GENETICACCESSIONNUMBER VARCHAR(255),
3868
    HAPLOTYPE VARCHAR(255),
3869
    ISBARCODE BOOLEAN,
3870
    CREATEDBY_ID INTEGER,
3871
    UPDATEDBY_ID INTEGER,
3872
    CONTIGFILE_ID INTEGER,
3873
    DNASAMPLE_ID INTEGER,
3874
    DNAMARKER_ID INTEGER,
3875
    PRIMARY KEY (ID)
3876
);
3877
CREATE TABLE SEQUENCE_AUD (
3878
    ID INTEGER NOT NULL,
3879
    REV INTEGER NOT NULL,
3880
    REVTYPE TINYINT,
3881
    CREATED TIMESTAMP,
3882
    UUID VARCHAR(36),
3883
    UPDATED TIMESTAMP,
3884
    BARCODESEQUENCEPART_LENGTH INTEGER,
3885
    BARCODESEQUENCEPART_STRING CLOB,
3886
    BOLDPROCESSID VARCHAR(255),
3887
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3888
    CONSENSUSSEQUENCE_STRING CLOB,
3889
    GENETICACCESSIONNUMBER VARCHAR(255),
3890
    HAPLOTYPE VARCHAR(255),
3891
    ISBARCODE BOOLEAN,
3892
    CREATEDBY_ID INTEGER,
3893
    UPDATEDBY_ID INTEGER,
3894
    CONTIGFILE_ID INTEGER,
3895
    DNASAMPLE_ID INTEGER,
3896
    DNAMARKER_ID INTEGER
3897
);
3898

    
3899
CREATE TABLE SEQUENCE_ANNOTATION (
3900
    SEQUENCE_ID INTEGER NOT NULL,
3901
    ANNOTATIONS_ID INTEGER NOT NULL,
3902
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3903
);
3904
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3905
    REV INTEGER NOT NULL,
3906
    REVTYPE TINYINT,
3907
    SEQUENCE_ID INTEGER NOT NULL,
3908
    ANNOTATIONS_ID INTEGER NOT NULL
3909
);
3910

    
3911
CREATE TABLE SEQUENCE_MARKER (
3912
    SEQUENCE_ID INTEGER NOT NULL,
3913
    MARKERS_ID INTEGER NOT NULL,
3914
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3915
);
3916
CREATE TABLE SEQUENCE_MARKER_AUD (
3917
    REV INTEGER NOT NULL,
3918
    REVTYPE TINYINT,
3919
    SEQUENCE_ID INTEGER NOT NULL,
3920
    MARKERS_ID INTEGER NOT NULL
3921
);
3922
CREATE TABLE SEQUENCE_REFERENCE (
3923
    SEQUENCE_ID INTEGER NOT NULL,
3924
    CITATIONS_ID INTEGER NOT NULL,
3925
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3926
);
3927
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3928
    REV INTEGER NOT NULL,
3929
    REVTYPE TINYINT,
3930
    SEQUENCE_ID INTEGER NOT NULL,
3931
    CITATIONS_ID INTEGER NOT NULL
3932
);
3933

    
3934
CREATE TABLE SINGLEREADALIGNMENT (
3935
    ID INTEGER NOT NULL,
3936
    CREATED TIMESTAMP,
3937
    UUID VARCHAR(36),
3938
    UPDATED TIMESTAMP,
3939
        EDITEDSEQUENCE CLOB,
3940
        SHIFTS CLOB,
3941
    REVERSECOMPLEMENT BIT,
3942
        FIRSTSEQPOSITION INTEGER,
3943
        LEFTCUTPOSITION INTEGER,
3944
        RIGHTCUTPOSITION INTEGER,
3945
        CREATEDBY_ID INTEGER,
3946
    UPDATEDBY_ID INTEGER,
3947
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3948
    SINGLEREAD_ID INTEGER NOT NULL,
3949
    PRIMARY KEY (ID)
3950
);
3951

    
3952
CREATE TABLE SINGLEREADALIGNMENT_AUD (
3953
    ID INTEGER NOT NULL,
3954
    REV INTEGER NOT NULL,
3955
    REVTYPE TINYINT,
3956
    CREATED TIMESTAMP,
3957
    UUID VARCHAR(36),
3958
    UPDATED TIMESTAMP,
3959
        EDITEDSEQUENCE CLOB,
3960
        SHIFTS CLOB,
3961
    REVERSECOMPLEMENT BIT,
3962
        FIRSTSEQPOSITION INTEGER,
3963
        LEFTCUTPOSITION INTEGER,
3964
        RIGHTCUTPOSITION INTEGER,
3965
        CREATEDBY_ID INTEGER,
3966
    UPDATEDBY_ID INTEGER,
3967
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3968
    SINGLEREAD_ID INTEGER NOT NULL
3969
);
3970

    
3971
CREATE TABLE SINGLEREAD (
3972
    ID INTEGER NOT NULL,
3973
    CREATED TIMESTAMP,
3974
    UUID VARCHAR(36),
3975
    UPDATED TIMESTAMP,
3976
    DESCRIPTION VARCHAR(255),
3977
    TIMEPERIOD_END VARCHAR(255),
3978
    TIMEPERIOD_FREETEXT VARCHAR(255),
3979
    TIMEPERIOD_START VARCHAR(255),
3980
    DIRECTION VARCHAR(3),
3981
    SEQUENCE_LENGTH INTEGER,
3982
    SEQUENCE_STRING CLOB,
3983
    CREATEDBY_ID INTEGER,
3984
    UPDATEDBY_ID INTEGER,
3985
    ACTOR_ID INTEGER,
3986
    AMPLIFICATIONRESULT_ID INTEGER,
3987
    MATERIALORMETHOD_ID INTEGER,
3988
    PHEROGRAM_ID INTEGER,
3989
    PRIMER_ID INTEGER,
3990
    PRIMARY KEY (ID)
3991
);
3992
CREATE TABLE SINGLEREAD_AUD (
3993
    ID INTEGER NOT NULL,
3994
    REV INTEGER NOT NULL,
3995
    REVTYPE TINYINT,
3996
    CREATED TIMESTAMP,
3997
    UUID VARCHAR(36),
3998
    UPDATED TIMESTAMP,
3999
    DESCRIPTION VARCHAR(255),
4000
    TIMEPERIOD_END VARCHAR(255),
4001
    TIMEPERIOD_FREETEXT VARCHAR(255),
4002
    TIMEPERIOD_START VARCHAR(255),
4003
    DIRECTION VARCHAR(3),
4004
    SEQUENCE_LENGTH INTEGER,
4005
    SEQUENCE_STRING CLOB,
4006
    CREATEDBY_ID INTEGER,
4007
    UPDATEDBY_ID INTEGER,
4008
    ACTOR_ID INTEGER,
4009
    AMPLIFICATIONRESULT_ID INTEGER,
4010
    MATERIALORMETHOD_ID INTEGER,
4011
    PHEROGRAM_ID INTEGER,
4012
    PRIMER_ID INTEGER
4013
);
4014

    
4015
CREATE TABLE SINGLEREAD_ANNOTATION (
4016
    SINGLEREAD_ID INTEGER NOT NULL,
4017
    ANNOTATIONS_ID INTEGER NOT NULL,
4018
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
4019
);
4020
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
4021
    REV INTEGER NOT NULL,
4022
    REVTYPE TINYINT,
4023
    SINGLEREAD_ID INTEGER NOT NULL,
4024
    ANNOTATIONS_ID INTEGER NOT NULL
4025
);
4026

    
4027
CREATE TABLE SINGLEREAD_MARKER (
4028
    SINGLEREAD_ID INTEGER NOT NULL,
4029
    MARKERS_ID INTEGER NOT NULL,
4030
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
4031
);
4032

    
4033
CREATE TABLE SINGLEREAD_MARKER_AUD (
4034
    REV INTEGER NOT NULL,
4035
    REVTYPE TINYINT,
4036
    SINGLEREAD_ID INTEGER NOT NULL,
4037
    MARKERS_ID INTEGER NOT NULL
4038
);
4039

    
4040
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
4041
    DTYPE VARCHAR(31) NOT NULL,
4042
    ID INTEGER NOT NULL,
4043
    CREATED TIMESTAMP,
4044
    UUID VARCHAR(36),
4045
    UPDATED TIMESTAMP,
4046
    RECORDBASIS  VARCHAR(4) NOT NULL,
4047
    LSID_AUTHORITY VARCHAR(255),
4048
    LSID_LSID VARCHAR(255),
4049
    LSID_NAMESPACE VARCHAR(255),
4050
    LSID_OBJECT VARCHAR(255),
4051
    LSID_REVISION VARCHAR(255),
4052
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4053
    TITLECACHE VARCHAR(255),
4054
    PROTECTEDIDENTITYCACHE BOOLEAN,
4055
    IDENTITYCACHE VARCHAR(255),
4056
    PUBLISH BOOLEAN,
4057
    INDIVIDUALCOUNT VARCHAR(255),
4058
        PREFERREDSTABLEURI CLOB,
4059
    ACCESSIONNUMBER VARCHAR(255),
4060
    BARCODE VARCHAR(255),
4061
    CATALOGNUMBER VARCHAR(255),
4062
    COLLECTORSNUMBER VARCHAR(255),
4063
    EXSICCATUM VARCHAR(255),
4064
    ORIGINALLABELINFO CLOB,
4065
    FIELDNOTES VARCHAR(255),
4066
    FIELDNUMBER VARCHAR(255),
4067
    CREATEDBY_ID INTEGER,
4068
    UPDATEDBY_ID INTEGER,
4069
    LIFESTAGE_ID INTEGER,
4070
    SEX_ID INTEGER,
4071
    KINDOFUNIT_ID INTEGER,
4072
    COLLECTION_ID INTEGER,
4073
    DERIVEDFROM_ID INTEGER,
4074
    STOREDUNDER_ID INTEGER,
4075
    PRESERVATION_ID INTEGER,
4076
    GATHERINGEVENT_ID INTEGER,
4077
    PRIMARYCOLLECTOR_ID INTEGER,
4078
    MEDIASPECIMEN_ID INTEGER,
4079
    DNAQUALITY_ID INTEGER
4080
);
4081
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
4082
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
4083
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
4084
    DTYPE VARCHAR(31) NOT NULL,
4085
    ID INTEGER NOT NULL,
4086
    REV INTEGER NOT NULL,
4087
    REVTYPE TINYINT,
4088
    CREATED TIMESTAMP,
4089
    UUID VARCHAR(36),
4090
    UPDATED TIMESTAMP,
4091
    RECORDBASIS  VARCHAR(4) NOT NULL,
4092
    LSID_AUTHORITY VARCHAR(255),
4093
    LSID_LSID VARCHAR(255),
4094
    LSID_NAMESPACE VARCHAR(255),
4095
    LSID_OBJECT VARCHAR(255),
4096
    LSID_REVISION VARCHAR(255),
4097
    PROTECTEDTITLECACHE BOOLEAN,
4098
    TITLECACHE VARCHAR(255),
4099
    PROTECTEDIDENTITYCACHE BOOLEAN NULL,
4100
    IDENTITYCACHE VARCHAR(255),
4101
        PUBLISH BOOLEAN,
4102
    INDIVIDUALCOUNT VARCHAR(255),
4103
    PREFERREDSTABLEURI CLOB,
4104
    ACCESSIONNUMBER VARCHAR(255),
4105
    BARCODE VARCHAR(255),
4106
    CATALOGNUMBER VARCHAR(255),
4107
    COLLECTORSNUMBER VARCHAR(255),
4108
    EXSICCATUM VARCHAR(255),
4109
    ORIGINALLABELINFO CLOB,
4110
    FIELDNOTES VARCHAR(255),
4111
    FIELDNUMBER VARCHAR(255),
4112
    CREATEDBY_ID INTEGER,
4113
    UPDATEDBY_ID INTEGER,
4114
    LIFESTAGE_ID INTEGER,
4115
    SEX_ID INTEGER,
4116
    KINDOFUNIT_ID INTEGER,
4117
    COLLECTION_ID INTEGER,
4118
    DERIVEDFROM_ID INTEGER,
4119
    STOREDUNDER_ID INTEGER,
4120
    PRESERVATION_ID INTEGER,
4121
    GATHERINGEVENT_ID INTEGER,
4122
    PRIMARYCOLLECTOR_ID INTEGER,
4123
    MEDIASPECIMEN_ID INTEGER,
4124
    DNAQUALITY_ID INTEGER
4125
);
4126
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
4127
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
4128
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4129
    ANNOTATIONS_ID INTEGER NOT NULL
4130
);
4131
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
4132
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
4133
    REV INTEGER NOT NULL,
4134
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4135
    ANNOTATIONS_ID INTEGER NOT NULL,
4136
    REVTYPE TINYINT
4137
);
4138
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
4139
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
4140
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4141
    CREDITS_ID INTEGER NOT NULL,
4142
    SORTINDEX INTEGER NOT NULL
4143
);
4144
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
4145
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
4146
    REV INTEGER NOT NULL,
4147
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4148
    CREDITS_ID INTEGER NOT NULL,
4149
    SORTINDEX INTEGER NOT NULL,
4150
    REVTYPE TINYINT
4151
);
4152
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
4153
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
4154
    ORIGINALS_ID INTEGER NOT NULL,
4155
    DERIVATIONEVENTS_ID INTEGER NOT NULL
4156
);
4157
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
4158
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
4159
    REV INTEGER NOT NULL,
4160
    ORIGINALS_ID INTEGER NOT NULL,
4161
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
4162
    REVTYPE TINYINT
4163
);
4164
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
4165
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
4166
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4167
    EXTENSIONS_ID INTEGER NOT NULL
4168
);
4169
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
4170
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
4171
    REV INTEGER NOT NULL,
4172
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4173
    EXTENSIONS_ID INTEGER NOT NULL,
4174
    REVTYPE TINYINT
4175
);
4176
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;
4177

    
4178
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4179
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4180
    IDENTIFIERS_ID INTEGER NOT NULL,
4181
    SORTINDEX INTEGER NOT NULL
4182
);
4183
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4184
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4185
    REV INTEGER NOT NULL,
4186
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4187
    IDENTIFIERS_ID INTEGER NOT NULL,
4188
    SORTINDEX INTEGER NOT NULL,
4189
    REVTYPE TINYINT
4190
);
4191
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4192

    
4193
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
4194
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4195
    DEFINITION_ID INTEGER NOT NULL,
4196
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
4197
);
4198
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
4199
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
4200
    REV INTEGER NOT NULL,
4201
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4202
    DEFINITION_ID INTEGER NOT NULL,
4203
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
4204
    REVTYPE TINYINT
4205
);
4206
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
4207
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
4208
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4209
    MARKERS_ID INTEGER NOT NULL
4210
);
4211
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
4212
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
4213
    REV INTEGER NOT NULL,
4214
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4215
    MARKERS_ID INTEGER NOT NULL,
4216
    REVTYPE TINYINT
4217
);
4218
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
4219
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
4220
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4221
    SOURCES_ID INTEGER NOT NULL
4222
);
4223
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
4224
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
4225
    REV INTEGER NOT NULL,
4226
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4227
    SOURCES_ID INTEGER NOT NULL,
4228
    REVTYPE TINYINT
4229
);
4230
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
4231
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO(
4232
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4233
    RIGHTS_ID INTEGER NOT NULL
4234
);
4235
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO;
4236
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD(
4237
    REV INTEGER NOT NULL,
4238
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4239
    RIGHTS_ID INTEGER NOT NULL,
4240
    REVTYPE TINYINT
4241
);
4242
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD;
4243

    
4244
CREATE CACHED TABLE PUBLIC.STATEDATA(
4245
    ID INTEGER NOT NULL,
4246
    CREATED TIMESTAMP,
4247
    UUID VARCHAR(36),
4248
    UPDATED TIMESTAMP,
4249
    CREATEDBY_ID INTEGER,
4250
    UPDATEDBY_ID INTEGER,
4251
        CATEGORICALDATA_ID INTEGER,
4252
    STATE_ID INTEGER
4253
);
4254
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA;
4255
CREATE CACHED TABLE PUBLIC.STATEDATA_AUD(
4256
    ID INTEGER NOT NULL,
4257
    REV INTEGER NOT NULL,
4258
    REVTYPE TINYINT,
4259
    CREATED TIMESTAMP,
4260
    UUID VARCHAR(36),
4261
    UPDATED TIMESTAMP,
4262
    CREATEDBY_ID INTEGER,
4263
    UPDATEDBY_ID INTEGER,
4264
        CATEGORICALDATA_ID INTEGER,
4265
    STATE_ID INTEGER
4266
);
4267
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_AUD;
4268
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE(
4269
    STATEDATA_ID INTEGER NOT NULL,
4270
    MODIFIERS_ID INTEGER NOT NULL
4271
);
4272
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE;
4273
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD(
4274
    REV INTEGER NOT NULL,
4275
    STATEDATA_ID INTEGER NOT NULL,
4276
    MODIFIERS_ID INTEGER NOT NULL,
4277
    REVTYPE TINYINT
4278
);
4279
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD;
4280
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING(
4281
    STATEDATA_ID INTEGER NOT NULL,
4282
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4283
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
4284
);
4285
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING;
4286
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD(
4287
    REV INTEGER NOT NULL,
4288
    STATEDATA_ID INTEGER NOT NULL,
4289
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4290
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
4291
    REVTYPE TINYINT
4292
);
4293
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING_AUD;
4294
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE(
4295
    ID INTEGER NOT NULL,
4296
    CREATED TIMESTAMP,
4297
    UUID VARCHAR(36),
4298
    UPDATED TIMESTAMP,
4299
    VALUE DOUBLE NOT NULL,
4300
    CREATEDBY_ID INTEGER,
4301
    UPDATEDBY_ID INTEGER,
4302
        QUANTITATIVEDATA_ID INTEGER,
4303
    TYPE_ID INTEGER
4304
);
4305
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE;
4306
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD(
4307
    ID INTEGER NOT NULL,
4308
    REV INTEGER NOT NULL,
4309
    REVTYPE TINYINT,
4310
    CREATED TIMESTAMP,
4311
    UUID VARCHAR(36),
4312
    UPDATED TIMESTAMP,
4313
    VALUE DOUBLE,
4314
    CREATEDBY_ID INTEGER,
4315
    UPDATEDBY_ID INTEGER,
4316
        QUANTITATIVEDATA_ID INTEGER,
4317
    TYPE_ID INTEGER
4318
);
4319
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_AUD;
4320
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE(
4321
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4322
    MODIFIERS_ID INTEGER NOT NULL
4323
);
4324
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE;
4325
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD(
4326
    REV INTEGER NOT NULL,
4327
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4328
    MODIFIERS_ID INTEGER NOT NULL,
4329
    REVTYPE TINYINT
4330
);
4331
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD;
4332
CREATE CACHED TABLE PUBLIC.TAXONBASE(
4333
    DTYPE VARCHAR(31) NOT NULL,
4334
    ID INTEGER NOT NULL,
4335
    CREATED TIMESTAMP,
4336
    UUID VARCHAR(36),
4337
    UPDATED TIMESTAMP,
4338
    LSID_AUTHORITY VARCHAR(255),
4339
    LSID_LSID VARCHAR(255),
4340
    LSID_NAMESPACE VARCHAR(255),
4341
    LSID_OBJECT VARCHAR(255),
4342
    LSID_REVISION VARCHAR(255),
4343
        SECMICROREFERENCE VARCHAR(255),
4344
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4345
    TITLECACHE VARCHAR(255),
4346
    APPENDEDPHRASE VARCHAR(255),
4347
    DOUBTFUL BOOLEAN NOT NULL,
4348
    PUBLISH BOOLEAN,
4349
    USENAMECACHE BOOLEAN NOT NULL,
4350
    TAXONSTATUSUNKNOWN BOOLEAN,
4351
    CREATEDBY_ID INTEGER,
4352
    UPDATEDBY_ID INTEGER,
4353
    NAME_ID INTEGER,
4354
    SEC_ID INTEGER,
4355
        ACCEPTEDTAXON_ID INTEGER,
4356
        TYPE_ID INTEGER
4357
);
4358
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE;
4359
CREATE IND