Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (367 KB)

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

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

    
10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
444

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

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

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

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

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

    
1332
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER(
1333
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1334
    IDENTIFIERS_ID INTEGER NOT NULL,
1335
    SORTINDEX INTEGER NOT NULL
1336
);
1337
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER;
1338
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD(
1339
    REV INTEGER NOT NULL,
1340
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1341
    IDENTIFIERS_ID INTEGER NOT NULL,
1342
    SORTINDEX INTEGER NOT NULL,
1343
    REVTYPE TINYINT
1344
);
1345
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD;
1346

    
1347
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE(
1348
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1349
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL
1350
);
1351
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE;
1352
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD(
1353
    REV INTEGER NOT NULL,
1354
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1355
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL,
1356
    REVTYPE TINYINT
1357
);
1358
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE_AUD;
1359
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE(
1360
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1361
    GEOSCOPES_ID INTEGER NOT NULL
1362
);
1363
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE;
1364
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD(
1365
    REV INTEGER NOT NULL,
1366
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1367
    GEOSCOPES_ID INTEGER NOT NULL,
1368
    REVTYPE TINYINT
1369
);
1370
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD;
1371
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER(
1372
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1373
    MARKERS_ID INTEGER NOT NULL
1374
);
1375
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER;
1376
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD(
1377
    REV INTEGER NOT NULL,
1378
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1379
    MARKERS_ID INTEGER NOT NULL,
1380
    REVTYPE TINYINT
1381
);
1382
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER_AUD;
1383
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE(
1384
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1385
    SOURCES_ID INTEGER NOT NULL
1386
);
1387
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE;
1388
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD(
1389
    REV INTEGER NOT NULL,
1390
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1391
    SOURCES_ID INTEGER NOT NULL,
1392
    REVTYPE TINYINT
1393
);
1394
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD;
1395
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE(
1396
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1397
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL
1398
);
1399
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE;
1400
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD(
1401
    REV INTEGER NOT NULL,
1402
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1403
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL,
1404
    REVTYPE TINYINT
1405
);
1406
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD;
1407
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO(
1408
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1409
    RIGHTS_ID INTEGER NOT NULL
1410
);
1411
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO;
1412
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD(
1413
    REV INTEGER NOT NULL,
1414
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1415
    RIGHTS_ID INTEGER NOT NULL,
1416
    REVTYPE TINYINT
1417
);
1418
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD;
1419
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE(
1420
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1421
    SCOPES_ID INTEGER NOT NULL
1422
);
1423
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE;
1424
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD(
1425
    REV INTEGER NOT NULL,
1426
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
1427
    SCOPES_ID INTEGER NOT NULL,
1428
    REVTYPE TINYINT
1429
);
1430
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE_AUD;
1431
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE(
1432
    DTYPE VARCHAR(31) NOT NULL,
1433
    ID INTEGER NOT NULL,
1434
    CREATED TIMESTAMP,
1435
    UUID VARCHAR(36),
1436
    UPDATED TIMESTAMP,
1437
    NAME VARCHAR(255),
1438
    TIMEPERIOD_START VARCHAR(255),
1439
    TIMEPERIOD_END VARCHAR(255),
1440
    TIMEPERIOD_FREETEXT VARCHAR(255),
1441
    ORDERRELEVANT BOOLEAN,
1442
--  MINIMUM DOUBLE,
1443
--        MAXIMUM DOUBLE,
1444
--        AVERAGE DOUBLE,
1445
--        TYPCALLOWERBOUNDARY DOUBLE,
1446
--        TYPCALHIGHERBOUNDARY DOUBLE,
1447
--        VARIANCE DOUBLE,
1448
--        STANDARDDEVIATION DOUBLE,
1449
--        SINGLEVALUE DOUBLE,
1450
--        SAMPLESIZE INTEGER,
1451
        UNKNOWNDATA BOOLEAN,
1452
    CREATEDBY_ID INTEGER,
1453
    UPDATEDBY_ID INTEGER,
1454
    FEATURE_ID INTEGER,
1455
    INDESCRIPTION_ID INTEGER,
1456
    AREA_ID INTEGER,
1457
    LANGUAGE_ID INTEGER,
1458
    STATUS_ID INTEGER,
1459
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1460
    UNIT_ID INTEGER,
1461
    TAXON2_ID INTEGER,
1462
    FORMAT_ID INTEGER,
1463
        
1464
);
1465
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE;
1466
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD(
1467
    DTYPE VARCHAR(31) NOT NULL,
1468
    ID INTEGER NOT NULL,
1469
    REV INTEGER NOT NULL,
1470
    REVTYPE TINYINT,
1471
    CREATED TIMESTAMP,
1472
    UUID VARCHAR(36),
1473
    UPDATED TIMESTAMP,
1474
    NAME VARCHAR(255),
1475
    TIMEPERIOD_START VARCHAR(255),
1476
    TIMEPERIOD_END VARCHAR(255),
1477
    TIMEPERIOD_FREETEXT VARCHAR(255),
1478
--  MINIMUM DOUBLE,
1479
--        MAXIMUM DOUBLE,
1480
--        AVERAGE DOUBLE,
1481
--        TYPCALLOWERBOUNDARY DOUBLE,
1482
--        TYPCALHIGHERBOUNDARY DOUBLE,
1483
--        VARIANCE DOUBLE,
1484
--        STANDARDDEVIATION DOUBLE,
1485
--        SINGLEVALUE DOUBLE,
1486
--        SAMPLESIZE INTEGER,
1487
    ORDERRELEVANT BOOLEAN,
1488
    UNKNOWNDATA BOOLEAN,
1489
    CREATEDBY_ID INTEGER,
1490
    UPDATEDBY_ID INTEGER,
1491
    FEATURE_ID INTEGER,
1492
    INDESCRIPTION_ID INTEGER,
1493
    AREA_ID INTEGER,
1494
    STATUS_ID INTEGER,
1495
    TAXON2_ID INTEGER,
1496
    UNIT_ID INTEGER,
1497
    FORMAT_ID INTEGER,
1498
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
1499
    LANGUAGE_ID INTEGER
1500
);
1501
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_AUD;
1502
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION(
1503
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1504
    ANNOTATIONS_ID INTEGER NOT NULL
1505
);
1506
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION;
1507
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD(
1508
    REV INTEGER NOT NULL,
1509
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1510
    ANNOTATIONS_ID INTEGER NOT NULL,
1511
    REVTYPE TINYINT
1512
);
1513
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD;
1514
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING(
1515
    TEXTDATA_ID INTEGER NOT NULL,
1516
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1517
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL
1518
);
1519
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING;
1520
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD(
1521
    REV INTEGER NOT NULL,
1522
    TEXTDATA_ID INTEGER NOT NULL,
1523
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
1524
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL,
1525
    REVTYPE TINYINT
1526
);
1527
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD;
1528
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER(
1529
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1530
    MARKERS_ID INTEGER NOT NULL
1531
);
1532
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER;
1533
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD(
1534
    REV INTEGER NOT NULL,
1535
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1536
    MARKERS_ID INTEGER NOT NULL,
1537
    REVTYPE TINYINT
1538
);
1539
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD;
1540
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA(
1541
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1542
    MEDIA_ID INTEGER NOT NULL,
1543
    SORTINDEX INTEGER NOT NULL
1544
);
1545
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA;
1546
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD(
1547
    REV INTEGER NOT NULL,
1548
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1549
    MEDIA_ID INTEGER NOT NULL,
1550
    SORTINDEX INTEGER NOT NULL,
1551
    REVTYPE TINYINT
1552
);
1553
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD;
1554
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER(
1555
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1556
    MODIFIERS_ID INTEGER NOT NULL
1557
);
1558
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER;
1559
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD(
1560
    REV INTEGER NOT NULL,
1561
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1562
    MODIFIERS_ID INTEGER NOT NULL,
1563
    REVTYPE TINYINT
1564
);
1565
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD;
1566
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT(
1567
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1568
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1569
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
1570
);
1571
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT;
1572
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD(
1573
    REV INTEGER NOT NULL,
1574
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1575
    MODIFYINGTEXT_ID INTEGER NOT NULL,
1576
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
1577
    REVTYPE TINYINT
1578
);
1579
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD;
1580
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE(
1581
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1582
    SOURCES_ID INTEGER NOT NULL
1583
);
1584
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE;
1585
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD(
1586
    REV INTEGER NOT NULL,
1587
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
1588
    SOURCES_ID INTEGER NOT NULL,
1589
    REVTYPE TINYINT
1590
);
1591
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD;
1592
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT(
1593
    ID INTEGER NOT NULL,
1594
    CREATED TIMESTAMP,
1595
    UUID VARCHAR(36),
1596
    UPDATED TIMESTAMP,
1597
    DESCRIPTION VARCHAR(255),
1598
    TIMEPERIOD_END VARCHAR(255),
1599
    TIMEPERIOD_FREETEXT VARCHAR(255),
1600
    TIMEPERIOD_START VARCHAR(255),
1601
    PREFERREDFLAG BOOLEAN NOT NULL,
1602
    CREATEDBY_ID INTEGER,
1603
    UPDATEDBY_ID INTEGER,
1604
    ACTOR_ID INTEGER,
1605
    IDENTIFIEDUNIT_ID INTEGER,
1606
    MODIFIER_ID INTEGER,
1607
    TAXON_ID INTEGER,
1608
        TAXONNAME_ID INTEGER
1609
);
1610
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT;
1611
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_AUD(
1612
    ID INTEGER NOT NULL,
1613
    REV INTEGER NOT NULL,
1614
    REVTYPE TINYINT,
1615
    CREATED TIMESTAMP,
1616
    UUID VARCHAR(36),
1617
    UPDATED TIMESTAMP,
1618
    DESCRIPTION VARCHAR(255),
1619
    TIMEPERIOD_END VARCHAR(255),
1620
    TIMEPERIOD_FREETEXT VARCHAR(255),
1621
    TIMEPERIOD_START VARCHAR(255),
1622
    PREFERREDFLAG BOOLEAN,
1623
    CREATEDBY_ID INTEGER,
1624
    UPDATEDBY_ID INTEGER,
1625
    ACTOR_ID INTEGER,
1626
    IDENTIFIEDUNIT_ID INTEGER,
1627
    MODIFIER_ID INTEGER,
1628
    TAXON_ID INTEGER,
1629
        TAXONNAME_ID INTEGER
1630
);
1631
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_AUD;
1632
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION(
1633
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1634
    ANNOTATIONS_ID INTEGER NOT NULL
1635
);
1636
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION;
1637
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD(
1638
    REV INTEGER NOT NULL,
1639
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1640
    ANNOTATIONS_ID INTEGER NOT NULL,
1641
    REVTYPE TINYINT
1642
);
1643
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD;
1644
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER(
1645
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1646
    MARKERS_ID INTEGER NOT NULL
1647
);
1648
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER;
1649
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD(
1650
    REV INTEGER NOT NULL,
1651
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1652
    MARKERS_ID INTEGER NOT NULL,
1653
    REVTYPE TINYINT
1654
);
1655
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER_AUD;
1656
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE(
1657
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1658
    SETOFREFERENCES_ID INTEGER NOT NULL
1659
);
1660
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE;
1661
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD(
1662
    REV INTEGER NOT NULL,
1663
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
1664
    SETOFREFERENCES_ID INTEGER NOT NULL,
1665
    REVTYPE TINYINT
1666
);
1667

    
1668
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD;
1669
CREATE CACHED TABLE PUBLIC.DNAQUALITY(
1670
    ID INTEGER NOT NULL,
1671
    CREATED TIMESTAMP,
1672
    UUID VARCHAR(36) NOT NULL,
1673
    UPDATED TIMESTAMP,
1674
    PURIFICATIONMETHOD VARCHAR(255),
1675
    RATIOOFABSORBANCE260_230 DOUBLE,
1676
    RATIOOFABSORBANCE260_280 DOUBLE,
1677
    QUALITYCHECKDATE TIMESTAMP,
1678
    CONCENTRATION DOUBLE,
1679
    CREATEDBY_ID INTEGER,
1680
    UPDATEDBY_ID INTEGER,
1681
    CONCENTRATIONUNIT_ID INTEGER,
1682
    QUALITYTERM_ID INTEGER,
1683
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1684
);
1685
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY;
1686
CREATE CACHED TABLE PUBLIC.DNAQUALITY_AUD(
1687
    ID INTEGER NOT NULL,
1688
    REV INTEGER NOT NULL,
1689
    REVTYPE TINYINT,
1690
    CREATED TIMESTAMP,
1691
    UUID VARCHAR(36) NOT NULL,
1692
    UPDATED TIMESTAMP,
1693
    PURIFICATIONMETHOD VARCHAR(255),
1694
    RATIOOFABSORBANCE260_230 DOUBLE,
1695
    RATIOOFABSORBANCE260_280 DOUBLE,
1696
    QUALITYCHECKDATE TIMESTAMP,
1697
    CONCENTRATION DOUBLE,
1698
    CREATEDBY_ID INTEGER,
1699
    UPDATEDBY_ID INTEGER,
1700
    CONCENTRATIONUNIT_ID INTEGER,
1701
    QUALITYTERM_ID INTEGER,
1702
    TYPEDPURIFICATIONMETHOD_ID INTEGER
1703
);
1704
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY_AUD;
1705

    
1706
CREATE CACHED TABLE PUBLIC.ENTITYVALIDATION(
1707
    ID INTEGER NOT NULL,
1708
    UUID VARCHAR(36),
1709
    CREATED TIMESTAMP,
1710
    VALIDATEDENTITYID INTEGER,
1711
    VALIDATEDENTITYUUID VARCHAR(36),
1712
    VALIDATEDENTITYCLASS VARCHAR(255),
1713
    VALIDATIONCOUNT INTEGER,
1714
    UPDATED TIMESTAMP,
1715
    USERFRIENDLYDESCRIPTION VARCHAR(255),
1716
    USERFRIENDLYTYPENAME VARCHAR(255),
1717
    CREATEDBY_ID INTEGER,
1718
    UPDATEDBY_ID INTEGER,
1719
    CRUDEVENTTYPE VARCHAR(24),
1720
    STATUS VARCHAR(16)
1721
);
1722
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYVALIDATION;
1723

    
1724
CREATE CACHED TABLE PUBLIC.ENTITYCONSTRAINTVIOLATION(
1725
    ID INTEGER NOT NULL,
1726
    UUID VARCHAR(36),
1727
    CREATED TIMESTAMP,
1728
    PROPERTYPATH VARCHAR(255),
1729
    USERFRIENDLYFIELDNAME VARCHAR(255),
1730
    INVALIDVALUE VARCHAR(255),
1731
    SEVERITY VARCHAR(24),
1732
    MESSAGE VARCHAR(255),
1733
    VALIDATOR VARCHAR(255),
1734
    VALIDATIONGROUP VARCHAR(63),
1735
    CREATEDBY_ID INTEGER,
1736
    UPDATEDBY_ID INTEGER,
1737
    ENTITYVALIDATION_ID INTEGER
1738
);
1739
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYCONSTRAINTVIOLATION;
1740

    
1741
CREATE CACHED TABLE PUBLIC.EXTENSION(
1742
    ID INTEGER NOT NULL,
1743
    CREATED TIMESTAMP,
1744
    UUID VARCHAR(36),
1745
    UPDATED TIMESTAMP,
1746
    VALUE CLOB,
1747
    CREATEDBY_ID INTEGER,
1748
    UPDATEDBY_ID INTEGER,
1749
    TYPE_ID INTEGER
1750
);
1751
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION;
1752
CREATE CACHED TABLE PUBLIC.EXTENSION_AUD(
1753
    ID INTEGER NOT NULL,
1754
    REV INTEGER NOT NULL,
1755
    REVTYPE TINYINT,
1756
    CREATED TIMESTAMP,
1757
    UUID VARCHAR(36),
1758
    UPDATED TIMESTAMP,
1759
    VALUE CLOB,
1760
    CREATEDBY_ID INTEGER,
1761
    UPDATEDBY_ID INTEGER,
1762
    TYPE_ID INTEGER
1763
);
1764
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION_AUD;
1765
CREATE CACHED TABLE PUBLIC.FEATURENODE(
1766
    ID INTEGER NOT NULL,
1767
    CREATED TIMESTAMP,
1768
    UUID VARCHAR(36),
1769
    UPDATED TIMESTAMP,
1770
    SORTINDEX INTEGER,
1771
    TREEINDEX VARCHAR(255),
1772
    CREATEDBY_ID INTEGER,
1773
    UPDATEDBY_ID INTEGER,
1774
    FEATURE_ID INTEGER,
1775
    FEATURETREE_ID INTEGER,
1776
    PARENT_ID INTEGER
1777
);
1778
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE;
1779
CREATE CACHED TABLE PUBLIC.FEATURENODE_AUD(
1780
    ID INTEGER NOT NULL,
1781
    REV INTEGER NOT NULL,
1782
    REVTYPE TINYINT,
1783
    CREATED TIMESTAMP,
1784
    UUID VARCHAR(36),
1785
    UPDATED TIMESTAMP,
1786
    SORTINDEX INTEGER,
1787
    TREEINDEX VARCHAR(255),
1788
    CREATEDBY_ID INTEGER,
1789
    UPDATEDBY_ID INTEGER,
1790
    FEATURE_ID INTEGER,
1791
    FEATURETREE_ID INTEGER,
1792
    PARENT_ID INTEGER
1793
);
1794
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_AUD;
1795
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF(
1796
    FEATURENODE_ID INTEGER NOT NULL,
1797
    INAPPLICABLEIF_ID INTEGER NOT NULL
1798
);
1799
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF;
1800
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD(
1801
    REV INTEGER NOT NULL,
1802
    FEATURENODE_ID INTEGER NOT NULL,
1803
    INAPPLICABLEIF_ID INTEGER NOT NULL,
1804
    REVTYPE TINYINT
1805
);
1806
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD;
1807
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE(
1808
    FEATURENODE_ID INTEGER NOT NULL,
1809
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL
1810
);
1811
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE;
1812
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD(
1813
    REV INTEGER NOT NULL,
1814
    FEATURENODE_ID INTEGER NOT NULL,
1815
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL,
1816
    REVTYPE TINYINT
1817
);
1818
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD;
1819
CREATE CACHED TABLE PUBLIC.FEATURETREE(
1820
    ID INTEGER NOT NULL,
1821
    CREATED TIMESTAMP,
1822
    UUID VARCHAR(36),
1823
    UPDATED TIMESTAMP,
1824
    LSID_AUTHORITY VARCHAR(255),
1825
    LSID_LSID VARCHAR(255),
1826
    LSID_NAMESPACE VARCHAR(255),
1827
    LSID_OBJECT VARCHAR(255),
1828
    LSID_REVISION VARCHAR(255),
1829
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
1830
    TITLECACHE VARCHAR(255),
1831
    CREATEDBY_ID INTEGER,
1832
    UPDATEDBY_ID INTEGER,
1833
    ROOT_ID INTEGER
1834
);
1835
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE;
1836
CREATE CACHED TABLE PUBLIC.FEATURETREE_AUD(
1837
    ID INTEGER NOT NULL,
1838
    REV INTEGER NOT NULL,
1839
    REVTYPE TINYINT,
1840
    CREATED TIMESTAMP,
1841
    UUID VARCHAR(36),
1842
    UPDATED TIMESTAMP,
1843
    LSID_AUTHORITY VARCHAR(255),
1844
    LSID_LSID VARCHAR(255),
1845
    LSID_NAMESPACE VARCHAR(255),
1846
    LSID_OBJECT VARCHAR(255),
1847
    LSID_REVISION VARCHAR(255),
1848
    PROTECTEDTITLECACHE BOOLEAN,
1849
    TITLECACHE VARCHAR(255),
1850
    CREATEDBY_ID INTEGER,
1851
    UPDATEDBY_ID INTEGER,
1852
    ROOT_ID INTEGER
1853
);
1854
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_AUD;
1855
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION(
1856
    FEATURETREE_ID INTEGER NOT NULL,
1857
    ANNOTATIONS_ID INTEGER NOT NULL
1858
);
1859
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION;
1860
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD(
1861
    REV INTEGER NOT NULL,
1862
    FEATURETREE_ID INTEGER NOT NULL,
1863
    ANNOTATIONS_ID INTEGER NOT NULL,
1864
    REVTYPE TINYINT
1865
);
1866
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION_AUD;
1867
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT(
1868
    FEATURETREE_ID INTEGER NOT NULL,
1869
    CREDITS_ID INTEGER NOT NULL,
1870
    SORTINDEX INTEGER NOT NULL
1871
);
1872
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT;
1873
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT_AUD(
1874
    REV INTEGER NOT NULL,
1875
    FEATURETREE_ID INTEGER NOT NULL,
1876
    CREDITS_ID INTEGER NOT NULL,
1877
    SORTINDEX INTEGER NOT NULL,
1878
    REVTYPE TINYINT
1879
);
1880
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT_AUD;
1881
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION(
1882
    FEATURETREE_ID INTEGER NOT NULL,
1883
    EXTENSIONS_ID INTEGER NOT NULL
1884
);
1885
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION;
1886
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION_AUD(
1887
    REV INTEGER NOT NULL,
1888
    FEATURETREE_ID INTEGER NOT NULL,
1889
    EXTENSIONS_ID INTEGER NOT NULL,
1890
    REVTYPE TINYINT
1891
);
1892
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION_AUD;
1893
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER(
1894
    FEATURETREE_ID INTEGER NOT NULL,
1895
    IDENTIFIERS_ID INTEGER NOT NULL,
1896
    SORTINDEX INTEGER NOT NULL
1897
);
1898
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER;
1899
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER_AUD(
1900
    REV INTEGER NOT NULL,
1901
    FEATURETREE_ID INTEGER NOT NULL,
1902
    IDENTIFIERS_ID INTEGER NOT NULL,
1903
    SORTINDEX INTEGER NOT NULL,
1904
    REVTYPE TINYINT
1905
);
1906
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER_AUD;
1907
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER(
1908
    FEATURETREE_ID INTEGER NOT NULL,
1909
    MARKERS_ID INTEGER NOT NULL
1910
);
1911
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER;
1912
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER_AUD(
1913
    REV INTEGER NOT NULL,
1914
    FEATURETREE_ID INTEGER NOT NULL,
1915
    MARKERS_ID INTEGER NOT NULL,
1916
    REVTYPE TINYINT
1917
);
1918
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER_AUD;
1919
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE(
1920
    FEATURETREE_ID INTEGER NOT NULL,
1921
    SOURCES_ID INTEGER NOT NULL
1922
);
1923
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE;
1924
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD(
1925
    REV INTEGER NOT NULL,
1926
    FEATURETREE_ID INTEGER NOT NULL,
1927
    SOURCES_ID INTEGER NOT NULL,
1928
    REVTYPE TINYINT
1929
);
1930
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD;
1931
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION(
1932
    FEATURETREE_ID INTEGER NOT NULL,
1933
    REPRESENTATIONS_ID INTEGER NOT NULL
1934
);
1935
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION;
1936
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD(
1937
    REV INTEGER NOT NULL,
1938
    FEATURETREE_ID INTEGER NOT NULL,
1939
    REPRESENTATIONS_ID INTEGER NOT NULL,
1940
    REVTYPE TINYINT
1941
);
1942
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION_AUD;
1943
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO(
1944
    FEATURETREE_ID INTEGER NOT NULL,
1945
    RIGHTS_ID INTEGER NOT NULL
1946
);
1947
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO;
1948
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO_AUD(
1949
    REV INTEGER NOT NULL,
1950
    FEATURETREE_ID INTEGER NOT NULL,
1951
    RIGHTS_ID INTEGER NOT NULL,
1952
    REVTYPE TINYINT
1953
);
1954
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO_AUD;
1955
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT(
1956
    ID INTEGER NOT NULL,
1957
    CREATED TIMESTAMP,
1958
    UUID VARCHAR(36),
1959
    UPDATED TIMESTAMP,
1960
    DESCRIPTION VARCHAR(255),
1961
    TIMEPERIOD_END VARCHAR(255),
1962
    TIMEPERIOD_FREETEXT VARCHAR(255),
1963
    TIMEPERIOD_START VARCHAR(255),
1964
    ABSOLUTEELEVATION INTEGER,
1965
    ABSOLUTEELEVATIONMAX INTEGER,
1966
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
1967
    COLLECTINGMETHOD VARCHAR(255),
1968
    DISTANCETOGROUND DOUBLE,
1969
    DISTANCETOGROUNDMAX DOUBLE,
1970
    DISTANCETOGROUNDTEXT VARCHAR(30),
1971
    DISTANCETOWATERSURFACE DOUBLE,
1972
    DISTANCETOWATERSURFACEMAX DOUBLE,
1973
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
1974
    EXACTLOCATION_ERRORRADIUS INTEGER,
1975
    EXACTLOCATION_LATITUDE DOUBLE,
1976
    EXACTLOCATION_LONGITUDE DOUBLE,
1977
    CREATEDBY_ID INTEGER,
1978
    UPDATEDBY_ID INTEGER,
1979
    ACTOR_ID INTEGER,
1980
    COUNTRY_ID INTEGER,
1981
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
1982
    LOCALITY_ID INTEGER
1983
);
1984
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT;
1985
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_AUD(
1986
    ID INTEGER NOT NULL,
1987
    REV INTEGER NOT NULL,
1988
    REVTYPE TINYINT,
1989
    CREATED TIMESTAMP,
1990
    UUID VARCHAR(36),
1991
    UPDATED TIMESTAMP,
1992
    DESCRIPTION VARCHAR(255),
1993
    TIMEPERIOD_END VARCHAR(255),
1994
    TIMEPERIOD_FREETEXT VARCHAR(255),
1995
    TIMEPERIOD_START VARCHAR(255),
1996
    ABSOLUTEELEVATION INTEGER,
1997
    ABSOLUTEELEVATIONMAX INTEGER,
1998
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
1999
    COLLECTINGMETHOD VARCHAR(255),
2000
    DISTANCETOGROUND DOUBLE,
2001
    DISTANCETOGROUNDMAX DOUBLE,
2002
    DISTANCETOGROUNDTEXT VARCHAR(30),
2003
    DISTANCETOWATERSURFACE DOUBLE,
2004
    DISTANCETOWATERSURFACEMAX DOUBLE,
2005
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
2006
    EXACTLOCATION_ERRORRADIUS INTEGER,
2007
    EXACTLOCATION_LATITUDE DOUBLE,
2008
    EXACTLOCATION_LONGITUDE DOUBLE,
2009
    CREATEDBY_ID INTEGER,
2010
    UPDATEDBY_ID INTEGER,
2011
    ACTOR_ID INTEGER,
2012
    COUNTRY_ID INTEGER,
2013
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
2014
    LOCALITY_ID INTEGER
2015
);
2016
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_AUD;
2017
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION(
2018
    GATHERINGEVENT_ID INTEGER NOT NULL,
2019
    ANNOTATIONS_ID INTEGER NOT NULL
2020
);
2021
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION;
2022
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD(
2023
    REV INTEGER NOT NULL,
2024
    GATHERINGEVENT_ID INTEGER NOT NULL,
2025
    ANNOTATIONS_ID INTEGER NOT NULL,
2026
    REVTYPE TINYINT
2027
);
2028
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION_AUD;
2029
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE(
2030
    GATHERINGEVENT_ID INTEGER NOT NULL,
2031
    COLLECTINGAREAS_ID INTEGER NOT NULL
2032
);
2033
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE;
2034
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD(
2035
    REV INTEGER NOT NULL,
2036
    GATHERINGEVENT_ID INTEGER NOT NULL,
2037
    COLLECTINGAREAS_ID INTEGER NOT NULL,
2038
    REVTYPE TINYINT
2039
);
2040
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD;
2041
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER(
2042
    GATHERINGEVENT_ID INTEGER NOT NULL,
2043
    MARKERS_ID INTEGER NOT NULL
2044
);
2045
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER;
2046
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD(
2047
    REV INTEGER NOT NULL,
2048
    GATHERINGEVENT_ID INTEGER NOT NULL,
2049
    MARKERS_ID INTEGER NOT NULL,
2050
    REVTYPE TINYINT
2051
);
2052
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER_AUD;
2053
CREATE CACHED TABLE PUBLIC.GRANTEDAUTHORITYIMPL(
2054
    ID INTEGER NOT NULL,
2055
    CREATED TIMESTAMP,
2056
    UUID VARCHAR(36),
2057
    AUTHORITY VARCHAR(255) NOT NULL,
2058
    CREATEDBY_ID INTEGER
2059
);
2060
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GRANTEDAUTHORITYIMPL;
2061
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP(
2062
    ID INTEGER NOT NULL,
2063
    CREATED TIMESTAMP,
2064
    UUID VARCHAR(36),
2065
    UPDATED TIMESTAMP,
2066
    CREATEDBY_ID INTEGER,
2067
    UPDATEDBY_ID INTEGER
2068
);
2069
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP;
2070
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_AUD(
2071
    ID INTEGER NOT NULL,
2072
    REV INTEGER NOT NULL,
2073
    REVTYPE TINYINT,
2074
    CREATED TIMESTAMP,
2075
    UUID VARCHAR(36),
2076
    UPDATED TIMESTAMP,
2077
    CREATEDBY_ID INTEGER,
2078
    UPDATEDBY_ID INTEGER
2079
);
2080
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_AUD;
2081
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION(
2082
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2083
    ANNOTATIONS_ID INTEGER NOT NULL
2084
);
2085
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION;
2086
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD(
2087
    REV INTEGER NOT NULL,
2088
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2089
    ANNOTATIONS_ID INTEGER NOT NULL,
2090
    REVTYPE TINYINT
2091
);
2092
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD;
2093
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER(
2094
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2095
    MARKERS_ID INTEGER NOT NULL
2096
);
2097
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER;
2098
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD(
2099
    REV INTEGER NOT NULL,
2100
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
2101
    MARKERS_ID INTEGER NOT NULL,
2102
    REVTYPE TINYINT
2103
);
2104
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER_AUD;
2105
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP(
2106
    ID INTEGER NOT NULL,
2107
    CREATED TIMESTAMP,
2108
    UUID VARCHAR(36),
2109
    UPDATED TIMESTAMP,
2110
    CITATIONMICROREFERENCE VARCHAR(255),
2111
    ORIGINALNAMESTRING VARCHAR(255),
2112
    DOUBTFUL BOOLEAN NOT NULL,
2113
    RULECONSIDERED VARCHAR(255),
2114
    CREATEDBY_ID INTEGER,
2115
    UPDATEDBY_ID INTEGER,
2116
    CITATION_ID INTEGER,
2117
    RELATEDFROM_ID INTEGER,
2118
    RELATEDTO_ID INTEGER,
2119
    TYPE_ID INTEGER
2120
);
2121
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP;
2122
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD(
2123
    ID INTEGER NOT NULL,
2124
    REV INTEGER NOT NULL,
2125
    REVTYPE TINYINT,
2126
    CREATED TIMESTAMP,
2127
    UUID VARCHAR(36),
2128
    UPDATED TIMESTAMP,
2129
    CITATIONMICROREFERENCE VARCHAR(255),
2130
    ORIGINALNAMESTRING VARCHAR(255),
2131
    DOUBTFUL BOOLEAN,
2132
    RULECONSIDERED VARCHAR(255),
2133
    CREATEDBY_ID INTEGER,
2134
    UPDATEDBY_ID INTEGER,
2135
    CITATION_ID INTEGER,
2136
    RELATEDFROM_ID INTEGER,
2137
    RELATEDTO_ID INTEGER,
2138
    TYPE_ID INTEGER
2139
);
2140
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_AUD;
2141
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION(
2142
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2143
    ANNOTATIONS_ID INTEGER NOT NULL
2144
);
2145
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION;
2146
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD(
2147
    REV INTEGER NOT NULL,
2148
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2149
    ANNOTATIONS_ID INTEGER NOT NULL,
2150
    REVTYPE TINYINT
2151
);
2152
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD;
2153
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER(
2154
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2155
    MARKERS_ID INTEGER NOT NULL
2156
);
2157
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER;
2158
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD(
2159
    REV INTEGER NOT NULL,
2160
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
2161
    MARKERS_ID INTEGER NOT NULL,
2162
    REVTYPE TINYINT
2163
);
2164
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD;
2165
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING(
2166
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2167
    DESCRIPTION_ID INTEGER NOT NULL,
2168
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
2169
);
2170
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING;
2171
CREATE CACHED TABLE PUBLIC.IDENTIFIER(
2172
    ID INTEGER NOT NULL,
2173
    UUID VARCHAR(36),
2174
    CREATED TIMESTAMP,
2175
    UPDATED TIMESTAMP,
2176
    IDENTIFIER VARCHAR(800),
2177
    CREATEDBY_ID INTEGER,
2178
    UPDATEDBY_ID INTEGER,
2179
          TYPE_ID INTEGER  
2180
);
2181
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER;
2182
CREATE CACHED TABLE PUBLIC.IDENTIFIER_AUD(
2183
        ID INTEGER NOT NULL,
2184
    REV INTEGER NOT NULL,
2185
    REVTYPE TINYINT,
2186
    UUID VARCHAR(36),
2187
    CREATED TIMESTAMP,
2188
    UPDATED TIMESTAMP,
2189
    IDENTIFIER VARCHAR(800),
2190
    CREATEDBY_ID INTEGER,
2191
    UPDATEDBY_ID INTEGER,
2192
          TYPE_ID INTEGER  
2193
);
2194
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_AUD;
2195
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION(
2196
    IDENTIFIER_ID INTEGER NOT NULL,
2197
    ANNOTATIONS_ID INTEGER NOT NULL
2198
);
2199
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION;
2200
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION_AUD(
2201
    REV INTEGER NOT NULL,
2202
    IDENTIFIER_ID INTEGER NOT NULL,
2203
    ANNOTATIONS_ID INTEGER NOT NULL,
2204
    REVTYPE TINYINT
2205
);
2206
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION_AUD;
2207
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER(
2208
    IDENTIFIER_ID INTEGER NOT NULL,
2209
    MARKERS_ID INTEGER NOT NULL
2210
);
2211
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER;
2212
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER_AUD(
2213
    REV INTEGER NOT NULL,
2214
    IDENTIFIER_ID INTEGER NOT NULL,
2215
    MARKERS_ID INTEGER NOT NULL,
2216
    REVTYPE TINYINT
2217
);
2218
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER_AUD;
2219
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE(
2220
    ID INTEGER NOT NULL,
2221
    UUID VARCHAR(36),
2222
    CREATED TIMESTAMP,
2223
    UPDATED TIMESTAMP,
2224
    CREATEDBY_ID INTEGER,
2225
    UPDATEDBY_ID INTEGER,
2226
          STARTPOS INT,
2227
          ENDPOS INT,
2228
          AGENT_ID INT,
2229
          ANNOTATION_ID INT,
2230
          LANGUAGESTRING_ID INT,
2231
          MEDIA_ID INT,
2232
          OCCURRENCE_ID INT,
2233
          REFERENCE_ID INT,
2234
          TAXON_ID INT,
2235
          TAXONNAME_ID INT
2236
);
2237
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE;
2238
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE_AUD(
2239
    ID INTEGER NOT NULL,
2240
    REV INTEGER NOT NULL,
2241
    REVTYPE TINYINT,
2242
    UUID VARCHAR(36),
2243
    CREATED TIMESTAMP,
2244
    UPDATED TIMESTAMP,
2245
    CREATEDBY_ID INTEGER,
2246
    UPDATEDBY_ID INTEGER,
2247
          STARTPOS INT,
2248
          ENDPOS INT,
2249
          AGENT_ID INT,
2250
          ANNOTATION_ID INT,
2251
          LANGUAGESTRING_ID INT,
2252
          MEDIA_ID INT,
2253
          OCCURRENCE_ID INT,
2254
          REFERENCE_ID INT,
2255
          TAXON_ID INT,
2256
          TAXONNAME_ID INT
2257
);
2258
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE_AUD;
2259

    
2260
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD(
2261
    REV INTEGER NOT NULL,
2262
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
2263
    DESCRIPTION_ID INTEGER NOT NULL,
2264
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
2265
    REVTYPE TINYINT
2266
);
2267
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD;
2268
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP(
2269
    ID INTEGER NOT NULL,
2270
    CREATED TIMESTAMP,
2271
    UUID VARCHAR(36),
2272
    UPDATED TIMESTAMP,
2273
    DEPARTMENT VARCHAR(255),
2274
    PERIOD_END VARCHAR(255),
2275
    PERIOD_FREETEXT VARCHAR(255),
2276
    PERIOD_START VARCHAR(255),
2277
    ROLE VARCHAR(255),
2278
    CREATEDBY_ID INTEGER,
2279
    UPDATEDBY_ID INTEGER,
2280
    INSTITUTE_ID INTEGER,
2281
    PERSON_ID INTEGER
2282
);
2283
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP;
2284
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD(
2285
    ID INTEGER NOT NULL,
2286
    REV INTEGER NOT NULL,
2287
    REVTYPE TINYINT,
2288
    CREATED TIMESTAMP,
2289
    UUID VARCHAR(36),
2290
    UPDATED TIMESTAMP,
2291
    DEPARTMENT VARCHAR(255),
2292
    PERIOD_END VARCHAR(255),
2293
    PERIOD_FREETEXT VARCHAR(255),
2294
    PERIOD_START VARCHAR(255),
2295
    ROLE VARCHAR(255),
2296
    CREATEDBY_ID INTEGER,
2297
    UPDATEDBY_ID INTEGER,
2298
    INSTITUTE_ID INTEGER,
2299
    PERSON_ID INTEGER
2300
);
2301
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP_AUD;
2302
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT(
2303
    ID INTEGER NOT NULL,
2304
    CREATED TIMESTAMP,
2305
    UUID VARCHAR(36),
2306
    UPDATED TIMESTAMP,
2307
    CREATEDBY_ID INTEGER,
2308
    UPDATEDBY_ID INTEGER
2309
);
2310
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT;
2311
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_AUD(
2312
    ID INTEGER NOT NULL,
2313
    REV INTEGER NOT NULL,
2314
    REVTYPE TINYINT,
2315
    CREATED TIMESTAMP,
2316
    UUID VARCHAR(36),
2317
    UPDATED TIMESTAMP,
2318
    CREATEDBY_ID INTEGER,
2319
    UPDATEDBY_ID INTEGER
2320
);
2321
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_AUD;
2322
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING(
2323
    KEYSTATEMENT_ID INTEGER NOT NULL,
2324
    LABEL_ID INTEGER NOT NULL,
2325
    LABEL_MAPKEY_ID INTEGER NOT NULL
2326
);
2327
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING;
2328
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD(
2329
    REV INTEGER NOT NULL,
2330
    KEYSTATEMENT_ID INTEGER NOT NULL,
2331
    LABEL_ID INTEGER NOT NULL,
2332
    LABEL_MAPKEY_ID INTEGER NOT NULL,
2333
    REVTYPE TINYINT
2334
);
2335
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD;
2336
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY(
2337
    ID INTEGER NOT NULL,
2338
    CREATED TIMESTAMP,
2339
    UUID VARCHAR(36),
2340
    AUTHORITY VARCHAR(255),
2341
    AUTHORITYWSDL CLOB,
2342
    PORT INTEGER NOT NULL,
2343
    SERVER VARCHAR(255),
2344
    URL VARCHAR(255),
2345
    CREATEDBY_ID INTEGER
2346
);
2347
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY;
2348
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES(
2349
    LSIDAUTHORITY_ID INTEGER NOT NULL,
2350
    NAMESPACES_ELEMENT VARCHAR(255),
2351
    NAMESPACES_MAPKEY VARCHAR(255) NOT NULL
2352
);
2353
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY_NAMESPACES;
2354
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING(
2355
    ID INTEGER NOT NULL,
2356
    CREATED TIMESTAMP,
2357
    UUID VARCHAR(36),
2358
    UPDATED TIMESTAMP,
2359
    TEXT CLOB,
2360
    CREATEDBY_ID INTEGER,
2361
    UPDATEDBY_ID INTEGER,
2362
    LANGUAGE_ID INTEGER
2363
);
2364
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING;
2365
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_AUD(
2366
    ID INTEGER NOT NULL,
2367
    REV INTEGER NOT NULL,
2368
    REVTYPE TINYINT,
2369
    CREATED TIMESTAMP,
2370
    UUID VARCHAR(36),
2371
    UPDATED TIMESTAMP,
2372
    TEXT CLOB,
2373
    CREATEDBY_ID INTEGER,
2374
    UPDATEDBY_ID INTEGER,
2375
    LANGUAGE_ID INTEGER
2376
);
2377
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_AUD;
2378
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION(
2379
    LANGUAGESTRING_ID INTEGER NOT NULL,
2380
    ANNOTATIONS_ID INTEGER NOT NULL
2381
);
2382
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION;
2383
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD(
2384
    REV INTEGER NOT NULL,
2385
    LANGUAGESTRING_ID INTEGER NOT NULL,
2386
    ANNOTATIONS_ID INTEGER NOT NULL,
2387
    REVTYPE TINYINT
2388
);
2389
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION_AUD;
2390
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER(
2391
    LANGUAGESTRING_ID INTEGER NOT NULL,
2392
    MARKERS_ID INTEGER NOT NULL
2393
);
2394
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER;
2395
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD(
2396
    REV INTEGER NOT NULL,
2397
    LANGUAGESTRING_ID INTEGER NOT NULL,
2398
    MARKERS_ID INTEGER NOT NULL,
2399
    REVTYPE TINYINT
2400
);
2401
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER_AUD;
2402
CREATE CACHED TABLE PUBLIC.LOCUS(
2403
    ID INTEGER NOT NULL,
2404
    CREATED TIMESTAMP,
2405
    UUID VARCHAR(36),
2406
    UPDATED TIMESTAMP,
2407
    DESCRIPTION VARCHAR(255),
2408
    NAME VARCHAR(255),
2409
    CREATEDBY_ID INTEGER,
2410
    UPDATEDBY_ID INTEGER
2411
);
2412
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS;
2413
CREATE CACHED TABLE PUBLIC.LOCUS_AUD(
2414
    ID INTEGER NOT NULL,
2415
    REV INTEGER NOT NULL,
2416
    REVTYPE TINYINT,
2417
    CREATED TIMESTAMP,
2418
    UUID VARCHAR(36),
2419
    UPDATED TIMESTAMP,
2420
    DESCRIPTION VARCHAR(255),
2421
    NAME VARCHAR(255),
2422
    CREATEDBY_ID INTEGER,
2423
    UPDATEDBY_ID INTEGER
2424
);
2425
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS_AUD;
2426
CREATE CACHED TABLE PUBLIC.MARKER(
2427
    ID INTEGER NOT NULL,
2428
    CREATED TIMESTAMP,
2429
    UUID VARCHAR(36),
2430
    UPDATED TIMESTAMP,
2431
    FLAG BOOLEAN NOT NULL,
2432
    CREATEDBY_ID INTEGER,
2433
    UPDATEDBY_ID INTEGER,
2434
    MARKERTYPE_ID INTEGER
2435
);
2436
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER;
2437
CREATE CACHED TABLE PUBLIC.MARKER_AUD(
2438
    ID INTEGER NOT NULL,
2439
    REV INTEGER NOT NULL,
2440
    REVTYPE TINYINT,
2441
    CREATED TIMESTAMP,
2442
    UUID VARCHAR(36),
2443
    UPDATED TIMESTAMP,
2444
    FLAG BOOLEAN,
2445
    CREATEDBY_ID INTEGER,
2446
    UPDATEDBY_ID INTEGER,
2447
    MARKERTYPE_ID INTEGER
2448
);
2449

    
2450
CREATE TABLE MATERIALORMETHODEVENT (
2451
    ID INTEGER NOT NULL,
2452
    DTYPE VARCHAR(255),
2453
    CREATED TIMESTAMP,
2454
    UUID VARCHAR(36),
2455
    UPDATED TIMESTAMP,
2456
    MATERIALMETHODTEXT VARCHAR(255),
2457
    DESCRIPTION VARCHAR(255),
2458
    TIMEPERIOD_END VARCHAR(255),
2459
    TIMEPERIOD_FREETEXT VARCHAR(255),
2460
    TIMEPERIOD_START VARCHAR(255),
2461
        STRAIN VARCHAR(255),
2462
    TEMPERATURE DOUBLE,
2463
    CREATEDBY_ID INTEGER,
2464
    UPDATEDBY_ID INTEGER,
2465
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2466
    ACTOR_ID INTEGER,
2467
    FORWARDPRIMER_ID INTEGER,
2468
    REVERSEPRIMER_ID INTEGER,
2469
    MEDIUM_ID INTEGER,
2470
    PRIMARY KEY (ID)
2471
);
2472

    
2473
CREATE TABLE MATERIALORMETHODEVENT_AUD (
2474
    ID INTEGER NOT NULL,
2475
    REV INTEGER NOT NULL,
2476
    REVTYPE TINYINT,
2477
        DTYPE VARCHAR(255),
2478
    CREATED TIMESTAMP,
2479
    UUID VARCHAR(36),
2480
    UPDATED TIMESTAMP,
2481
    MATERIALMETHODTEXT VARCHAR(255),
2482
    DESCRIPTION VARCHAR(255),
2483
    TIMEPERIOD_END VARCHAR(255),
2484
    TIMEPERIOD_FREETEXT VARCHAR(255),
2485
    TIMEPERIOD_START VARCHAR(255),
2486
        STRAIN VARCHAR(255),
2487
    TEMPERATURE DOUBLE,
2488
    CREATEDBY_ID INTEGER,
2489
    UPDATEDBY_ID INTEGER,
2490
    DEFINEDMATERIALORMETHOD_ID INTEGER,
2491
    ACTOR_ID INTEGER,
2492
    FORWARDPRIMER_ID INTEGER,
2493
    REVERSEPRIMER_ID INTEGER,
2494
    MEDIUM_ID INTEGER
2495
);
2496

    
2497
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2498
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2499
    ANNOTATIONS_ID INTEGER NOT NULL,
