Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (361 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) NOT NULL,
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) NOT NULL,
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
        ORCID VARCHAR(16),
79
        HASMOREMEMBERS BOOLEAN,
80
    CREATEDBY_ID INTEGER,
81
    UPDATEDBY_ID INTEGER,
82
    ISPARTOF_ID INTEGER
83
);
84
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE;
85
CREATE INDEX PUBLIC.AGENTTITLECACHEINDEX ON PUBLIC.AGENTBASE(TITLECACHE);
86
CREATE CACHED TABLE PUBLIC.AGENTBASE_AUD(
87
    DTYPE VARCHAR(31) NOT NULL,
88
    ID INTEGER NOT NULL,
89
    REV INTEGER NOT NULL,
90
    REVTYPE TINYINT,
91
    CREATED TIMESTAMP,
92
    UUID VARCHAR(36),
93
    UPDATED TIMESTAMP,
94
    LSID_AUTHORITY VARCHAR(255),
95
    LSID_LSID VARCHAR(255),
96
    LSID_NAMESPACE VARCHAR(255),
97
    LSID_OBJECT VARCHAR(255),
98
    LSID_REVISION VARCHAR(255),
99
    PROTECTEDTITLECACHE BOOLEAN,
100
    TITLECACHE VARCHAR(255),
101
    PROTECTEDCOLLECTORTITLECACHE BOOLEAN NOT NULL,
102
        COLLECTORTITLE VARCHAR(255),
103
    NOMENCLATURALTITLE VARCHAR(255),
104
    PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
105
    GIVENNAME VARCHAR(255),
106
    INITIALS VARCHAR(50),
107
        FAMILYNAME VARCHAR(255),
108
    LIFESPAN_END VARCHAR(255),
109
    LIFESPAN_FREETEXT VARCHAR(255),
110
    LIFESPAN_START VARCHAR(255),
111
    PREFIX VARCHAR(255),
112
    SUFFIX VARCHAR(255),
113
    CODE VARCHAR(255),
114
    NAME VARCHAR(255),
115
        ORCID VARCHAR(16),
116
        HASMOREMEMBERS BOOLEAN,
117
    CREATEDBY_ID INTEGER,
118
    UPDATEDBY_ID INTEGER,
119
           ISPARTOF_ID INTEGER,
120

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

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

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

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

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

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

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

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

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

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

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

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

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

    
448

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

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

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

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

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

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

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

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

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

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

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

    
2540
CREATE TABLE MATERIALORMETHODEVENT (
2541
    ID INTEGER NOT NULL,
2542
    DTYPE VARCHAR(255),
2543
    CREATED TIMESTAMP,
2544
    UUID VARCHAR(36) NOT NULL,
2545
    UPDATED TIMESTAMP,
2546
    MATERIALMETHODTEXT VARCHAR(255),
2547
    DESCRIPTION VARCHAR(255),
2548
    TIMEPERIOD_END VARCHAR(255),
2549
    TIMEPERIOD_FREETEXT VARCHAR(255),
2550
    TIMEPERIOD_START VARCHAR(255),
2551
        STRAIN VARCHAR(255),
2552
    TEMPERATURE DOUBLE,
2553
    CREATEDBY_ID INTEGER,
2554
    UPDATEDBY_ID INTEGER,
2555
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2556
    ACTOR_ID INTEGER,
2557
    FORWARDPRIMER_ID INTEGER,
2558
    REVERSEPRIMER_ID INTEGER,
2559
    MEDIUM_ID INTEGER,
2560
    PRIMARY KEY (ID)
2561
);
2562

    
2563
CREATE TABLE MATERIALORMETHODEVENT_AUD (
2564
    ID INTEGER NOT NULL,
2565
    REV INTEGER NOT NULL,
2566
    REVTYPE TINYINT,
2567
        DTYPE VARCHAR(255),
2568
    CREATED TIMESTAMP,
2569
    UUID VARCHAR(36),
2570
    UPDATED TIMESTAMP,
2571
    MATERIALMETHODTEXT VARCHAR(255),
2572
    DESCRIPTION VARCHAR(255),
2573
    TIMEPERIOD_END VARCHAR(255),
2574
    TIMEPERIOD_FREETEXT VARCHAR(255),
2575
    TIMEPERIOD_START VARCHAR(255),
2576
        STRAIN VARCHAR(255),
2577
    TEMPERATURE DOUBLE,
2578
    CREATEDBY_ID INTEGER,
2579
    UPDATEDBY_ID INTEGER,
2580
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2581
    ACTOR_ID INTEGER,
2582
    FORWARDPRIMER_ID INTEGER,
2583
    REVERSEPRIMER_ID INTEGER,
2584
    MEDIUM_ID INTEGER
2585
);
2586

    
2587
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2588
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2589
    ANNOTATIONS_ID INTEGER NOT NULL,
2590
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2591
);
2592

    
2593
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2594
    REV INTEGER NOT NULL,
