Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (363 KB)

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

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

    
10

    
11
CREATE CACHED TABLE PUBLIC.ADDRESS(
12
    ID INTEGER NOT NULL,
13
    CREATED TIMESTAMP,
14
    UUID VARCHAR(36),
15
    UPDATED TIMESTAMP,
16
    LOCALITY VARCHAR(255),
17
    LOCATION_ERRORRADIUS INTEGER,
18
    LOCATION_LATITUDE DOUBLE,
19
    LOCATION_LONGITUDE DOUBLE,
20
    POBOX VARCHAR(255),
21
    POSTCODE VARCHAR(255),
22
    REGION VARCHAR(255),
23
    STREET VARCHAR(255),
24
    CREATEDBY_ID INTEGER,
25
    UPDATEDBY_ID INTEGER,
26
    COUNTRY_ID INTEGER,
27
    LOCATION_REFERENCESYSTEM_ID INTEGER
28
);
29
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ADDRESS;
30
CREATE CACHED TABLE PUBLIC.ADDRESS_AUD(
31
    ID INTEGER NOT NULL,
32
    REV INTEGER NOT NULL,
33
    REVTYPE TINYINT,
34
    CREATED TIMESTAMP,
35
    UUID VARCHAR(36),
36
    UPDATED TIMESTAMP,
37
    LOCALITY VARCHAR(255),
38
    LOCATION_ERRORRADIUS INTEGER,
39
    LOCATION_LATITUDE DOUBLE,
40
    LOCATION_LONGITUDE DOUBLE,
41
    POBOX VARCHAR(255),
42
    POSTCODE VARCHAR(255),
43
    REGION VARCHAR(255),
44
    STREET VARCHAR(255),
45
    CREATEDBY_ID INTEGER,
46
    UPDATEDBY_ID INTEGER,
47
    COUNTRY_ID INTEGER,
48
    LOCATION_REFERENCESYSTEM_ID INTEGER
49
);
50
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ADDRESS_AUD;
51
CREATE CACHED TABLE PUBLIC.AGENTBASE(
52
    DTYPE VARCHAR(31) NOT NULL,
53
    ID INTEGER NOT NULL,
54
    CREATED TIMESTAMP,
55
    UUID VARCHAR(36),
56
    UPDATED TIMESTAMP,
57
    LSID_AUTHORITY VARCHAR(255),
58
    LSID_LSID VARCHAR(255),
59
    LSID_NAMESPACE VARCHAR(255),
60
    LSID_OBJECT VARCHAR(255),
61
    LSID_REVISION VARCHAR(255),
62
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
63
    TITLECACHE VARCHAR(255),
64
        PROTECTEDCOLLECTORTITLECACHE BOOLEAN NOT NULL,
65
        COLLECTORTITLE VARCHAR(255),
66
        PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
67
    NOMENCLATURALTITLE VARCHAR(255),
68
    CODE VARCHAR(255),
69
    NAME VARCHAR(255),
70
    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
        ISDEFAULT BOOLEAN NOT NULL,
1264
    CREATEDBY_ID INTEGER,
1265
    UPDATEDBY_ID INTEGER,
1266
    SPECIMEN_ID INTEGER,
1267
    TAXON_ID INTEGER,
1268
    TAXONNAME_ID INTEGER
1269
);
1270
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE;
1271
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_AUD(
1272
    DTYPE VARCHAR(31) NOT NULL,
1273
    ID INTEGER NOT NULL,
1274
    REV INTEGER NOT NULL,
1275
    REVTYPE TINYINT,
1276
    CREATED TIMESTAMP,
1277
    UUID VARCHAR(36),
1278
    UPDATED TIMESTAMP,
1279
    LSID_AUTHORITY VARCHAR(255),
1280
    LSID_LSID VARCHAR(255),
1281
    LSID_NAMESPACE VARCHAR(255),
1282
    LSID_OBJECT VARCHAR(255),
1283
    LSID_REVISION VARCHAR(255),
1284
    PROTECTEDTITLECACHE BOOLEAN,
1285
    TITLECACHE VARCHAR(255),
1286
    IMAGEGALLERY BOOLEAN,
1287
        ISDEFAULT BOOLEAN,
1288
    CREATEDBY_ID INTEGER,
1289
    UPDATEDBY_ID INTEGER,
1290
    SPECIMEN_ID INTEGER,
1291
    TAXON_ID INTEGER,
1292
    TAXONNAME_ID INTEGER
1293
);
1294
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_AUD;
1295
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION(
1296
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1297
    ANNOTATIONS_ID INTEGER NOT NULL
1298
);
1299
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION;
1300
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD(
1301
    REV INTEGER NOT NULL,
1302
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1303
    ANNOTATIONS_ID INTEGER NOT NULL,
1304
    REVTYPE TINYINT
1305
);
1306
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD;
1307
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT(
1308
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1309
    CREDITS_ID INTEGER NOT NULL,
1310
    SORTINDEX INTEGER NOT NULL
1311
);
1312
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT;
1313
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT_AUD(
1314
    REV INTEGER NOT NULL,
1315
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1316
    CREDITS_ID INTEGER NOT NULL,
1317
    SORTINDEX INTEGER NOT NULL,
1318
    REVTYPE TINYINT
1319
);
1320
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT_AUD;
1321
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION(
1322
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1323
    EXTENSIONS_ID INTEGER NOT NULL
1324
);
1325
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION;
1326
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD(
1327
    REV INTEGER NOT NULL,
1328
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
1329
    EXTENSIONS_ID INTEGER NOT NULL,
1330
    REVTYPE TINYINT
1331
);
1332
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD;
1333

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
3339

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

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

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

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

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

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

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

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

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

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

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

    
3976
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
3977
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3978
    IDENTIFIERS_ID INTEGER NOT NULL,
3979
    SORTINDEX INTEGER NOT NULL
3980
);
3981
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
3982
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
3983
    REV INTEGER NOT NULL,
3984
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
3985
    IDENTIFIERS_ID INTEGER NOT NULL,
3986
    SORTINDEX INTEGER NOT NULL,
3987
    REVTYPE TINYINT
3988
);
3989
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;
3990

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

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