2500
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2501
);
2502

    
2503
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2504
    REV INTEGER NOT NULL,
2505
    REVTYPE TINYINT,
2506
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2507
    ANNOTATIONS_ID INTEGER NOT NULL,
2508
);
2509

    
2510
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2511
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2512
    MARKERS_ID INTEGER NOT NULL,
2513
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2514
);
2515

    
2516
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2517
    REV INTEGER NOT NULL,
2518
    REVTYPE TINYINT,
2519
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2520
    MARKERS_ID INTEGER NOT NULL,
2521
);
2522

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

    
3289
CREATE TABLE PRIMER (
3290
    ID INTEGER NOT NULL,
3291
    CREATED TIMESTAMP,
3292
    UUID VARCHAR(36),
3293
    UPDATED TIMESTAMP,
3294
    LABEL VARCHAR(255),
3295
        SEQUENCE_LENGTH INTEGER,
3296
        SEQUENCE_STRING CLOB,
3297
    CREATEDBY_ID INTEGER,
3298
    UPDATEDBY_ID INTEGER,
3299
    DNAMARKER_ID INTEGER,
3300
        PUBLISHEDIN_ID INTEGER,
3301
        PRIMARY KEY (ID)
3302
);
3303
CREATE TABLE PRIMER_AUD (
3304
    ID INTEGER NOT NULL,
3305
    CREATED TIMESTAMP,
3306
    UUID VARCHAR(36),
3307
    UPDATED TIMESTAMP,
3308
    LABEL VARCHAR(255),
3309
    SEQUENCE_LENGTH INTEGER,
3310
    SEQUENCE_STRING CLOB,
3311
    CREATEDBY_ID INTEGER,
3312
    UPDATEDBY_ID INTEGER,
3313
        DNAMARKER_ID INTEGER,
3314
        PUBLISHEDIN_ID INTEGER,
3315
);
3316

    
3317
CREATE TABLE PRIMER_ANNOTATION (
3318
    PRIMER_ID INTEGER NOT NULL,
3319
    ANNOTATIONS_ID INTEGER NOT NULL,
3320
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3321
);
3322
CREATE TABLE PRIMER_ANNOTATION_AUD (
3323
    PRIMER_ID INTEGER NOT NULL,
3324
    ANNOTATIONS_ID INTEGER NOT NULL
3325
);
3326

    
3327
CREATE TABLE PRIMER_MARKER (
3328
    PRIMER_ID INTEGER NOT NULL,
3329
    MARKERS_ID INTEGER NOT NULL,
3330
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3331
);
3332
CREATE TABLE PRIMER_MARKER_AUD (
3333
    PRIMER_ID INTEGER NOT NULL,
3334
    MARKERS_ID INTEGER NOT NULL
3335
);
3336

    
3337

    
3338
CREATE CACHED TABLE PUBLIC.REFERENCE(
3339
    DTYPE VARCHAR(31) NOT NULL,
3340
    ID INTEGER NOT NULL,
3341
    CREATED TIMESTAMP,
3342
    UUID VARCHAR(36),
3343
    UPDATED TIMESTAMP,
3344
    LSID_AUTHORITY VARCHAR(255),
3345
    LSID_LSID VARCHAR(255),
3346
    LSID_NAMESPACE VARCHAR(255),
3347
    LSID_OBJECT VARCHAR(255),
3348
    LSID_REVISION VARCHAR(255),
3349
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3350
    TITLECACHE VARCHAR(800),
3351
    DATEPUBLISHED_END VARCHAR(255),
3352
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3353
    DATEPUBLISHED_START VARCHAR(255),
3354
    EDITION VARCHAR(255),
3355
    EDITOR VARCHAR(255),
3356
    ISBN VARCHAR(255),
3357
    ISSN VARCHAR(255),
3358
    DOI VARCHAR(255),
3359
    NOMENCLATURALLYRELEVANT BOOLEAN NOT NULL,
3360
    ORGANIZATION VARCHAR(255),
3361
    PAGES VARCHAR(255),
3362
    PARSINGPROBLEM INTEGER NOT NULL,
3363
    PLACEPUBLISHED VARCHAR(255),
3364
    PROBLEMENDS INTEGER NOT NULL,
3365
    PROBLEMSTARTS INTEGER NOT NULL,
3366
    PUBLISHER VARCHAR(255),
3367
    REFERENCEABSTRACT CLOB,
3368
    SERIESPART VARCHAR(255),
3369
    TITLE CLOB,
3370
    ABBREVTITLE VARCHAR(255),
3371
    ABBREVTITLECACHE CLOB,
3372
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3373
    REFTYPE VARCHAR(4),
3374
    URI CLOB,
3375
    VOLUME VARCHAR(255),
3376
    CREATEDBY_ID INTEGER,
3377
    UPDATEDBY_ID INTEGER,
3378
    AUTHORSHIP_ID INTEGER,
3379
    INREFERENCE_ID INTEGER,
3380
    INSTITUTION_ID INTEGER,
3381
    SCHOOL_ID INTEGER
3382
);
3383
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE;
3384
CREATE INDEX PUBLIC.REFERENCETITLECACHEINDEX ON PUBLIC.REFERENCE(TITLECACHE);
3385
CREATE CACHED TABLE PUBLIC.REFERENCE_AUD(
3386
    DTYPE VARCHAR(31) NOT NULL,
3387
    ID INTEGER NOT NULL,
3388
    REV INTEGER NOT NULL,
3389
    REVTYPE TINYINT,
3390
    CREATED TIMESTAMP,
3391
    UUID VARCHAR(36),
3392
    UPDATED TIMESTAMP,
3393
    LSID_AUTHORITY VARCHAR(255),
3394
    LSID_LSID VARCHAR(255),
3395
    LSID_NAMESPACE VARCHAR(255),
3396
    LSID_OBJECT VARCHAR(255),
3397
    LSID_REVISION VARCHAR(255),
3398
    PROTECTEDTITLECACHE BOOLEAN,
3399
    TITLECACHE VARCHAR(800),
3400
    DATEPUBLISHED_END VARCHAR(255),
3401
    DATEPUBLISHED_FREETEXT VARCHAR(255),
3402
    DATEPUBLISHED_START VARCHAR(255),
3403
    EDITION VARCHAR(255),
3404
    EDITOR VARCHAR(255),
3405
    ISBN VARCHAR(255),
3406
    ISSN VARCHAR(255),
3407
    DOI VARCHAR(255),
3408
    NOMENCLATURALLYRELEVANT BOOLEAN,
3409
    ORGANIZATION VARCHAR(255),
3410
    PAGES VARCHAR(255),
3411
    PARSINGPROBLEM INTEGER,
3412
    PLACEPUBLISHED VARCHAR(255),
3413
    PROBLEMENDS INTEGER,
3414
    PROBLEMSTARTS INTEGER,
3415
    PUBLISHER VARCHAR(255),
3416
    REFERENCEABSTRACT CLOB,
3417
    SERIESPART VARCHAR(255),
3418
    TITLE CLOB,
3419
    ABBREVTITLE VARCHAR(255),
3420
    ABBREVTITLECACHE CLOB,
3421
    PROTECTEDABBREVTITLECACHE BOOLEAN,
3422
    REFTYPE  VARCHAR(4),
3423
    URI CLOB,
3424
    VOLUME VARCHAR(255),
3425
    CREATEDBY_ID INTEGER,
3426
    UPDATEDBY_ID INTEGER,
3427
    AUTHORSHIP_ID INTEGER,
3428
    INREFERENCE_ID INTEGER,
3429
    INSTITUTION_ID INTEGER,
3430
    SCHOOL_ID INTEGER
3431
);
3432
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_AUD;
3433
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION(
3434
    REFERENCE_ID INTEGER NOT NULL,
3435
    ANNOTATIONS_ID INTEGER NOT NULL
3436
);
3437
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION;
3438
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION_AUD(
3439
    REV INTEGER NOT NULL,
3440
    REFERENCE_ID INTEGER NOT NULL,
3441
    ANNOTATIONS_ID INTEGER NOT NULL,
3442
    REVTYPE TINYINT
3443
);
3444
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION_AUD;
3445
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT(
3446
    REFERENCE_ID INTEGER NOT NULL,
3447
    CREDITS_ID INTEGER NOT NULL,
3448
    SORTINDEX INTEGER NOT NULL
3449
);
3450
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT;
3451
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT_AUD(
3452
    REV INTEGER NOT NULL,
3453
    REFERENCE_ID INTEGER NOT NULL,
3454
    CREDITS_ID INTEGER NOT NULL,
3455
    SORTINDEX INTEGER NOT NULL,
3456
    REVTYPE TINYINT
3457
);
3458
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT_AUD;
3459
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION(
3460
    REFERENCE_ID INTEGER NOT NULL,
3461
    EXTENSIONS_ID INTEGER NOT NULL
3462
);
3463
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION;
3464
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION_AUD(
3465
    REV INTEGER NOT NULL,
3466
    REFERENCE_ID INTEGER NOT NULL,
3467
    EXTENSIONS_ID INTEGER NOT NULL,
3468
    REVTYPE TINYINT
3469
);
3470
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION_AUD;
3471
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER(
3472
    REFERENCE_ID INTEGER NOT NULL,
3473
    IDENTIFIERS_ID INTEGER NOT NULL,
3474
    SORTINDEX INTEGER NOT NULL
3475
);
3476
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER;
3477
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER_AUD(
3478
    REV INTEGER NOT NULL,
3479
    REFERENCE_ID INTEGER NOT NULL,
3480
    IDENTIFIERS_ID INTEGER NOT NULL,
3481
    SORTINDEX INTEGER NOT NULL,
3482
    REVTYPE TINYINT
3483
);
3484
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER_AUD;
3485
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER(
3486
    REFERENCE_ID INTEGER NOT NULL,
3487
    MARKERS_ID INTEGER NOT NULL
3488
);
3489
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER;
3490
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER_AUD(
3491
    REV INTEGER NOT NULL,
3492
    REFERENCE_ID INTEGER NOT NULL,
3493
    MARKERS_ID INTEGER NOT NULL,
3494
    REVTYPE TINYINT
3495
);
3496
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER_AUD;
3497
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA(
3498
    REFERENCE_ID INTEGER NOT NULL,
3499
    MEDIA_ID INTEGER NOT NULL
3500
);
3501
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA;
3502
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA_AUD(
3503
    REV INTEGER NOT NULL,
3504
    REFERENCE_ID INTEGER NOT NULL,
3505
    MEDIA_ID INTEGER NOT NULL,
3506
    REVTYPE TINYINT
3507
);
3508
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA_AUD;
3509
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE(
3510
    REFERENCE_ID INTEGER NOT NULL,
3511
    SOURCES_ID INTEGER NOT NULL
3512
);
3513
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE;
3514
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD(
3515
    REV INTEGER NOT NULL,
3516
    REFERENCE_ID INTEGER NOT NULL,
3517
    SOURCES_ID INTEGER NOT NULL,
3518
    REVTYPE TINYINT
3519
);
3520
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD;
3521
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO(
3522
    REFERENCE_ID INTEGER NOT NULL,
3523
    RIGHTS_ID INTEGER NOT NULL
3524
);
3525
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO;
3526
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO_AUD(
3527
    REV INTEGER NOT NULL,
3528
    REFERENCE_ID INTEGER NOT NULL,
3529
    RIGHTS_ID INTEGER NOT NULL,
3530
    REVTYPE TINYINT
3531
);
3532
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO_AUD;
3533
CREATE CACHED TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION(
3534
    RELATIONSHIPTERMBASE_ID INTEGER NOT NULL,
3535
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL
3536
);
3537
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION;
3538
CREATE CACHED TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD(
3539
    REV INTEGER NOT NULL,
3540
    RELATIONSHIPTERMBASE_ID INTEGER NOT NULL,
3541
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL,
3542
    REVTYPE TINYINT
3543
);
3544
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD;
3545
CREATE CACHED TABLE PUBLIC.REPRESENTATION(
3546
    ID INTEGER NOT NULL,
3547
    CREATED TIMESTAMP,
3548
    UUID VARCHAR(36),
3549
    UPDATED TIMESTAMP,
3550
    TEXT CLOB,
3551
    ABBREVIATEDLABEL VARCHAR(255),
3552
    LABEL VARCHAR(255),
3553
    CREATEDBY_ID INTEGER,
3554
    UPDATEDBY_ID INTEGER,
3555
    LANGUAGE_ID INTEGER
3556
);
3557
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION;
3558
CREATE CACHED TABLE PUBLIC.REPRESENTATION_AUD(
3559
    ID INTEGER NOT NULL,
3560
    REV INTEGER NOT NULL,
3561
    REVTYPE TINYINT,
3562
    CREATED TIMESTAMP,
3563
    UUID VARCHAR(36),
3564
    UPDATED TIMESTAMP,
3565
    TEXT CLOB,
3566
    ABBREVIATEDLABEL VARCHAR(255),
3567
    LABEL VARCHAR(255),
3568
    CREATEDBY_ID INTEGER,
3569
    UPDATEDBY_ID INTEGER,
3570
    LANGUAGE_ID INTEGER
3571
);
3572
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_AUD;
3573
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION(
3574
    REPRESENTATION_ID INTEGER NOT NULL,
3575
    ANNOTATIONS_ID INTEGER NOT NULL
3576
);
3577
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION;
3578
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD(
3579
    REV INTEGER NOT NULL,
3580
    REPRESENTATION_ID INTEGER NOT NULL,
3581
    ANNOTATIONS_ID INTEGER NOT NULL,
3582
    REVTYPE TINYINT
3583
);
3584
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
3585
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER(
3586
    REPRESENTATION_ID INTEGER NOT NULL,
3587
    MARKERS_ID INTEGER NOT NULL
3588
);
3589
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER;
3590
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER_AUD(
3591
    REV INTEGER NOT NULL,
3592
    REPRESENTATION_ID INTEGER NOT NULL,
3593
    MARKERS_ID INTEGER NOT NULL,
3594
    REVTYPE TINYINT
3595
);
3596
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER_AUD;
3597
CREATE CACHED TABLE PUBLIC.RIGHTSINFO(
3598
    ID INTEGER NOT NULL,
3599
    CREATED TIMESTAMP,
3600
    UUID VARCHAR(36),
3601
    UPDATED TIMESTAMP,
3602
    TEXT CLOB,
3603
    ABBREVIATEDTEXT VARCHAR(255),
3604
    URI CLOB,
3605
    CREATEDBY_ID INTEGER,
3606
    UPDATEDBY_ID INTEGER,
3607
    LANGUAGE_ID INTEGER,
3608
    AGENT_ID INTEGER,
3609
    TYPE_ID INTEGER
3610
);
3611
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO;
3612
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_AUD(
3613
    ID INTEGER NOT NULL,
3614
    REV INTEGER NOT NULL,
3615
    REVTYPE TINYINT,
3616
    CREATED TIMESTAMP,
3617
    UUID VARCHAR(36),
3618
    UPDATED TIMESTAMP,
3619
    TEXT CLOB,
3620
    ABBREVIATEDTEXT VARCHAR(255),
3621
    URI CLOB,
3622
    CREATEDBY_ID INTEGER,
3623
    UPDATEDBY_ID INTEGER,
3624
    LANGUAGE_ID INTEGER,
3625
    AGENT_ID INTEGER,
3626
    TYPE_ID INTEGER
3627
);
3628
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_AUD;
3629
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION(
3630
    RIGHTS_ID INTEGER NOT NULL,
3631
    ANNOTATIONS_ID INTEGER NOT NULL
3632
);
3633
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION;
3634
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD(
3635
    REV INTEGER NOT NULL,
3636
    RIGHTS_ID INTEGER NOT NULL,
3637
    ANNOTATIONS_ID INTEGER NOT NULL,
3638
    REVTYPE TINYINT
3639
);
3640
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION_AUD;
3641
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER(
3642
    RIGHTS_ID INTEGER NOT NULL,
3643
    MARKERS_ID INTEGER NOT NULL
3644
);
3645
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_MARKER;
3646
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER_AUD(
3647
    REV INTEGER NOT NULL,
3648
    RIGHTS_ID INTEGER NOT NULL,
3649
    MARKERS_ID INTEGER NOT NULL,
3650
    REVTYPE TINYINT
3651
);
3652

    
3653
CREATE TABLE SEQUENCE (
3654
    ID INTEGER NOT NULL,
3655
    CREATED TIMESTAMP,
3656
    UUID VARCHAR(36),
3657
    UPDATED TIMESTAMP,
3658
    BARCODESEQUENCEPART_LENGTH INTEGER,
3659
    BARCODESEQUENCEPART_STRING CLOB,
3660
    BOLDPROCESSID VARCHAR(255),
3661
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3662
    CONSENSUSSEQUENCE_STRING CLOB,
3663
    GENETICACCESSIONNUMBER VARCHAR(255),
3664
    HAPLOTYPE VARCHAR(255),
3665
    ISBARCODE BOOLEAN,
3666
    CREATEDBY_ID INTEGER,
3667
    UPDATEDBY_ID INTEGER,
3668
    CONTIGFILE_ID INTEGER,
3669
    DNASAMPLE_ID INTEGER,
3670
    DNAMARKER_ID INTEGER,
3671
    PRIMARY KEY (ID)
3672
);
3673
CREATE TABLE SEQUENCE_AUD (
3674
    ID INTEGER NOT NULL,
3675
    REV INTEGER NOT NULL,
3676
    REVTYPE TINYINT,
3677
    CREATED TIMESTAMP,
3678
    UUID VARCHAR(36),
3679
    UPDATED TIMESTAMP,
3680
    BARCODESEQUENCEPART_LENGTH INTEGER,
3681
    BARCODESEQUENCEPART_STRING CLOB,
3682
    BOLDPROCESSID VARCHAR(255),
3683
    CONSENSUSSEQUENCE_LENGTH INTEGER,
3684
    CONSENSUSSEQUENCE_STRING CLOB,
3685
    GENETICACCESSIONNUMBER VARCHAR(255),
3686
    HAPLOTYPE VARCHAR(255),
3687
    ISBARCODE BOOLEAN,
3688
    CREATEDBY_ID INTEGER,
3689
    UPDATEDBY_ID INTEGER,
3690
    CONTIGFILE_ID INTEGER,
3691
    DNASAMPLE_ID INTEGER,
3692
    DNAMARKER_ID INTEGER
3693
);
3694

    
3695
CREATE TABLE SEQUENCE_ANNOTATION (
3696
    SEQUENCE_ID INTEGER NOT NULL,
3697
    ANNOTATIONS_ID INTEGER NOT NULL,
3698
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3699
);
3700
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3701
    REV INTEGER NOT NULL,