2595
    REVTYPE TINYINT,
2596
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2597
    ANNOTATIONS_ID INTEGER NOT NULL,
2598
);
2599

    
2600
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2601
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2602
    MARKERS_ID INTEGER NOT NULL,
2603
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2604
);
2605

    
2606
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2607
    REV INTEGER NOT NULL,
2608
    REVTYPE TINYINT,
2609
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2610
    MARKERS_ID INTEGER NOT NULL,
2611
);
2612

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

    
3406
CREATE TABLE PRIMER (
3407
    ID INTEGER NOT NULL,
3408
    CREATED TIMESTAMP,
3409
    UUID VARCHAR(36) NOT NULL,
3410
    UPDATED TIMESTAMP,
3411
    LABEL VARCHAR(255),
3412
        SEQUENCE_LENGTH INTEGER,
3413
        SEQUENCE_STRING CLOB,
3414
    CREATEDBY_ID INTEGER,
3415
    UPDATEDBY_ID INTEGER,
3416
    DNAMARKER_ID INTEGER,
3417
        PUBLISHEDIN_ID INTEGER,
3418
        PRIMARY KEY (ID)
3419
);
3420
CREATE TABLE PRIMER_AUD (
3421
    ID INTEGER NOT NULL,
3422
    CREATED TIMESTAMP,
3423
    UUID VARCHAR(36),
3424
    UPDATED TIMESTAMP,
3425
    LABEL VARCHAR(255),
3426
    SEQUENCE_LENGTH INTEGER,
3427
    SEQUENCE_STRING CLOB,
3428
    CREATEDBY_ID INTEGER,
3429
    UPDATEDBY_ID INTEGER,
3430
        DNAMARKER_ID INTEGER,
3431
        PUBLISHEDIN_ID INTEGER,
3432
);
3433

    
3434
CREATE TABLE PRIMER_ANNOTATION (
3435
    PRIMER_ID INTEGER NOT NULL,
3436
    ANNOTATIONS_ID INTEGER NOT NULL,
3437
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3438
);
3439
CREATE TABLE PRIMER_ANNOTATION_AUD (
3440
    PRIMER_ID INTEGER NOT NULL,
3441
    ANNOTATIONS_ID INTEGER NOT NULL
3442
);
3443

    
3444
CREATE TABLE PRIMER_MARKER (
3445
    PRIMER_ID INTEGER NOT NULL,
3446
    MARKERS_ID INTEGER NOT NULL,
3447
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3448
);
3449
CREATE TABLE PRIMER_MARKER_AUD (
3450
    PRIMER_ID INTEGER NOT NULL,
3451
    MARKERS_ID INTEGER NOT NULL
3452
);
3453

    
3454

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

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

    
3867
CREATE TABLE SEQUENCE (
3868
    ID INTEGER NOT NULL,
3869
    CREATED TIMESTAMP,
3870
    UUID VARCHAR(36) NOT NULL,
3871
    UPDATED TIMESTAMP,
3872
    BARCODESEQUENCEPART_LENGTH INTEGER,
3873
    BARCODESEQUENCEPART_STRING CLOB,
3874
    BOLDPROCESSID VARCHAR(255),
3875
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3876
    CONSENSUSSEQUENCE_STRING CLOB,
3877
    GENETICACCESSIONNUMBER VARCHAR(255),
3878
    HAPLOTYPE VARCHAR(255),
3879
    ISBARCODE BOOLEAN,
3880
    CREATEDBY_ID INTEGER,
3881
    UPDATEDBY_ID INTEGER,
3882
    CONTIGFILE_ID INTEGER,
3883
    DNASAMPLE_ID INTEGER,
3884
    DNAMARKER_ID INTEGER,
3885
    PRIMARY KEY (ID)
3886
);
3887
CREATE TABLE SEQUENCE_AUD (
3888
    ID INTEGER NOT NULL,
3889
    REV INTEGER NOT NULL,
3890
    REVTYPE TINYINT,
3891
    CREATED TIMESTAMP,
3892
    UUID VARCHAR(36),
3893
    UPDATED TIMESTAMP,
3894
    BARCODESEQUENCEPART_LENGTH INTEGER,
3895
    BARCODESEQUENCEPART_STRING CLOB,
3896
    BOLDPROCESSID VARCHAR(255),
3897
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3898
    CONSENSUSSEQUENCE_STRING CLOB,
3899
    GENETICACCESSIONNUMBER VARCHAR(255),
3900
    HAPLOTYPE VARCHAR(255),
3901
    ISBARCODE BOOLEAN,
3902
    CREATEDBY_ID INTEGER,
3903
    UPDATEDBY_ID INTEGER,
3904
    CONTIGFILE_ID INTEGER,
3905
    DNASAMPLE_ID INTEGER,
3906
    DNAMARKER_ID INTEGER
3907
);
3908

    
3909
CREATE TABLE SEQUENCE_ANNOTATION (
3910
    SEQUENCE_ID INTEGER NOT NULL,
3911
    ANNOTATIONS_ID INTEGER NOT NULL,
3912
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3913
);
3914
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3915
    REV INTEGER NOT NULL,
