Project

General

Profile

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
2502
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
2503
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2504
    ANNOTATIONS_ID INTEGER NOT NULL,
2505
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
2506
);
2507

    
2508
CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
2509
    REV INTEGER NOT NULL,
2510
    REVTYPE TINYINT,
2511
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2512
    ANNOTATIONS_ID INTEGER NOT NULL,
2513
);
2514

    
2515
CREATE TABLE MATERIALORMETHODEVENT_MARKER (
2516
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2517
    MARKERS_ID INTEGER NOT NULL,
2518
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
2519
);
2520

    
2521
CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
2522
    REV INTEGER NOT NULL,
2523
    REVTYPE TINYINT,
2524
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
2525
    MARKERS_ID INTEGER NOT NULL,
2526
);
2527

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

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

    
3312
CREATE TABLE PRIMER_ANNOTATION (
3313
    PRIMER_ID INTEGER NOT NULL,
3314
    ANNOTATIONS_ID INTEGER NOT NULL,
3315
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
3316
);
3317
CREATE TABLE PRIMER_ANNOTATION_AUD (
3318
    PRIMER_ID INTEGER NOT NULL,
3319
    ANNOTATIONS_ID INTEGER NOT NULL
3320
);
3321

    
3322
CREATE TABLE PRIMER_MARKER (
3323
    PRIMER_ID INTEGER NOT NULL,
3324
    MARKERS_ID INTEGER NOT NULL,
3325
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
3326
);
3327
CREATE TABLE PRIMER_MARKER_AUD (
3328
    PRIMER_ID INTEGER NOT NULL,
3329
    MARKERS_ID INTEGER NOT NULL
3330
);
3331

    
3332

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

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

    
3690
CREATE TABLE SEQUENCE_ANNOTATION (
3691
    SEQUENCE_ID INTEGER NOT NULL,
3692
    ANNOTATIONS_ID INTEGER NOT NULL,
3693
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
3694
);
3695
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
3696
    REV INTEGER NOT NULL,
3697
    REVTYPE TINYINT,
3698
    SEQUENCE_ID INTEGER NOT NULL,
3699
    ANNOTATIONS_ID INTEGER NOT NULL
3700
);
3701

    
3702
CREATE TABLE SEQUENCE_MARKER (
3703
    SEQUENCE_ID INTEGER NOT NULL,
3704
    MARKERS_ID INTEGER NOT NULL,
3705
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
3706
);
3707
CREATE TABLE SEQUENCE_MARKER_AUD (
3708
    REV INTEGER NOT NULL,
3709
    REVTYPE TINYINT,
3710
    SEQUENCE_ID INTEGER NOT NULL,
3711
    MARKERS_ID INTEGER NOT NULL
3712
);
3713
CREATE TABLE SEQUENCE_REFERENCE (
3714
    SEQUENCE_ID INTEGER NOT NULL,
3715
    CITATIONS_ID INTEGER NOT NULL,
3716
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
3717
);
3718
CREATE TABLE SEQUENCE_REFERENCE_AUD (
3719
    REV INTEGER NOT NULL,
3720
    REVTYPE TINYINT,
3721
    SEQUENCE_ID INTEGER NOT NULL,
3722
    CITATIONS_ID INTEGER NOT NULL
3723
);
3724

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

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

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

    
3806
CREATE TABLE SINGLEREAD_ANNOTATION (
3807
    SINGLEREAD_ID INTEGER NOT NULL,
3808
    ANNOTATIONS_ID INTEGER NOT NULL,
3809
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
3810
);
3811
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
3812
    REV INTEGER NOT NULL,
3813
    REVTYPE TINYINT,
3814
    SINGLEREAD_ID INTEGER NOT NULL,
3815
    ANNOTATIONS_ID INTEGER NOT NULL
3816
);
3817

    
3818
CREATE TABLE SINGLEREAD_MARKER (
3819
    SINGLEREAD_ID INTEGER NOT NULL,
3820
    MARKERS_ID INTEGER NOT NULL,
3821
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
3822
);
3823

    
3824
CREATE TABLE SINGLEREAD_MARKER_AUD (
3825
    REV INTEGER NOT NULL,
3826
    REVTYPE TINYINT,
3827
    SINGLEREAD_ID INTEGER NOT NULL,
3828
    MARKERS_ID INTEGER NOT NULL
3829
);
3830

    
3831

    
3832
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
3833
    DTYPE VARCHAR(31) NOT NULL,
3834
    ID INTEGER NOT NULL,
3835
    CREATED TIMESTAMP,
3836
    UUID VARCHAR(36),
3837
    UPDATED TIMESTAMP,
3838
    RECORDBASIS  VARCHAR(4) NOT NULL,
3839
    LSID_AUTHORITY VARCHAR(255),
3840
    LSID_LSID VARCHAR(255),
3841
    LSID_NAMESPACE VARCHAR(255),
3842
    LSID_OBJECT VARCHAR(255),
3843
    LSID_REVISION VARCHAR(255),
3844
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
3845
    TITLECACHE VARCHAR(255),
3846
    PUBLISH BOOLEAN,
3847
    INDIVIDUALCOUNT INTEGER,
3848
	PREFERREDSTABLEURI CLOB,
3849
    ACCESSIONNUMBER VARCHAR(255),
3850
    BARCODE VARCHAR(255),
3851
    CATALOGNUMBER VARCHAR(255),
3852
    COLLECTORSNUMBER VARCHAR(255),
3853
    EXSICCATUM VARCHAR(255),
3854
    ORIGINALLABELINFO CLOB,
3855
    FIELDNOTES VARCHAR(255),
3856
    FIELDNUMBER VARCHAR(255),
3857
    CREATEDBY_ID INTEGER,
3858
    UPDATEDBY_ID INTEGER,
3859
    LIFESTAGE_ID INTEGER,
3860
    SEX_ID INTEGER,
3861
    KINDOFUNIT_ID INTEGER,
3862
    COLLECTION_ID INTEGER,
3863
    DERIVEDFROM_ID INTEGER,
3864
    STOREDUNDER_ID INTEGER,
3865
    PRESERVATION_ID INTEGER,
3866
    GATHERINGEVENT_ID INTEGER,
3867
    PRIMARYCOLLECTOR_ID INTEGER,
3868
    MEDIASPECIMEN_ID INTEGER,
3869
    DNAQUALITY_ID INTEGER
3870
);
3871
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
3872
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
3873
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
3874