3702
    REVTYPE TINYINT,
3703
    SEQUENCE_ID INTEGER NOT NULL,
3704
    ANNOTATIONS_ID INTEGER NOT NULL
3705
);
3706

    
3707
CREATE TABLE SEQUENCE_MARKER (
3708
    SEQUENCE_ID INTEGER NOT NULL,
3709
    MARKERS_ID INTEGER NOT NULL,
3710
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3711
);
3712
CREATE TABLE SEQUENCE_MARKER_AUD (
3713
    REV INTEGER NOT NULL,
3714
    REVTYPE TINYINT,
3715
    SEQUENCE_ID INTEGER NOT NULL,
3716
    MARKERS_ID INTEGER NOT NULL
3717
);
3718
CREATE TABLE SEQUENCE_REFERENCE (
3719
    SEQUENCE_ID INTEGER NOT NULL,
3720
    CITATIONS_ID INTEGER NOT NULL,
3721
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3722
);
3723
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3724
    REV INTEGER NOT NULL,
3725
    REVTYPE TINYINT,
3726
    SEQUENCE_ID INTEGER NOT NULL,
3727
    CITATIONS_ID INTEGER NOT NULL
3728
);
3729

    
3730
CREATE TABLE SINGLEREADALIGNMENT (
3731
    ID INTEGER NOT NULL,
3732
    CREATED TIMESTAMP,
3733
    UUID VARCHAR(36),
3734
    UPDATED TIMESTAMP,
3735
        EDITEDSEQUENCE CLOB,
3736
        SHIFTS CLOB,
3737
    REVERSECOMPLEMENT BIT,
3738
        FIRSTSEQPOSITION INTEGER,
3739
        LEFTCUTPOSITION INTEGER,
3740
        RIGHTCUTPOSITION INTEGER,
3741
        CREATEDBY_ID INTEGER,
3742
    UPDATEDBY_ID INTEGER,
3743
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3744
    SINGLEREAD_ID INTEGER NOT NULL,
3745
    PRIMARY KEY (ID)
3746
);
3747

    
3748
CREATE TABLE SINGLEREADALIGNMENT_AUD (
3749
    ID INTEGER NOT NULL,
3750
    REV INTEGER NOT NULL,
3751
    REVTYPE TINYINT,
3752
    CREATED TIMESTAMP,
3753
    UUID VARCHAR(36),
3754
    UPDATED TIMESTAMP,
3755
        EDITEDSEQUENCE CLOB,
3756
        SHIFTS CLOB,
3757
    REVERSECOMPLEMENT BIT,
3758
        FIRSTSEQPOSITION INTEGER,
3759
        LEFTCUTPOSITION INTEGER,
3760
        RIGHTCUTPOSITION INTEGER,
3761
        CREATEDBY_ID INTEGER,
3762
    UPDATEDBY_ID INTEGER,
3763
    CONSENSUSALIGNMENT_ID INTEGER NULL,
3764
    SINGLEREAD_ID INTEGER NOT NULL
3765
);
3766

    
3767
CREATE TABLE SINGLEREAD (
3768
    ID INTEGER NOT NULL,
3769
    CREATED TIMESTAMP,
3770
    UUID VARCHAR(36),
3771
    UPDATED TIMESTAMP,
3772
    DESCRIPTION VARCHAR(255),
3773
    TIMEPERIOD_END VARCHAR(255),
3774
    TIMEPERIOD_FREETEXT VARCHAR(255),
3775
    TIMEPERIOD_START VARCHAR(255),
3776
    DIRECTION VARCHAR(3),
3777
    SEQUENCE_LENGTH INTEGER,
3778
    SEQUENCE_STRING CLOB,
3779
    CREATEDBY_ID INTEGER,
3780
    UPDATEDBY_ID INTEGER,
3781
    ACTOR_ID INTEGER,
3782
    AMPLIFICATIONRESULT_ID INTEGER,
3783
    MATERIALORMETHOD_ID INTEGER,
3784
    PHEROGRAM_ID INTEGER,
3785
    PRIMER_ID INTEGER,
3786
    PRIMARY KEY (ID)
3787
);
3788
CREATE TABLE SINGLEREAD_AUD (
3789
    ID INTEGER NOT NULL,
3790
    REV INTEGER NOT NULL,
3791
    REVTYPE TINYINT,
3792
    CREATED TIMESTAMP,
3793
    UUID VARCHAR(36),
3794
    UPDATED TIMESTAMP,
3795
    DESCRIPTION VARCHAR(255),
3796
    TIMEPERIOD_END VARCHAR(255),
3797
    TIMEPERIOD_FREETEXT VARCHAR(255),
3798
    TIMEPERIOD_START VARCHAR(255),
3799
    DIRECTION VARCHAR(3),
3800
    SEQUENCE_LENGTH INTEGER,
3801
    SEQUENCE_STRING CLOB,
3802
    CREATEDBY_ID INTEGER,
3803
    UPDATEDBY_ID INTEGER,
3804
    ACTOR_ID INTEGER,
3805
    AMPLIFICATIONRESULT_ID INTEGER,
3806
    MATERIALORMETHOD_ID INTEGER,
3807
    PHEROGRAM_ID INTEGER,
3808
    PRIMER_ID INTEGER
3809
);
3810

    
3811
CREATE TABLE SINGLEREAD_ANNOTATION (
3812
    SINGLEREAD_ID INTEGER NOT NULL,
3813
    ANNOTATIONS_ID INTEGER NOT NULL,
3814
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
3815
);
3816
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
3817
    REV INTEGER NOT NULL,