3916
    REVTYPE TINYINT,
3917
    SEQUENCE_ID INTEGER NOT NULL,
3918
    ANNOTATIONS_ID INTEGER NOT NULL
3919
);
3920

    
3921
CREATE TABLE SEQUENCE_MARKER (
3922
    SEQUENCE_ID INTEGER NOT NULL,
3923
    MARKERS_ID INTEGER NOT NULL,
3924
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3925
);
3926
CREATE TABLE SEQUENCE_MARKER_AUD (
3927
    REV INTEGER NOT NULL,
3928
    REVTYPE TINYINT,
3929
    SEQUENCE_ID INTEGER NOT NULL,
3930
    MARKERS_ID INTEGER NOT NULL
3931
);
3932
CREATE TABLE SEQUENCE_REFERENCE (
3933
    SEQUENCE_ID INTEGER NOT NULL,
3934
    CITATIONS_ID INTEGER NOT NULL,
3935
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3936
);
3937
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3938
    REV INTEGER NOT NULL,
3939
    REVTYPE TINYINT,
3940
    SEQUENCE_ID INTEGER NOT NULL,
3941
    CITATIONS_ID INTEGER NOT NULL
3942
);
3943

    
3944
CREATE TABLE SINGLEREADALIGNMENT (
3945
    ID INTEGER NOT NULL,
3946
    CREATED TIMESTAMP,
3947
    UUID VARCHAR(36) NOT NULL,
3948
    UPDATED TIMESTAMP,
3949
        EDITEDSEQUENCE CLOB,
3950
        SHIFTS CLOB,
3951
    REVERSECOMPLEMENT BIT,
3952
        FIRSTSEQPOSITION INTEGER,
3953
        LEFTCUTPOSITION INTEGER,
3954
        RIGHTCUTPOSITION INTEGER,
3955
        CREATEDBY_ID INTEGER,
3956
    UPDATEDBY_ID INTEGER,
3957
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3958
    SINGLEREAD_ID INTEGER NOT NULL,
3959
    PRIMARY KEY (ID)
3960
);
3961

    
3962
CREATE TABLE SINGLEREADALIGNMENT_AUD (
3963
    ID INTEGER NOT NULL,
3964
    REV INTEGER NOT NULL,
3965
    REVTYPE TINYINT,
3966
    CREATED TIMESTAMP,
3967
    UUID VARCHAR(36),
3968
    UPDATED TIMESTAMP,
3969
        EDITEDSEQUENCE CLOB,
3970
        SHIFTS CLOB,
3971
    REVERSECOMPLEMENT BIT,
3972
        FIRSTSEQPOSITION INTEGER,
3973
        LEFTCUTPOSITION INTEGER,
3974
        RIGHTCUTPOSITION INTEGER,
3975
        CREATEDBY_ID INTEGER,
3976
    UPDATEDBY_ID INTEGER,
3977
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3978
    SINGLEREAD_ID INTEGER NOT NULL
3979
);
3980

    
3981
CREATE TABLE SINGLEREAD (
3982
    ID INTEGER NOT NULL,
3983
    CREATED TIMESTAMP,
3984
    UUID VARCHAR(36) NOT NULL,
3985
    UPDATED TIMESTAMP,
3986
    DESCRIPTION VARCHAR(255),
3987
    TIMEPERIOD_END VARCHAR(255),
3988
    TIMEPERIOD_FREETEXT VARCHAR(255),
3989
    TIMEPERIOD_START VARCHAR(255),
3990
    DIRECTION VARCHAR(3),
3991
    SEQUENCE_LENGTH INTEGER,
3992
    SEQUENCE_STRING CLOB,
3993
    CREATEDBY_ID INTEGER,
3994
    UPDATEDBY_ID INTEGER,
3995
    ACTOR_ID INTEGER,
3996
    AMPLIFICATIONRESULT_ID INTEGER,
3997
    MATERIALORMETHOD_ID INTEGER,
3998
    PHEROGRAM_ID INTEGER,
3999
    PRIMER_ID INTEGER,
4000
    PRIMARY KEY (ID)
4001
);
4002
CREATE TABLE SINGLEREAD_AUD (
4003
    ID INTEGER NOT NULL,
4004
    REV INTEGER NOT NULL,
4005
    REVTYPE TINYINT,
4006
    CREATED TIMESTAMP,
4007
    UUID VARCHAR(36),
4008
    UPDATED TIMESTAMP,
4009
    DESCRIPTION VARCHAR(255),
4010
    TIMEPERIOD_END VARCHAR(255),
4011
    TIMEPERIOD_FREETEXT VARCHAR(255),
4012
    TIMEPERIOD_START VARCHAR(255),
4013
    DIRECTION VARCHAR(3),
4014
    SEQUENCE_LENGTH INTEGER,
4015
    SEQUENCE_STRING CLOB,
4016
    CREATEDBY_ID INTEGER,
4017
    UPDATEDBY_ID INTEGER,
4018
    ACTOR_ID INTEGER,
4019
    AMPLIFICATIONRESULT_ID INTEGER,
4020
    MATERIALORMETHOD_ID INTEGER,
4021
    PHEROGRAM_ID INTEGER,
4022
    PRIMER_ID INTEGER
4023
);
4024

    
4025
CREATE TABLE SINGLEREAD_ANNOTATION (
4026
    SINGLEREAD_ID INTEGER NOT NULL,
4027
    ANNOTATIONS_ID INTEGER NOT NULL,
4028
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
4029
);
4030
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
4031
    REV INTEGER NOT NULL,