3818
    REVTYPE TINYINT,
3819
    SINGLEREAD_ID INTEGER NOT NULL,
3820
    ANNOTATIONS_ID INTEGER NOT NULL
3821
);
3822

    
3823
CREATE TABLE SINGLEREAD_MARKER (
3824
    SINGLEREAD_ID INTEGER NOT NULL,
3825
    MARKERS_ID INTEGER NOT NULL,
3826
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
3827
);
3828

    
3829
CREATE TABLE SINGLEREAD_MARKER_AUD (
3830
    REV INTEGER NOT NULL,
3831
    REVTYPE TINYINT,
3832
    SINGLEREAD_ID INTEGER NOT NULL,
3833
    MARKERS_ID INTEGER NOT NULL
3834
);
3835

    
3836

    
3837
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
3838
    DTYPE VARCHAR(31) NOT NULL,
3839
    ID INTEGER NOT NULL,
3840
    CREATED TIMESTAMP,
3841
    UUID VARCHAR(36),
3842
    UPDATED TIMESTAMP,
3843
    RECORDBASIS  VARCHAR(4) NOT NULL,
3844
    LSID_AUTHORITY VARCHAR(255),
3845
    LSID_LSID VARCHAR(255),
3846
    LSID_NAMESPACE VARCHAR(255),