4032
    REVTYPE TINYINT,
4033
    SINGLEREAD_ID INTEGER NOT NULL,
4034
    ANNOTATIONS_ID INTEGER NOT NULL
4035
);
4036

    
4037
CREATE TABLE SINGLEREAD_MARKER (
4038
    SINGLEREAD_ID INTEGER NOT NULL,
4039
    MARKERS_ID INTEGER NOT NULL,
4040
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
4041
);
4042

    
4043
CREATE TABLE SINGLEREAD_MARKER_AUD (
4044
    REV INTEGER NOT NULL,
4045
    REVTYPE TINYINT,
4046
    SINGLEREAD_ID INTEGER NOT NULL,
4047
    MARKERS_ID INTEGER NOT NULL
4048
);
4049

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

    
4188
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
4189
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4190
    IDENTIFIERS_ID INTEGER NOT NULL,
4191
    SORTINDEX INTEGER NOT NULL
4192
);
4193
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
4194
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
4195
    REV INTEGER NOT NULL,
4196
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4197
    IDENTIFIERS_ID INTEGER NOT NULL,
4198
    SORTINDEX INTEGER NOT NULL,
4199
    REVTYPE TINYINT
4200
);
4201
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
4202

    
4203
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
4204
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4205
    DEFINITION_ID INTEGER NOT NULL,
4206
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
4207
);
4208
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
4209
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
4210
    REV INTEGER NOT NULL,
4211
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4212
    DEFINITION_ID INTEGER NOT NULL,
4213
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
4214
    REVTYPE TINYINT
4215
);
4216
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
4217
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
4218
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4219
    MARKERS_ID INTEGER NOT NULL