3847
    LSID_OBJECT VARCHAR(255),
3848
    LSID_REVISION VARCHAR(255),
3849
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3850
    TITLECACHE VARCHAR(255),
3851
    PUBLISH BOOLEAN,
3852
    INDIVIDUALCOUNT INTEGER,
3853
        PREFERREDSTABLEURI CLOB,
3854
    ACCESSIONNUMBER VARCHAR(255),
3855
    BARCODE VARCHAR(255),
3856
    CATALOGNUMBER VARCHAR(255),
3857
    COLLECTORSNUMBER VARCHAR(255),
3858
    EXSICCATUM VARCHAR(255),
3859
    ORIGINALLABELINFO CLOB,
3860
    FIELDNOTES VARCHAR(255),
3861
    FIELDNUMBER VARCHAR(255),
3862
    CREATEDBY_ID INTEGER,
3863
    UPDATEDBY_ID INTEGER,
3864
    LIFESTAGE_ID INTEGER,
3865
    SEX_ID INTEGER,
3866
    KINDOFUNIT_ID INTEGER,
3867
    COLLECTION_ID INTEGER,
3868
    DERIVEDFROM_ID INTEGER,
3869
    STOREDUNDER_ID INTEGER,
3870
    PRESERVATION_ID INTEGER,
3871
    GATHERINGEVENT_ID INTEGER,
3872
    PRIMARYCOLLECTOR_ID INTEGER,
3873
    MEDIASPECIMEN_ID INTEGER,
3874
    DNAQUALITY_ID INTEGER
3875
);
3876
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
3877
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
3878
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
3879
    DTYPE VARCHAR(31) NOT NULL,
3880
    ID INTEGER NOT NULL,
3881
    REV INTEGER NOT NULL,
3882
    REVTYPE TINYINT,
3883
    CREATED TIMESTAMP,
3884
    UUID VARCHAR(36),
3885
    UPDATED TIMESTAMP,
3886
    RECORDBASIS  VARCHAR(4) NOT NULL,
3887
    LSID_AUTHORITY VARCHAR(255),
3888
    LSID_LSID VARCHAR(255),
3889
    LSID_NAMESPACE VARCHAR(255),
3890
    LSID_OBJECT VARCHAR(255),
3891
    LSID_REVISION VARCHAR(255),
3892
    PROTECTEDTITLECACHE BOOLEAN,
3893
    TITLECACHE VARCHAR(255),
3894
    PUBLISH BOOLEAN,
3895
    INDIVIDUALCOUNT INTEGER,
3896
    PREFERREDSTABLEURI CLOB,
3897
    ACCESSIONNUMBER VARCHAR(255),