4220
);
4221
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
4222
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
4223
    REV INTEGER NOT NULL,
4224
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4225
    MARKERS_ID INTEGER NOT NULL,
4226
    REVTYPE TINYINT
4227
);
4228
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
4229
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
4230
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4231
    SOURCES_ID INTEGER NOT NULL
4232
);
4233
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
4234
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
4235
    REV INTEGER NOT NULL,
4236
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4237
    SOURCES_ID INTEGER NOT NULL,
4238
    REVTYPE TINYINT
4239
);
4240
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
4241
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO(
4242
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4243
    RIGHTS_ID INTEGER NOT NULL
4244
);
4245
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO;
4246
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD(
4247
    REV INTEGER NOT NULL,
4248
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4249
    RIGHTS_ID INTEGER NOT NULL,
4250
    REVTYPE TINYINT
4251
);
4252
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD;
4253

    
4254
CREATE CACHED TABLE PUBLIC.STATEDATA(
4255
    ID INTEGER NOT NULL,
4256
    CREATED TIMESTAMP,
4257
    UUID VARCHAR(36) NOT NULL,
4258
    UPDATED TIMESTAMP,
4259
        NUMBER INTEGER,
4260
    CREATEDBY_ID INTEGER,
4261
    UPDATEDBY_ID INTEGER,
4262
        CATEGORICALDATA_ID INTEGER,
4263
    STATE_ID INTEGER
4264
);
4265
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA;
4266
CREATE CACHED TABLE PUBLIC.STATEDATA_AUD(
4267
    ID INTEGER NOT NULL,
4268
    REV INTEGER NOT NULL,
4269
    REVTYPE TINYINT,
4270
    CREATED TIMESTAMP,
4271
    UUID VARCHAR(36),
4272
    UPDATED TIMESTAMP,
4273
        NUMBER INTEGER,
4274
    CREATEDBY_ID INTEGER,
4275
    UPDATEDBY_ID INTEGER,
4276
        CATEGORICALDATA_ID INTEGER,
4277
    STATE_ID INTEGER
4278
);
4279
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_AUD;
4280
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE(
4281
    STATEDATA_ID INTEGER NOT NULL,
4282
    MODIFIERS_ID INTEGER NOT NULL
4283
);
4284
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE;
4285
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD(
4286
    REV INTEGER NOT NULL,
4287
    STATEDATA_ID INTEGER NOT NULL,
4288
    MODIFIERS_ID INTEGER NOT NULL,
4289
    REVTYPE TINYINT
4290
);
4291
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD;
4292
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING(
4293
    STATEDATA_ID INTEGER NOT NULL,
4294
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4295
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
4296
);
4297
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING;
4298
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD(
4299
    REV INTEGER NOT NULL,
4300
    STATEDATA_ID INTEGER NOT NULL,
4301
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4302
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
4303
    REVTYPE TINYINT
4304
);
4305
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING_AUD;
4306
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE(
4307
    ID INTEGER NOT NULL,
4308
    CREATED TIMESTAMP,
4309
    UUID VARCHAR(36) NOT NULL,
4310
    UPDATED TIMESTAMP,
4311
    VALUE DOUBLE NOT NULL,
4312
    CREATEDBY_ID INTEGER,
4313
    UPDATEDBY_ID INTEGER,
4314
        QUANTITATIVEDATA_ID INTEGER,
4315
    TYPE_ID INTEGER
4316
);
4317
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE;
4318
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD(
4319
    ID INTEGER NOT NULL,
4320
    REV INTEGER NOT NULL,
4321
    REVTYPE TINYINT,
4322
    CREATED TIMESTAMP,
4323
    UUID VARCHAR(36),
4324
    UPDATED TIMESTAMP,
4325
    VALUE DOUBLE,
4326
    CREATEDBY_ID INTEGER,
4327
    UPDATEDBY_ID INTEGER,
4328
        QUANTITATIVEDATA_ID INTEGER,
4329
    TYPE_ID INTEGER
4330
);
4331
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_AUD;
4332
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE(
4333
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4334
    MODIFIERS_ID INTEGER NOT NULL
4335
);
4336
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE;
4337
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD(
4338
    REV INTEGER NOT NULL,
4339
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4340
    MODIFIERS_ID INTEGER NOT NULL,
4341
    REVTYPE TINYINT
4342
);