3898
    BARCODE VARCHAR(255),
3899
    CATALOGNUMBER VARCHAR(255),
3900
    COLLECTORSNUMBER VARCHAR(255),
3901
    EXSICCATUM VARCHAR(255),
3902
    ORIGINALLABELINFO CLOB,
3903
    FIELDNOTES VARCHAR(255),
3904
    FIELDNUMBER VARCHAR(255),
3905
    CREATEDBY_ID INTEGER,
3906
    UPDATEDBY_ID INTEGER,
3907
    LIFESTAGE_ID INTEGER,
3908
    SEX_ID INTEGER,
3909
    KINDOFUNIT_ID INTEGER,
3910
    COLLECTION_ID INTEGER,
3911
    DERIVEDFROM_ID INTEGER,
3912
    STOREDUNDER_ID INTEGER,
3913
    PRESERVATION_ID INTEGER,
3914
    GATHERINGEVENT_ID INTEGER,
3915
    PRIMARYCOLLECTOR_ID INTEGER,
3916
    MEDIASPECIMEN_ID INTEGER,
3917
    DNAQUALITY_ID INTEGER
3918
);
3919
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
3920
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
3921
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3922
    ANNOTATIONS_ID INTEGER NOT NULL
3923
);
3924
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
3925
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
3926
    REV INTEGER NOT NULL,
3927
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3928
    ANNOTATIONS_ID INTEGER NOT NULL,
3929
    REVTYPE TINYINT
3930
);
3931
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
3932
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
3933
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3934
    CREDITS_ID INTEGER NOT NULL,
3935
    SORTINDEX INTEGER NOT NULL
3936
);
3937
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
3938
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
3939
    REV INTEGER NOT NULL,
3940
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3941
    CREDITS_ID INTEGER NOT NULL,
3942
    SORTINDEX INTEGER NOT NULL,
3943
    REVTYPE TINYINT
3944
);
3945
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
3946
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
3947
    ORIGINALS_ID INTEGER NOT NULL,
3948
    DERIVATIONEVENTS_ID INTEGER NOT NULL
3949
);
3950
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
3951
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
3952
    REV INTEGER NOT NULL,
3953
    ORIGINALS_ID INTEGER NOT NULL,
3954
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
3955
    REVTYPE TINYINT
3956
);
3957
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
3958
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
3959
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3960
    EXTENSIONS_ID INTEGER NOT NULL
3961
);
3962
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
3963
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
3964
    REV INTEGER NOT NULL,
3965
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3966
    EXTENSIONS_ID INTEGER NOT NULL,
3967
    REVTYPE TINYINT
3968
);
3969
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;
3970

    
3971
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
3972
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3973
    IDENTIFIERS_ID INTEGER NOT NULL,
3974
    SORTINDEX INTEGER NOT NULL
3975
);
3976
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
3977
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
3978
    REV INTEGER NOT NULL,
3979
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3980
    IDENTIFIERS_ID INTEGER NOT NULL,
3981
    SORTINDEX INTEGER NOT NULL,
3982
    REVTYPE TINYINT
3983
);
3984
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
3985

    
3986
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
3987
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3988
    DEFINITION_ID INTEGER NOT NULL,
3989
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
3990
);
3991
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
3992
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
3993
    REV INTEGER NOT NULL,
3994
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3995
    DEFINITION_ID INTEGER NOT NULL,
3996
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
3997
    REVTYPE TINYINT
3998
);
3999
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
4000
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
4001
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4002
    MARKERS_ID INTEGER NOT NULL
4003
);
4004
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
4005
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
4006
    REV INTEGER NOT NULL,
4007
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4008
    MARKERS_ID INTEGER NOT NULL,
4009
    REVTYPE TINYINT
4010
);
4011
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
4012
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
4013
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4014
    SOURCES_ID INTEGER NOT NULL
4015
);
4016
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
4017
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
4018
    REV INTEGER NOT NULL,
4019
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4020
    SOURCES_ID INTEGER NOT NULL,
4021
    REVTYPE TINYINT
4022
);
4023
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
4024
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO(
4025
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4026
    RIGHTS_ID INTEGER NOT NULL
4027
);
4028
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO;
4029
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD(
4030
    REV INTEGER NOT NULL,
4031
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
4032
    RIGHTS_ID INTEGER NOT NULL,
4033
    REVTYPE TINYINT
4034
);
4035
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD;
4036

    
4037
CREATE CACHED TABLE PUBLIC.STATEDATA(
4038
    ID INTEGER NOT NULL,
4039
    CREATED TIMESTAMP,
4040
    UUID VARCHAR(36),
4041
    UPDATED TIMESTAMP,
4042
    CREATEDBY_ID INTEGER,
4043
    UPDATEDBY_ID INTEGER,
4044
        CATEGORICALDATA_ID INTEGER,
4045
    STATE_ID INTEGER
4046
);
4047
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA;
4048
CREATE CACHED TABLE PUBLIC.STATEDATA_AUD(
4049
    ID INTEGER NOT NULL,
4050
    REV INTEGER NOT NULL,
4051
    REVTYPE TINYINT,
4052
    CREATED TIMESTAMP,
4053
    UUID VARCHAR(36),
4054
    UPDATED TIMESTAMP,
4055
    CREATEDBY_ID INTEGER,
4056
    UPDATEDBY_ID INTEGER,
4057
        CATEGORICALDATA_ID INTEGER,
4058
    STATE_ID INTEGER
4059
);
4060
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_AUD;
4061
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE(
4062
    STATEDATA_ID INTEGER NOT NULL,
4063
    MODIFIERS_ID INTEGER NOT NULL
4064
);
4065
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE;
4066
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD(
4067
    REV INTEGER NOT NULL,
4068
    STATEDATA_ID INTEGER NOT NULL,
4069
    MODIFIERS_ID INTEGER NOT NULL,
4070
    REVTYPE TINYINT
4071
);
4072
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD;
4073
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING(
4074
    STATEDATA_ID INTEGER NOT NULL,
4075
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4076
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
4077
);
4078
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING;
4079
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD(
4080
    REV INTEGER NOT NULL,
4081
    STATEDATA_ID INTEGER NOT NULL,
4082
    MODIFYINGTEXT_ID INTEGER NOT NULL,
4083
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
4084
    REVTYPE TINYINT
4085
);
4086
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING_AUD;
4087
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE(
4088
    ID INTEGER NOT NULL,
4089
    CREATED TIMESTAMP,
4090
    UUID VARCHAR(36),
4091
    UPDATED TIMESTAMP,
4092
    VALUE DOUBLE NOT NULL,
4093
    CREATEDBY_ID INTEGER,
4094
    UPDATEDBY_ID INTEGER,
4095
        QUANTITATIVEDATA_ID INTEGER,
4096
    TYPE_ID INTEGER
4097
);
4098
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE;
4099
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD(
4100
    ID INTEGER NOT NULL,
4101
    REV INTEGER NOT NULL,
4102
    REVTYPE TINYINT,
4103
    CREATED TIMESTAMP,
4104
    UUID VARCHAR(36),
4105
    UPDATED TIMESTAMP,
4106
    VALUE DOUBLE,
4107
    CREATEDBY_ID INTEGER,
4108
    UPDATEDBY_ID INTEGER,
4109
        QUANTITATIVEDATA_ID INTEGER,
4110
    TYPE_ID INTEGER
4111
);
4112
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_AUD;
4113
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE(
4114
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4115
    MODIFIERS_ID INTEGER NOT NULL
4116
);
4117
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE;
4118
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD(
4119
    REV INTEGER NOT NULL,
4120
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
4121
    MODIFIERS_ID INTEGER NOT NULL,
4122
    REVTYPE TINYINT
4123
);
4124
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD;
4125
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP(
4126
    ID INTEGER NOT NULL,
4127
    CREATED TIMESTAMP,
4128
    UUID VARCHAR(36),
4129
    UPDATED TIMESTAMP,
4130
    CITATIONMICROREFERENCE VARCHAR(255),
4131
    ORIGINALNAMESTRING VARCHAR(255),
4132
    DOUBTFUL BOOLEAN NOT NULL,
4133
    PARTIAL BOOLEAN NOT NULL,
4134
    PROPARTE BOOLEAN NOT NULL,
4135
    CREATEDBY_ID INTEGER,
4136
    UPDATEDBY_ID INTEGER,
4137
    CITATION_ID INTEGER,
4138
    RELATEDFROM_ID INTEGER,
4139
    RELATEDTO_ID INTEGER,
4140
    TYPE_ID INTEGER
4141
);
4142
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP;
4143
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_AUD(
4144
    ID INTEGER NOT NULL,
4145
    REV INTEGER NOT NULL,
4146
    REVTYPE TINYINT,
4147
    CREATED TIMESTAMP,
4148
    UUID VARCHAR(36),
4149
    UPDATED TIMESTAMP,
4150
    CITATIONMICROREFERENCE VARCHAR(255),
4151
    ORIGINALNAMESTRING VARCHAR(255),
4152
    DOUBTFUL BOOLEAN,
4153
    PARTIAL BOOLEAN,
4154
    PROPARTE BOOLEAN,
4155
    CREATEDBY_ID INTEGER,
4156
    UPDATEDBY_ID INTEGER,
4157
    CITATION_ID INTEGER,
4158
    RELATEDFROM_ID INTEGER,
4159
    RELATEDTO_ID INTEGER,
4160
    TYPE_ID INTEGER
4161
);
4162
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_AUD;
4163
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION(
4164
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4165
    ANNOTATIONS_ID INTEGER NOT NULL
4166
);
4167
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION;
4168
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION_AUD(
4169
    REV INTEGER NOT NULL,
4170
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4171
    ANNOTATIONS_ID INTEGER NOT NULL,
4172
    REVTYPE TINYINT
4173
);
4174
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_ANNOTATION_AUD;
4175
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_MARKER(
4176
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4177
    MARKERS_ID INTEGER NOT NULL
4178
);
4179
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_MARKER;
4180
CREATE CACHED TABLE PUBLIC.SYNONYMRELATIONSHIP_MARKER_AUD(
4181
    REV INTEGER NOT NULL,
4182
    SYNONYMRELATIONSHIP_ID INTEGER NOT NULL,
4183
    MARKERS_ID INTEGER NOT NULL,
4184
    REVTYPE TINYINT
4185
);
4186
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SYNONYMRELATIONSHIP_MARKER_AUD;
4187
CREATE CACHED TABLE PUBLIC.TAXONBASE(
4188
    DTYPE VARCHAR(31) NOT NULL,
4189
    ID INTEGER NOT NULL,
4190
    CREATED TIMESTAMP,
4191
    UUID VARCHAR(36),
4192
    UPDATED TIMESTAMP,
4193
    LSID_AUTHORITY VARCHAR(255),
4194
    LSID_LSID VARCHAR(255),
4195
    LSID_NAMESPACE VARCHAR(255),
4196
    LSID_OBJECT VARCHAR(255),
4197
    LSID_REVISION VARCHAR(255),
4198
        SECMICROREFERENCE VARCHAR(255),
4199
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
4200
    TITLECACHE VARCHAR(255),
4201
    APPENDEDPHRASE VARCHAR(255),
4202
    DOUBTFUL BOOLEAN NOT NULL,
4203
    PUBLISH BOOLEAN,
4204
    USENAMECACHE BOOLEAN NOT NULL,
4205
    EXCLUDED BOOLEAN,
4206
    TAXONSTATUSUNKNOWN BOOLEAN,
4207
    TAXONOMICCHILDRENCOUNT INTEGER,
4208
    UNPLACED BOOLEAN,
4209
    CREATEDBY_ID INTEGER,
4210
    UPDATEDBY_ID INTEGER,
4211
    NAME_ID INTEGER,
4212
    SEC_ID INTEGER,
4213
    TAXONOMICPARENTCACHE_ID INTEGER
4214
);
4215
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE;
4216
CREATE INDEX PUBLIC.TAXONBASETITLECACHEINDEX ON PUBLIC.TAXONBASE(TITLECACHE);
4217
CREATE CACHED TABLE PUBLIC.TAXONBASE_AUD(
4218
    DTYPE VARCHAR(31) NOT NULL,
4219
    ID INTEGER NOT NULL,
4220
    REV INTEGER NOT NULL,
4221
    REVTYPE TINYINT,
4222
    CREATED TIMESTAMP,
4223
    UUID VARCHAR(36),
4224
    UPDATED TIMESTAMP,
4225
    LSID_AUTHORITY VARCHAR(255),
4226
    LSID_LSID VARCHAR(255),
4227
    LSID_NAMESPACE VARCHAR(255),
4228
    LSID_OBJECT VARCHAR(255),
4229
    LSID_REVISION VARCHAR(255),
4230
    PROTECTEDTITLECACHE BOOLEAN,
4231
    TITLECACHE VARCHAR(255),
4232
    APPENDEDPHRASE VARCHAR(255),
4233
        SECMICROREFERENCE VARCHAR(255),
4234
    DOUBTFUL BOOLEAN,
4235
    PUBLISH BOOLEAN,
4236
    USENAMECACHE BOOLEAN,
4237
    CREATEDBY_ID INTEGER,
4238
    UPDATEDBY_ID INTEGER,
4239
    NAME_ID INTEGER,
4240
    SEC_ID INTEGER,
4241
    EXCLUDED BOOLEAN,
4242
    TAXONSTATUSUNKNOWN BOOLEAN,
4243
    TAXONOMICCHILDRENCOUNT INTEGER,
4244
    UNPLACED BOOLEAN,
4245
    TAXONOMICPARENTCACHE_ID INTEGER
4246
);
4247
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_AUD;
4248
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION(
4249
    TAXONBASE_ID INTEGER NOT NULL,
4250
    ANNOTATIONS_ID INTEGER NOT NULL
4251
);
4252
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION;
4253
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION_AUD(
4254
    REV INTEGER NOT NULL,
4255
    TAXONBASE_ID INTEGER NOT NULL,
4256
    ANNOTATIONS_ID INTEGER NOT NULL,
4257
    REVTYPE TINYINT
4258
);
4259
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION_AUD;
4260
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT(
4261
    TAXONBASE_ID INTEGER NOT NULL,
4262
    CREDITS_ID INTEGER NOT NULL,
4263
    SORTINDEX INTEGER NOT NULL
4264
);
4265
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT;
4266
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT_AUD(
4267
    REV INTEGER NOT NULL,
4268
    TAXONBASE_ID INTEGER NOT NULL,
4269
    CREDITS_ID INTEGER NOT NULL,
4270
    SORTINDEX INTEGER NOT NULL,
4271
    REVTYPE TINYINT
4272
);
4273
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT_AUD;
4274
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION(
4275
    TAXONBASE_ID INTEGER NOT NULL,
4276
    EXTENSIONS_ID INTEGER NOT NULL
4277
);
4278
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION;
4279
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION_AUD(
4280
    REV INTEGER NOT NULL,
4281
    TAXONBASE_ID INTEGER NOT NULL,
4282
    EXTENSIONS_ID INTEGER NOT NULL,
4283
    REVTYPE TINYINT
4284
);
4285
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION_AUD;
4286
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER(
4287
    TAXONBASE_ID INTEGER NOT NULL,
4288
    IDENTIFIERS_ID INTEGER NOT NULL,
4289
    SORTINDEX INTEGER NOT NULL
4290
);
4291
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER;
4292
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER_AUD(
4293
    REV INTEGER NOT NULL,
4294
    TAXONBASE_ID INTEGER NOT NULL,
4295
    IDENTIFIERS_ID INTEGER NOT NULL,
4296
    SORTINDEX INTEGER NOT NULL,
4297
    REVTYPE TINYINT
4298
);
4299
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER_AUD;
4300
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER(
4301
    TAXONBASE_ID INTEGER NOT NULL,
4302
    MARKERS_ID INTEGER NOT NULL
4303
);
4304
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER;
4305
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER_AUD(
4306
    REV INTEGER NOT NULL,
4307
    TAXONBASE_ID INTEGER NOT NULL,
4308
    MARKERS_ID INTEGER NOT NULL,
4309
    REVTYPE TINYINT
4310
);
4311
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER_AUD;
4312
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE(
4313
    TAXONBASE_ID INTEGER NOT NULL,
4314
    SOURCES_ID INTEGER NOT NULL
4315
);
4316
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE;
4317
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD(
4318
    REV INTEGER NOT NULL,
4319
    TAXONBASE_ID INTEGER NOT NULL,
4320
    SOURCES_ID INTEGER NOT NULL,
4321
    REVTYPE TINYINT
4322
);
4323
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD;
4324
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTSINFO(
4325
    TAXONBASE_ID INTEGER NOT NULL,
4326
    RIGHTS_ID INTEGER NOT NULL
4327
);
4328
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTSINFO;
4329
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTSINFO_AUD(
4330
    REV INTEGER NOT NULL,
4331
    TAXONBASE_ID INTEGER NOT NULL,
4332
    RIGHTS_ID INTEGER NOT NULL,
4333
    REVTYPE TINYINT
4334
);
4335
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTSINFO_AUD;
4336
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING(
4337
    TAXONINTERACTION_ID INTEGER NOT NULL,
4338
    DESCRIPTION_ID INTEGER NOT NULL,
4339
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
4340
);
4341
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONINTERACTION_LANGUAGESTRING;
4342
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD(
4343
    REV INTEGER NOT NULL,
4344
    TAXONINTERACTION_ID INTEGER NOT NULL,
4345
    DESCRIPTION_ID INTEGER NOT NULL,
4346
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
4347
    REVTYPE TINYINT
4348
);
4349
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD;
4350
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE(
4351
    DTYPE VARCHAR(31) NOT NULL,
4352
    ID INTEGER NOT NULL,
4353
    CREATED TIMESTAMP,
4354
    UUID VARCHAR(36),
4355
    UPDATED TIMESTAMP,
4356
    LSID_AUTHORITY VARCHAR(255),
4357
    LSID_LSID VARCHAR(255