Project

General

Profile

« Previous | Next » 

Revision 6eaa7820

Added by Andreas Müller almost 2 years ago

ref #10094 preliminary disable 001-cdm.h2.sql (maybe a java11 issue in jenkins)

View differences:

cdmlib-test/pom.xml
26 26
                  <id>generate-ddl-create</id>
27 27
                  <phase>process-classes</phase>
28 28
                  <goals>
29
                      
29 30
                      <goal>run</goal>
30 31
                  </goals>
31 32
                  <configuration>
32 33
                      <target>
34
                          <skip>true</skip>
33 35
                          <delete file="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
34 36
                          <!-- copy template file -->
35 37
                          <copy file="${basedir}/src/main/resources/dbscripts/001-cdm.h2.template.sql" tofile="${project.build.outputDirectory}/dbscripts/001-cdm.h2.sql" />
cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql
1
/* 
2
 * DDL file to generate the database schema for the H2 test database 
3
 */
4

  
5
-- These settings where taken from the original 001-cdm.h2.sql file:
6

  
7
SET CLUSTER '';
8
SET DEFAULT_TABLE_TYPE 0;
9
SET WRITE_DELAY 500;
10
SET DEFAULT_LOCK_TIMEOUT 2000;
11
SET CACHE_SIZE 16384;
12

  
13
CREATE USER IF NOT EXISTS EDIT PASSWORD '' ADMIN;
14
CREATE SEQUENCE PUBLIC.SYSTEM_SEQUENCE_10A55F0A_EE57_42DB_8046_6240A60AD0EC START WITH 4 BELONGS_TO_TABLE;
15

  
16
-- DDL generated by class DdlCreator using maven antrun plugin: 
17
-- ===========================================================
18

  
19
    create table PUBLIC.ADDRESS (
20
       ID integer not null,
21
        CREATED timestamp,
22
        UUID varchar(36),
23
        UPDATED timestamp,
24
        LOCALITY varchar(255),
25
        LOCATION_ERRORRADIUS integer,
26
        LOCATION_LATITUDE double,
27
        LOCATION_LONGITUDE double,
28
        POBOX varchar(255),
29
        POSTCODE varchar(255),
30
        REGION varchar(255),
31
        STREET varchar(255),
32
        CREATEDBY_ID integer,
33
        UPDATEDBY_ID integer,
34
        COUNTRY_ID integer,
35
        LOCATION_REFERENCESYSTEM_ID integer,
36
        primary key (ID)
37
    );
38

  
39
    create table PUBLIC.ADDRESS_AUD (
40
       ID integer not null,
41
        REV integer not null,
42
        REVTYPE tinyint,
43
        CREATED timestamp,
44
        UUID varchar(36),
45
        UPDATED timestamp,
46
        LOCALITY varchar(255),
47
        LOCATION_ERRORRADIUS integer,
48
        LOCATION_LATITUDE double,
49
        LOCATION_LONGITUDE double,
50
        POBOX varchar(255),
51
        POSTCODE varchar(255),
52
        REGION varchar(255),
53
        STREET varchar(255),
54
        CREATEDBY_ID integer,
55
        UPDATEDBY_ID integer,
56
        COUNTRY_ID integer,
57
        LOCATION_REFERENCESYSTEM_ID integer,
58
        primary key (ID, REV)
59
    );
60

  
61
    create table PUBLIC.AGENTBASE (
62
       DTYPE varchar(31) not null,
63
        ID integer not null,
64
        CREATED timestamp,
65
        UUID varchar(36),
66
        UPDATED timestamp,
67
        LSID_AUTHORITY varchar(255),
68
        LSID_LSID varchar(255),
69
        LSID_NAMESPACE varchar(255),
70
        LSID_OBJECT varchar(255),
71
        LSID_REVISION varchar(255),
72
        PROTECTEDTITLECACHE boolean not null,
73
        TITLECACHE varchar(800),
74
        CODE varchar(255),
75
        NAME varchar(255),
76
        COLLECTORTITLECACHE varchar(800),
77
        NOMENCLATURALTITLECACHE varchar(800),
78
        COLLECTORTITLE varchar(255),
79
        FAMILYNAME varchar(255),
80
        GIVENNAME varchar(255),
81
        INITIALS varchar(80),
82
        LIFESPAN_END varchar(255),
83
        LIFESPAN_FREETEXT varchar(255),
84
        LIFESPAN_START varchar(255),
85
        NOMENCLATURALTITLE varchar(255),
86
        ORCID varchar(16),
87
        PREFIX varchar(255),
88
        SUFFIX varchar(255),
89
        HASMOREMEMBERS boolean,
90
        PROTECTEDCOLLECTORTITLECACHE boolean,
91
        PROTECTEDNOMENCLATURALTITLECACHE boolean,
92
        CREATEDBY_ID integer,
93
        UPDATEDBY_ID integer,
94
        ISPARTOF_ID integer,
95
        primary key (ID)
96
    );
97

  
98
    create table PUBLIC.AGENTBASE_ADDRESS (
99
       AGENTBASE_ID integer not null,
100
        CONTACT_ADDRESSES_ID integer not null,
101
        primary key (AGENTBASE_ID, CONTACT_ADDRESSES_ID)
102
    );
103

  
104
    create table PUBLIC.AGENTBASE_ADDRESS_AUD (
105
       REV integer not null,
106
        AGENTBASE_ID integer not null,
107
        CONTACT_ADDRESSES_ID integer not null,
108
        REVTYPE tinyint,
109
        primary key (REV, AGENTBASE_ID, CONTACT_ADDRESSES_ID)
110
    );
111

  
112
    create table PUBLIC.AGENTBASE_AGENTBASE (
113
       TEAM_ID integer not null,
114
        TEAMMEMBERS_ID integer not null,
115
        SORTINDEX integer not null,
116
        primary key (TEAM_ID, SORTINDEX)
117
    );
118

  
119
    create table PUBLIC.AGENTBASE_AGENTBASE_AUD (
120
       REV integer not null,
121
        TEAM_ID integer not null,
122
        TEAMMEMBERS_ID integer not null,
123
        SORTINDEX integer not null,
124
        REVTYPE tinyint,
125
        primary key (REV, TEAM_ID, TEAMMEMBERS_ID, SORTINDEX)
126
    );
127

  
128
    create table PUBLIC.AGENTBASE_ANNOTATION (
129
       AGENTBASE_ID integer not null,
130
        ANNOTATIONS_ID integer not null,
131
        primary key (AGENTBASE_ID, ANNOTATIONS_ID)
132
    );
133

  
134
    create table PUBLIC.AGENTBASE_ANNOTATION_AUD (
135
       REV integer not null,
136
        AGENTBASE_ID integer not null,
137
        ANNOTATIONS_ID integer not null,
138
        REVTYPE tinyint,
139
        primary key (REV, AGENTBASE_ID, ANNOTATIONS_ID)
140
    );
141

  
142
    create table PUBLIC.AGENTBASE_AUD (
143
       ID integer not null,
144
        REV integer not null,
145
        DTYPE varchar(31) not null,
146
        REVTYPE tinyint,
147
        CREATED timestamp,
148
        UUID varchar(36),
149
        UPDATED timestamp,
150
        LSID_AUTHORITY varchar(255),
151
        LSID_LSID varchar(255),
152
        LSID_NAMESPACE varchar(255),
153
        LSID_OBJECT varchar(255),
154
        LSID_REVISION varchar(255),
155
        PROTECTEDTITLECACHE boolean,
156
        TITLECACHE varchar(800),
157
        CREATEDBY_ID integer,
158
        UPDATEDBY_ID integer,
159
        CODE varchar(255),
160
        NAME varchar(255),
161
        ISPARTOF_ID integer,
162
        COLLECTORTITLECACHE varchar(800),
163
        NOMENCLATURALTITLECACHE varchar(800),
164
        HASMOREMEMBERS boolean,
165
        PROTECTEDCOLLECTORTITLECACHE boolean,
166
        PROTECTEDNOMENCLATURALTITLECACHE boolean,
167
        COLLECTORTITLE varchar(255),
168
        FAMILYNAME varchar(255),
169
        GIVENNAME varchar(255),
170
        INITIALS varchar(80),
171
        LIFESPAN_END varchar(255),
172
        LIFESPAN_FREETEXT varchar(255),
173
        LIFESPAN_START varchar(255),
174
        NOMENCLATURALTITLE varchar(255),
175
        ORCID varchar(16),
176
        PREFIX varchar(255),
177
        SUFFIX varchar(255),
178
        primary key (ID, REV)
179
    );
180

  
181
    create table PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES (
182
       AGENTBASE_ID integer not null,
183
        CONTACT_EMAILADDRESSES_ELEMENT varchar(255)
184
    );
185

  
186
    create table PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD (
187
       REV integer not null,
188
        AGENTBASE_ID integer not null,
189
        CONTACT_EMAILADDRESSES_ELEMENT varchar(255) not null,
190
        REVTYPE tinyint,
191
        primary key (REV, AGENTBASE_ID, CONTACT_EMAILADDRESSES_ELEMENT)
192
    );
193

  
194
    create table PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS (
195
       AGENTBASE_ID integer not null,
196
        CONTACT_FAXNUMBERS_ELEMENT varchar(255)
197
    );
198

  
199
    create table PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD (
200
       REV integer not null,
201
        AGENTBASE_ID integer not null,
202
        CONTACT_FAXNUMBERS_ELEMENT varchar(255) not null,
203
        REVTYPE tinyint,
204
        primary key (REV, AGENTBASE_ID, CONTACT_FAXNUMBERS_ELEMENT)
205
    );
206

  
207
    create table PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS (
208
       AGENTBASE_ID integer not null,
209
        CONTACT_PHONENUMBERS_ELEMENT varchar(255)
210
    );
211

  
212
    create table PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD (
213
       REV integer not null,
214
        AGENTBASE_ID integer not null,
215
        CONTACT_PHONENUMBERS_ELEMENT varchar(255) not null,
216
        REVTYPE tinyint,
217
        primary key (REV, AGENTBASE_ID, CONTACT_PHONENUMBERS_ELEMENT)
218
    );
219

  
220
    create table PUBLIC.AGENTBASE_CONTACT_URLS (
221
       AGENTBASE_ID integer not null,
222
        CONTACT_URLS_ELEMENT varchar(255)
223
    );
224

  
225
    create table PUBLIC.AGENTBASE_CONTACT_URLS_AUD (
226
       REV integer not null,
227
        AGENTBASE_ID integer not null,
228
        CONTACT_URLS_ELEMENT varchar(255) not null,
229
        REVTYPE tinyint,
230
        primary key (REV, AGENTBASE_ID, CONTACT_URLS_ELEMENT)
231
    );
232

  
233
    create table PUBLIC.AGENTBASE_CREDIT (
234
       AGENTBASE_ID integer not null,
235
        CREDITS_ID integer not null,
236
        SORTINDEX integer not null,
237
        primary key (AGENTBASE_ID, SORTINDEX)
238
    );
239

  
240
    create table PUBLIC.AGENTBASE_CREDIT_AUD (
241
       REV integer not null,
242
        AGENTBASE_ID integer not null,
243
        CREDITS_ID integer not null,
244
        SORTINDEX integer not null,
245
        REVTYPE tinyint,
246
        primary key (REV, AGENTBASE_ID, CREDITS_ID, SORTINDEX)
247
    );
248

  
249
    create table PUBLIC.AGENTBASE_DEFINEDTERMBASE (
250
       INSTITUTION_ID integer not null,
251
        TYPES_ID integer not null,
252
        primary key (INSTITUTION_ID, TYPES_ID)
253
    );
254

  
255
    create table PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD (
256
       REV integer not null,
257
        INSTITUTION_ID integer not null,
258
        TYPES_ID integer not null,
259
        REVTYPE tinyint,
260
        primary key (REV, INSTITUTION_ID, TYPES_ID)
261
    );
262

  
263
    create table PUBLIC.AGENTBASE_EXTENSION (
264
       AGENTBASE_ID integer not null,
265
        EXTENSIONS_ID integer not null,
266
        primary key (AGENTBASE_ID, EXTENSIONS_ID)
267
    );
268

  
269
    create table PUBLIC.AGENTBASE_EXTENSION_AUD (
270
       REV integer not null,
271
        AGENTBASE_ID integer not null,
272
        EXTENSIONS_ID integer not null,
273
        REVTYPE tinyint,
274
        primary key (REV, AGENTBASE_ID, EXTENSIONS_ID)
275
    );
276

  
277
    create table PUBLIC.AGENTBASE_EXTERNALLINK (
278
       AGENTBASE_ID integer not null,
279
        LINKS_ID integer not null,
280
        primary key (AGENTBASE_ID, LINKS_ID)
281
    );
282

  
283
    create table PUBLIC.AGENTBASE_EXTERNALLINK_AUD (
284
       REV integer not null,
285
        AGENTBASE_ID integer not null,
286
        LINKS_ID integer not null,
287
        REVTYPE tinyint,
288
        primary key (REV, AGENTBASE_ID, LINKS_ID)
289
    );
290

  
291
    create table PUBLIC.AGENTBASE_IDENTIFIER (
292
       AGENTBASE_ID integer not null,
293
        IDENTIFIERS_ID integer not null,
294
        SORTINDEX integer not null,
295
        primary key (AGENTBASE_ID, SORTINDEX)
296
    );
297

  
298
    create table PUBLIC.AGENTBASE_IDENTIFIER_AUD (
299
       REV integer not null,
300
        AGENTBASE_ID integer not null,
301
        IDENTIFIERS_ID integer not null,
302
        SORTINDEX integer not null,
303
        REVTYPE tinyint,
304
        primary key (REV, AGENTBASE_ID, IDENTIFIERS_ID, SORTINDEX)
305
    );
306

  
307
    create table PUBLIC.AGENTBASE_MARKER (
308
       AGENTBASE_ID integer not null,
309
        MARKERS_ID integer not null,
310
        primary key (AGENTBASE_ID, MARKERS_ID)
311
    );
312

  
313
    create table PUBLIC.AGENTBASE_MARKER_AUD (
314
       REV integer not null,
315
        AGENTBASE_ID integer not null,
316
        MARKERS_ID integer not null,
317
        REVTYPE tinyint,
318
        primary key (REV, AGENTBASE_ID, MARKERS_ID)
319
    );
320

  
321
    create table PUBLIC.AGENTBASE_MEDIA (
322
       AGENTBASE_ID integer not null,
323
        MEDIA_ID integer not null,
324
        primary key (AGENTBASE_ID, MEDIA_ID)
325
    );
326

  
327
    create table PUBLIC.AGENTBASE_MEDIA_AUD (
328
       REV integer not null,
329
        AGENTBASE_ID integer not null,
330
        MEDIA_ID integer not null,
331
        REVTYPE tinyint,
332
        primary key (REV, AGENTBASE_ID, MEDIA_ID)
333
    );
334

  
335
    create table PUBLIC.AGENTBASE_ORIGINALSOURCEBASE (
336
       AGENTBASE_ID integer not null,
337
        SOURCES_ID integer not null,
338
        primary key (AGENTBASE_ID, SOURCES_ID)
339
    );
340

  
341
    create table PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD (
342
       REV integer not null,
343
        AGENTBASE_ID integer not null,
344
        SOURCES_ID integer not null,
345
        REVTYPE tinyint,
346
        primary key (REV, AGENTBASE_ID, SOURCES_ID)
347
    );
348

  
349
    create table PUBLIC.AGENTBASE_RIGHTSINFO (
350
       AGENTBASE_ID integer not null,
351
        RIGHTS_ID integer not null,
352
        primary key (AGENTBASE_ID, RIGHTS_ID)
353
    );
354

  
355
    create table PUBLIC.AGENTBASE_RIGHTSINFO_AUD (
356
       REV integer not null,
357
        AGENTBASE_ID integer not null,
358
        RIGHTS_ID integer not null,
359
        REVTYPE tinyint,
360
        primary key (REV, AGENTBASE_ID, RIGHTS_ID)
361
    );
362

  
363
    create table PUBLIC.AMPLIFICATION (
364
       ID integer not null,
365
        CREATED timestamp,
366
        UUID varchar(36),
367
        UPDATED timestamp,
368
        DESCRIPTION varchar(255),
369
        TIMEPERIOD_END varchar(255),
370
        TIMEPERIOD_FREETEXT varchar(255),
371
        TIMEPERIOD_START varchar(255),
372
        ELECTROPHORESISVOLTAGE double,
373
        GELCONCENTRATION double,
374
        GELRUNNINGTIME double,
375
        LABELCACHE varchar(255),
376
        LADDERUSED varchar(255),
377
        CREATEDBY_ID integer,
378
        UPDATEDBY_ID integer,
379
        ACTOR_ID integer,
380
        DNAMARKER_ID integer,
381
        FORWARDPRIMER_ID integer,
382
        INSTITUTION_ID integer,
383
        PURIFICATION_ID integer,
384
        REVERSEPRIMER_ID integer,
385
        primary key (ID)
386
    );
387

  
388
    create table PUBLIC.AMPLIFICATION_ANNOTATION (
389
       AMPLIFICATION_ID integer not null,
390
        ANNOTATIONS_ID integer not null,
391
        primary key (AMPLIFICATION_ID, ANNOTATIONS_ID)
392
    );
393

  
394
    create table PUBLIC.AMPLIFICATION_ANNOTATION_AUD (
395
       REV integer not null,
396
        AMPLIFICATION_ID integer not null,
397
        ANNOTATIONS_ID integer not null,
398
        REVTYPE tinyint,
399
        primary key (REV, AMPLIFICATION_ID, ANNOTATIONS_ID)
400
    );
401

  
402
    create table PUBLIC.AMPLIFICATION_AUD (
403
       ID integer not null,
404
        REV integer not null,
405
        REVTYPE tinyint,
406
        CREATED timestamp,
407
        UUID varchar(36),
408
        UPDATED timestamp,
409
        DESCRIPTION varchar(255),
410
        TIMEPERIOD_END varchar(255),
411
        TIMEPERIOD_FREETEXT varchar(255),
412
        TIMEPERIOD_START varchar(255),
413
        ELECTROPHORESISVOLTAGE double,
414
        GELCONCENTRATION double,
415
        GELRUNNINGTIME double,
416
        LABELCACHE varchar(255),
417
        LADDERUSED varchar(255),
418
        CREATEDBY_ID integer,
419
        UPDATEDBY_ID integer,
420
        ACTOR_ID integer,
421
        DNAMARKER_ID integer,
422
        FORWARDPRIMER_ID integer,
423
        INSTITUTION_ID integer,
424
        PURIFICATION_ID integer,
425
        REVERSEPRIMER_ID integer,
426
        primary key (ID, REV)
427
    );
428

  
429
    create table PUBLIC.AMPLIFICATION_MARKER (
430
       AMPLIFICATION_ID integer not null,
431
        MARKERS_ID integer not null,
432
        primary key (AMPLIFICATION_ID, MARKERS_ID)
433
    );
434

  
435
    create table PUBLIC.AMPLIFICATION_MARKER_AUD (
436
       REV integer not null,
437
        AMPLIFICATION_ID integer not null,
438
        MARKERS_ID integer not null,
439
        REVTYPE tinyint,
440
        primary key (REV, AMPLIFICATION_ID, MARKERS_ID)
441
    );
442

  
443
    create table PUBLIC.AMPLIFICATIONRESULT (
444
       ID integer not null,
445
        CREATED timestamp,
446
        UUID varchar(36),
447
        UPDATED timestamp,
448
        SUCCESSTEXT varchar(255),
449
        SUCCESSFUL boolean,
450
        CREATEDBY_ID integer,
451
        UPDATEDBY_ID integer,
452
        AMPLIFICATION_ID integer,
453
        CLONING_ID integer,
454
        DNASAMPLE_ID integer,
455
        GELPHOTO_ID integer,
456
        primary key (ID)
457
    );
458

  
459
    create table PUBLIC.AMPLIFICATIONRESULT_ANNOTATION (
460
       AMPLIFICATIONRESULT_ID integer not null,
461
        ANNOTATIONS_ID integer not null,
462
        primary key (AMPLIFICATIONRESULT_ID, ANNOTATIONS_ID)
463
    );
464

  
465
    create table PUBLIC.AMPLIFICATIONRESULT_ANNOTATION_AUD (
466
       REV integer not null,
467
        AMPLIFICATIONRESULT_ID integer not null,
468
        ANNOTATIONS_ID integer not null,
469
        REVTYPE tinyint,
470
        primary key (REV, AMPLIFICATIONRESULT_ID, ANNOTATIONS_ID)
471
    );
472

  
473
    create table PUBLIC.AMPLIFICATIONRESULT_AUD (
474
       ID integer not null,
475
        REV integer not null,
476
        REVTYPE tinyint,
477
        CREATED timestamp,
478
        UUID varchar(36),
479
        UPDATED timestamp,
480
        SUCCESSTEXT varchar(255),
481
        SUCCESSFUL boolean,
482
        CREATEDBY_ID integer,
483
        UPDATEDBY_ID integer,
484
        AMPLIFICATION_ID integer,
485
        CLONING_ID integer,
486
        DNASAMPLE_ID integer,
487
        GELPHOTO_ID integer,
488
        primary key (ID, REV)
489
    );
490

  
491
    create table PUBLIC.AMPLIFICATIONRESULT_MARKER (
492
       AMPLIFICATIONRESULT_ID integer not null,
493
        MARKERS_ID integer not null,
494
        primary key (AMPLIFICATIONRESULT_ID, MARKERS_ID)
495
    );
496

  
497
    create table PUBLIC.AMPLIFICATIONRESULT_MARKER_AUD (
498
       REV integer not null,
499
        AMPLIFICATIONRESULT_ID integer not null,
500
        MARKERS_ID integer not null,
501
        REVTYPE tinyint,
502
        primary key (REV, AMPLIFICATIONRESULT_ID, MARKERS_ID)
503
    );
504

  
505
    create table PUBLIC.ANNOTATION (
506
       ID integer not null,
507
        CREATED timestamp,
508
        UUID varchar(36),
509
        UPDATED timestamp,
510
        TEXT clob,
511
        LINKBACKURI clob,
512
        CREATEDBY_ID integer,
513
        UPDATEDBY_ID integer,
514
        LANGUAGE_ID integer,
515
        ANNOTATIONTYPE_ID integer,
516
        COMMENTATOR_ID integer,
517
        primary key (ID)
518
    );
519

  
520
    create table PUBLIC.ANNOTATION_ANNOTATION (
521
       ANNOTATION_ID integer not null,
522
        ANNOTATIONS_ID integer not null,
523
        primary key (ANNOTATION_ID, ANNOTATIONS_ID)
524
    );
525

  
526
    create table PUBLIC.ANNOTATION_ANNOTATION_AUD (
527
       REV integer not null,
528
        ANNOTATION_ID integer not null,
529
        ANNOTATIONS_ID integer not null,
530
        REVTYPE tinyint,
531
        primary key (REV, ANNOTATION_ID, ANNOTATIONS_ID)
532
    );
533

  
534
    create table PUBLIC.ANNOTATION_AUD (
535
       ID integer not null,
536
        REV integer not null,
537
        REVTYPE tinyint,
538
        CREATED timestamp,
539
        UUID varchar(36),
540
        UPDATED timestamp,
541
        TEXT clob,
542
        LINKBACKURI clob,
543
        CREATEDBY_ID integer,
544
        UPDATEDBY_ID integer,
545
        LANGUAGE_ID integer,
546
        ANNOTATIONTYPE_ID integer,
547
        COMMENTATOR_ID integer,
548
        primary key (ID, REV)
549
    );
550

  
551
    create table PUBLIC.ANNOTATION_MARKER (
552
       ANNOTATION_ID integer not null,
553
        MARKERS_ID integer not null,
554
        primary key (ANNOTATION_ID, MARKERS_ID)
555
    );
556

  
557
    create table PUBLIC.ANNOTATION_MARKER_AUD (
558
       REV integer not null,
559
        ANNOTATION_ID integer not null,
560
        MARKERS_ID integer not null,
561
        REVTYPE tinyint,
562
        primary key (REV, ANNOTATION_ID, MARKERS_ID)
563
    );
564

  
565
    create table PUBLIC.AUDITEVENT (
566
       REVISIONNUMBER integer not null,
567
        DATE timestamp,
568
        TIMESTAMP bigint,
569
        UUID varchar(255),
570
        primary key (REVISIONNUMBER)
571
    );
572

  
573
    create table PUBLIC.AUTHORITY (
574
       DTYPE varchar(31) not null,
575
        ID integer not null,
576
        CREATED timestamp,
577
        UUID varchar(36),
578
        OPERATIONS varchar(255),
579
        PERMISSIONCLASS varchar(255),
580
        PROPERTY varchar(255),
581
        TARGETUUID varchar(36),
582
        ROLE varchar(255),
583
        CREATEDBY_ID integer,
584
        primary key (ID)
585
    );
586

  
587
    create table PUBLIC.CDMLINK (
588
       DTYPE varchar(31) not null,
589
        ID integer not null,
590
        CREATED timestamp,
591
        UUID varchar(36),
592
        UPDATED timestamp,
593
        ENDPOS integer,
594
        STARTPOS integer,
595
        CREATEDBY_ID integer,
596
        UPDATEDBY_ID integer,
597
        TAXON_ID integer,
598
        AGENT_ID integer,
599
        ANNOTATION_ID integer,
600
        KEY_ID integer,
601
        LANGUAGESTRING_ID integer,
602
        MEDIA_ID integer,
603
        OCCURRENCE_ID integer,
604
        REFERENCE_ID integer,
605
        SOURCE_ID integer,
606
        TAXONNAME_ID integer,
607
        DESCRIPTION_ID integer,
608
        primary key (ID)
609
    );
610

  
611
    create table PUBLIC.CDMLINK_AUD (
612
       ID integer not null,
613
        REV integer not null,
614
        DTYPE varchar(31) not null,
615
        REVTYPE tinyint,
616
        CREATED timestamp,
617
        UUID varchar(36),
618
        UPDATED timestamp,
619
        CREATEDBY_ID integer,
620
        UPDATEDBY_ID integer,
621
        TAXON_ID integer,
622
        ENDPOS integer,
623
        STARTPOS integer,
624
        AGENT_ID integer,
625
        ANNOTATION_ID integer,
626
        KEY_ID integer,
627
        LANGUAGESTRING_ID integer,
628
        MEDIA_ID integer,
629
        OCCURRENCE_ID integer,
630
        REFERENCE_ID integer,
631
        SOURCE_ID integer,
632
        TAXONNAME_ID integer,
633
        DESCRIPTION_ID integer,
634
        primary key (ID, REV)
635
    );
636

  
637
    create table PUBLIC.CDMMETADATA (
638
       ID integer not null,
639
        CREATED timestamp,
640
        UUID varchar(36),
641
        PROPERTYNAME varchar(20),
642
        VALUE varchar(255),
643
        CREATEDBY_ID integer,
644
        primary key (ID)
645
    );
646

  
647
    create table PUBLIC.CDMPREFERENCE (
648
       KEY_PREDICATE varchar(100) not null,
649
        KEY_SUBJECT varchar(100) not null,
650
        ALLOWOVERRIDE boolean not null,
651
        VALUE clob,
652
        primary key (KEY_PREDICATE, KEY_SUBJECT)
653
    );
654

  
655
    create table PUBLIC.CLASSIFICATION (
656
       ID integer not null,
657
        CREATED timestamp,
658
        UUID varchar(36),
659
        UPDATED timestamp,
660
        LSID_AUTHORITY varchar(255),
661
        LSID_LSID varchar(255),
662
        LSID_NAMESPACE varchar(255),
663
        LSID_OBJECT varchar(255),
664
        LSID_REVISION varchar(255),
665
        PROTECTEDTITLECACHE boolean not null,
666
        TITLECACHE varchar(800),
667
        TIMEPERIOD_END varchar(255),
668
        TIMEPERIOD_FREETEXT varchar(255),
669
        TIMEPERIOD_START varchar(255),
670
        CREATEDBY_ID integer,
671
        UPDATEDBY_ID integer,
672
        NAME_ID integer,
673
        ROOTNODE_ID integer,
674
        SOURCE_ID integer,
675
        primary key (ID)
676
    );
677

  
678
    create table PUBLIC.CLASSIFICATION_ANNOTATION (
679
       CLASSIFICATION_ID integer not null,
680
        ANNOTATIONS_ID integer not null,
681
        primary key (CLASSIFICATION_ID, ANNOTATIONS_ID)
682
    );
683

  
684
    create table PUBLIC.CLASSIFICATION_ANNOTATION_AUD (
685
       REV integer not null,
686
        CLASSIFICATION_ID integer not null,
687
        ANNOTATIONS_ID integer not null,
688
        REVTYPE tinyint,
689
        primary key (REV, CLASSIFICATION_ID, ANNOTATIONS_ID)
690
    );
691

  
692
    create table PUBLIC.CLASSIFICATION_AUD (
693
       ID integer not null,
694
        REV integer not null,
695
        REVTYPE tinyint,
696
        CREATED timestamp,
697
        UUID varchar(36),
698
        UPDATED timestamp,
699
        LSID_AUTHORITY varchar(255),
700
        LSID_LSID varchar(255),
701
        LSID_NAMESPACE varchar(255),
702
        LSID_OBJECT varchar(255),
703
        LSID_REVISION varchar(255),
704
        PROTECTEDTITLECACHE boolean,
705
        TITLECACHE varchar(800),
706
        TIMEPERIOD_END varchar(255),
707
        TIMEPERIOD_FREETEXT varchar(255),
708
        TIMEPERIOD_START varchar(255),
709
        CREATEDBY_ID integer,
710
        UPDATEDBY_ID integer,
711
        NAME_ID integer,
712
        ROOTNODE_ID integer,
713
        SOURCE_ID integer,
714
        primary key (ID, REV)
715
    );
716

  
717
    create table PUBLIC.CLASSIFICATION_CREDIT (
718
       CLASSIFICATION_ID integer not null,
719
        CREDITS_ID integer not null,
720
        SORTINDEX integer not null,
721
        primary key (CLASSIFICATION_ID, SORTINDEX)
722
    );
723

  
724
    create table PUBLIC.CLASSIFICATION_CREDIT_AUD (
725
       REV integer not null,
726
        CLASSIFICATION_ID integer not null,
727
        CREDITS_ID integer not null,
728
        SORTINDEX integer not null,
729
        REVTYPE tinyint,
730
        primary key (REV, CLASSIFICATION_ID, CREDITS_ID, SORTINDEX)
731
    );
732

  
733
    create table PUBLIC.CLASSIFICATION_DESCRIPTION (
734
       CLASSIFICATION_ID integer not null,
735
        DESCRIPTION_ID integer not null,
736
        DESCRIPTION_MAPKEY_ID integer not null,
737
        primary key (CLASSIFICATION_ID, DESCRIPTION_MAPKEY_ID)
738
    );
739

  
740
    create table PUBLIC.CLASSIFICATION_DESCRIPTION_AUD (
741
       REV integer not null,
742
        CLASSIFICATION_ID integer not null,
743
        DESCRIPTION_ID integer not null,
744
        DESCRIPTION_MAPKEY_ID integer not null,
745
        REVTYPE tinyint,
746
        primary key (REV, CLASSIFICATION_ID, DESCRIPTION_ID, DESCRIPTION_MAPKEY_ID)
747
    );
748

  
749
    create table PUBLIC.CLASSIFICATION_EXTENSION (
750
       CLASSIFICATION_ID integer not null,
751
        EXTENSIONS_ID integer not null,
752
        primary key (CLASSIFICATION_ID, EXTENSIONS_ID)
753
    );
754

  
755
    create table PUBLIC.CLASSIFICATION_EXTENSION_AUD (
756
       REV integer not null,
757
        CLASSIFICATION_ID integer not null,
758
        EXTENSIONS_ID integer not null,
759
        REVTYPE tinyint,
760
        primary key (REV, CLASSIFICATION_ID, EXTENSIONS_ID)
761
    );
762

  
763
    create table PUBLIC.CLASSIFICATION_EXTERNALLINK (
764
       CLASSIFICATION_ID integer not null,
765
        LINKS_ID integer not null,
766
        primary key (CLASSIFICATION_ID, LINKS_ID)
767
    );
768

  
769
    create table PUBLIC.CLASSIFICATION_EXTERNALLINK_AUD (
770
       REV integer not null,
771
        CLASSIFICATION_ID integer not null,
772
        LINKS_ID integer not null,
773
        REVTYPE tinyint,
774
        primary key (REV, CLASSIFICATION_ID, LINKS_ID)
775
    );
776

  
777
    create table PUBLIC.CLASSIFICATION_GEOSCOPE (
778
       CLASSIFICATION_ID integer not null,
779
        GEOSCOPES_ID integer not null,
780
        primary key (CLASSIFICATION_ID, GEOSCOPES_ID)
781
    );
782

  
783
    create table PUBLIC.CLASSIFICATION_GEOSCOPE_AUD (
784
       REV integer not null,
785
        CLASSIFICATION_ID integer not null,
786
        GEOSCOPES_ID integer not null,
787
        REVTYPE tinyint,
788
        primary key (REV, CLASSIFICATION_ID, GEOSCOPES_ID)
789
    );
790

  
791
    create table PUBLIC.CLASSIFICATION_IDENTIFIER (
792
       CLASSIFICATION_ID integer not null,
793
        IDENTIFIERS_ID integer not null,
794
        SORTINDEX integer not null,
795
        primary key (CLASSIFICATION_ID, SORTINDEX)
796
    );
797

  
798
    create table PUBLIC.CLASSIFICATION_IDENTIFIER_AUD (
799
       REV integer not null,
800
        CLASSIFICATION_ID integer not null,
801
        IDENTIFIERS_ID integer not null,
802
        SORTINDEX integer not null,
803
        REVTYPE tinyint,
804
        primary key (REV, CLASSIFICATION_ID, IDENTIFIERS_ID, SORTINDEX)
805
    );
806

  
807
    create table PUBLIC.CLASSIFICATION_MARKER (
808
       CLASSIFICATION_ID integer not null,
809
        MARKERS_ID integer not null,
810
        primary key (CLASSIFICATION_ID, MARKERS_ID)
811
    );
812

  
813
    create table PUBLIC.CLASSIFICATION_MARKER_AUD (
814
       REV integer not null,
815
        CLASSIFICATION_ID integer not null,
816
        MARKERS_ID integer not null,
817
        REVTYPE tinyint,
818
        primary key (REV, CLASSIFICATION_ID, MARKERS_ID)
819
    );
820

  
821
    create table PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE (
822
       CLASSIFICATION_ID integer not null,
823
        SOURCES_ID integer not null,
824
        primary key (CLASSIFICATION_ID, SOURCES_ID)
825
    );
826

  
827
    create table PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD (
828
       REV integer not null,
829
        CLASSIFICATION_ID integer not null,
830
        SOURCES_ID integer not null,
831
        REVTYPE tinyint,
832
        primary key (REV, CLASSIFICATION_ID, SOURCES_ID)
833
    );
834

  
835
    create table PUBLIC.CLASSIFICATION_RIGHTSINFO (
836
       CLASSIFICATION_ID integer not null,
837
        RIGHTS_ID integer not null,
838
        primary key (CLASSIFICATION_ID, RIGHTS_ID)
839
    );
840

  
841
    create table PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD (
842
       REV integer not null,
843
        CLASSIFICATION_ID integer not null,
844
        RIGHTS_ID integer not null,
845
        REVTYPE tinyint,
846
        primary key (REV, CLASSIFICATION_ID, RIGHTS_ID)
847
    );
848

  
849
    create table PUBLIC.COLLECTION (
850
       ID integer not null,
851
        CREATED timestamp,
852
        UUID varchar(36),
853
        UPDATED timestamp,
854
        LSID_AUTHORITY varchar(255),
855
        LSID_LSID varchar(255),
856
        LSID_NAMESPACE varchar(255),
857
        LSID_OBJECT varchar(255),
858
        LSID_REVISION varchar(255),
859
        PROTECTEDTITLECACHE boolean not null,
860
        TITLECACHE varchar(800),
861
        CODE varchar(255),
862
        CODESTANDARD varchar(255),
863
        NAME varchar(255),
864
        TOWNORLOCATION varchar(255),
865
        CREATEDBY_ID integer,
866
        UPDATEDBY_ID integer,
867
        INSTITUTE_ID integer,
868
        SUPERCOLLECTION_ID integer,
869
        primary key (ID)
870
    );
871

  
872
    create table PUBLIC.COLLECTION_ANNOTATION (
873
       COLLECTION_ID integer not null,
874
        ANNOTATIONS_ID integer not null,
875
        primary key (COLLECTION_ID, ANNOTATIONS_ID)
876
    );
877

  
878
    create table PUBLIC.COLLECTION_ANNOTATION_AUD (
879
       REV integer not null,
880
        COLLECTION_ID integer not null,
881
        ANNOTATIONS_ID integer not null,
882
        REVTYPE tinyint,
883
        primary key (REV, COLLECTION_ID, ANNOTATIONS_ID)
884
    );
885

  
886
    create table PUBLIC.COLLECTION_AUD (
887
       ID integer not null,
888
        REV integer not null,
889
        REVTYPE tinyint,
890
        CREATED timestamp,
891
        UUID varchar(36),
892
        UPDATED timestamp,
893
        LSID_AUTHORITY varchar(255),
894
        LSID_LSID varchar(255),
895
        LSID_NAMESPACE varchar(255),
896
        LSID_OBJECT varchar(255),
897
        LSID_REVISION varchar(255),
898
        PROTECTEDTITLECACHE boolean,
899
        TITLECACHE varchar(800),
900
        CODE varchar(255),
901
        CODESTANDARD varchar(255),
902
        NAME varchar(255),
903
        TOWNORLOCATION varchar(255),
904
        CREATEDBY_ID integer,
905
        UPDATEDBY_ID integer,
906
        INSTITUTE_ID integer,
907
        SUPERCOLLECTION_ID integer,
908
        primary key (ID, REV)
909
    );
910

  
911
    create table PUBLIC.COLLECTION_CREDIT (
912
       COLLECTION_ID integer not null,
913
        CREDITS_ID integer not null,
914
        SORTINDEX integer not null,
915
        primary key (COLLECTION_ID, SORTINDEX)
916
    );
917

  
918
    create table PUBLIC.COLLECTION_CREDIT_AUD (
919
       REV integer not null,
920
        COLLECTION_ID integer not null,
921
        CREDITS_ID integer not null,
922
        SORTINDEX integer not null,
923
        REVTYPE tinyint,
924
        primary key (REV, COLLECTION_ID, CREDITS_ID, SORTINDEX)
925
    );
926

  
927
    create table PUBLIC.COLLECTION_EXTENSION (
928
       COLLECTION_ID integer not null,
929
        EXTENSIONS_ID integer not null,
930
        primary key (COLLECTION_ID, EXTENSIONS_ID)
931
    );
932

  
933
    create table PUBLIC.COLLECTION_EXTENSION_AUD (
934
       REV integer not null,
935
        COLLECTION_ID integer not null,
936
        EXTENSIONS_ID integer not null,
937
        REVTYPE tinyint,
938
        primary key (REV, COLLECTION_ID, EXTENSIONS_ID)
939
    );
940

  
941
    create table PUBLIC.COLLECTION_EXTERNALLINK (
942
       COLLECTION_ID integer not null,
943
        LINKS_ID integer not null,
944
        primary key (COLLECTION_ID, LINKS_ID)
945
    );
946

  
947
    create table PUBLIC.COLLECTION_EXTERNALLINK_AUD (
948
       REV integer not null,
949
        COLLECTION_ID integer not null,
950
        LINKS_ID integer not null,
951
        REVTYPE tinyint,
952
        primary key (REV, COLLECTION_ID, LINKS_ID)
953
    );
954

  
955
    create table PUBLIC.COLLECTION_IDENTIFIER (
956
       COLLECTION_ID integer not null,
957
        IDENTIFIERS_ID integer not null,
958
        SORTINDEX integer not null,
959
        primary key (COLLECTION_ID, SORTINDEX)
960
    );
961

  
962
    create table PUBLIC.COLLECTION_IDENTIFIER_AUD (
963
       REV integer not null,
964
        COLLECTION_ID integer not null,
965
        IDENTIFIERS_ID integer not null,
966
        SORTINDEX integer not null,
967
        REVTYPE tinyint,
968
        primary key (REV, COLLECTION_ID, IDENTIFIERS_ID, SORTINDEX)
969
    );
970

  
971
    create table PUBLIC.COLLECTION_MARKER (
972
       COLLECTION_ID integer not null,
973
        MARKERS_ID integer not null,
974
        primary key (COLLECTION_ID, MARKERS_ID)
975
    );
976

  
977
    create table PUBLIC.COLLECTION_MARKER_AUD (
978
       REV integer not null,
979
        COLLECTION_ID integer not null,
980
        MARKERS_ID integer not null,
981
        REVTYPE tinyint,
982
        primary key (REV, COLLECTION_ID, MARKERS_ID)
983
    );
984

  
985
    create table PUBLIC.COLLECTION_MEDIA (
986
       COLLECTION_ID integer not null,
987
        MEDIA_ID integer not null,
988
        primary key (COLLECTION_ID, MEDIA_ID)
989
    );
990

  
991
    create table PUBLIC.COLLECTION_MEDIA_AUD (
992
       REV integer not null,
993
        COLLECTION_ID integer not null,
994
        MEDIA_ID integer not null,
995
        REVTYPE tinyint,
996
        primary key (REV, COLLECTION_ID, MEDIA_ID)
997
    );
998

  
999
    create table PUBLIC.COLLECTION_ORIGINALSOURCEBASE (
1000
       COLLECTION_ID integer not null,
1001
        SOURCES_ID integer not null,
1002
        primary key (COLLECTION_ID, SOURCES_ID)
1003
    );
1004

  
1005
    create table PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD (
1006
       REV integer not null,
1007
        COLLECTION_ID integer not null,
1008
        SOURCES_ID integer not null,
1009
        REVTYPE tinyint,
1010
        primary key (REV, COLLECTION_ID, SOURCES_ID)
1011
    );
1012

  
1013
    create table PUBLIC.COLLECTION_RIGHTSINFO (
1014
       COLLECTION_ID integer not null,
1015
        RIGHTS_ID integer not null,
1016
        primary key (COLLECTION_ID, RIGHTS_ID)
1017
    );
1018

  
1019
    create table PUBLIC.COLLECTION_RIGHTSINFO_AUD (
1020
       REV integer not null,
1021
        COLLECTION_ID integer not null,
1022
        RIGHTS_ID integer not null,
1023
        REVTYPE tinyint,
1024
        primary key (REV, COLLECTION_ID, RIGHTS_ID)
1025
    );
1026

  
1027
    create table PUBLIC.CREDIT (
1028
       ID integer not null,
1029
        CREATED timestamp,
1030
        UUID varchar(36),
1031
        UPDATED timestamp,
1032
        TEXT clob,
1033
        ABBREVIATEDTEXT varchar(255),
1034
        CREATEDBY_ID integer,
1035
        UPDATEDBY_ID integer,
1036
        LANGUAGE_ID integer,
1037
        AGENT_ID integer,
1038
        primary key (ID)
1039
    );
1040

  
1041
    create table PUBLIC.CREDIT_ANNOTATION (
1042
       CREDIT_ID integer not null,
1043
        ANNOTATIONS_ID integer not null,
1044
        primary key (CREDIT_ID, ANNOTATIONS_ID)
1045
    );
1046

  
1047
    create table PUBLIC.CREDIT_ANNOTATION_AUD (
1048
       REV integer not null,
1049
        CREDIT_ID integer not null,
1050
        ANNOTATIONS_ID integer not null,
1051
        REVTYPE tinyint,
1052
        primary key (REV, CREDIT_ID, ANNOTATIONS_ID)
1053
    );
1054

  
1055
    create table PUBLIC.CREDIT_AUD (
1056
       ID integer not null,
1057
        REV integer not null,
1058
        REVTYPE tinyint,
1059
        CREATED timestamp,
1060
        UUID varchar(36),
1061
        UPDATED timestamp,
1062
        TEXT clob,
1063
        ABBREVIATEDTEXT varchar(255),
1064
        CREATEDBY_ID integer,
1065
        UPDATEDBY_ID integer,
1066
        LANGUAGE_ID integer,
1067
        AGENT_ID integer,
1068
        primary key (ID, REV)
1069
    );
1070

  
1071
    create table PUBLIC.CREDIT_MARKER (
1072
       CREDIT_ID integer not null,
1073
        MARKERS_ID integer not null,
1074
        primary key (CREDIT_ID, MARKERS_ID)
1075
    );
1076

  
1077
    create table PUBLIC.CREDIT_MARKER_AUD (
1078
       REV integer not null,
1079
        CREDIT_ID integer not null,
1080
        MARKERS_ID integer not null,
1081
        REVTYPE tinyint,
1082
        primary key (REV, CREDIT_ID, MARKERS_ID)
1083
    );
1084

  
1085
    create table PUBLIC.DEFINEDTERMBASE (
1086
       DTYPE varchar(31) not null,
1087
        ID integer not null,
1088
        CREATED timestamp,
1089
        UUID varchar(36),
1090
        UPDATED timestamp,
1091
        LSID_AUTHORITY varchar(255),
1092
        LSID_LSID varchar(255),
1093
        LSID_NAMESPACE varchar(255),
1094
        LSID_OBJECT varchar(255),
1095
        LSID_REVISION varchar(255),
1096
        PROTECTEDTITLECACHE boolean not null,
1097
        TITLECACHE varchar(800),
1098
        TERMTYPE varchar(255),
1099
        URI clob,
1100
        AUTHORITYTYPE varchar(10),
1101
        EXTERNALID varchar(255),
1102
        EXTERNALLINK clob,
1103
        IMPORTMETHOD varchar(30),
1104
        LASTRETRIEVED timestamp,
1105
        IDINVOCABULARY varchar(255),
1106
        SYMBOL varchar(30),
1107
        SYMBOL2 varchar(30),
1108
        AVAILABLEFOR varchar(255),
1109
        ISO639_1 varchar(2),
1110
        ISTECHNICAL boolean,
1111
        ORDERINDEX integer,
1112
        INVERSESYMBOL varchar(30),
1113
        SYMMETRICAL boolean,
1114
        TRANSITIVE boolean,
1115
        SUPPORTEDDATATYPES varchar(255),
1116
        ABSENCETERM boolean,
1117
        DEFAULTCOLOR varchar(255),
1118
        POINTAPPROXIMATION_ERRORRADIUS integer,
1119
        POINTAPPROXIMATION_LATITUDE double,
1120
        POINTAPPROXIMATION_LONGITUDE double,
1121
        VALIDPERIOD_END varchar(255),
1122
        VALIDPERIOD_FREETEXT varchar(255),
1123
        VALIDPERIOD_START varchar(255),
1124
        ISO3166_A2 varchar(2),
1125
        NOMENCLATURALSTANDING varchar(255),
1126
        NOMENCLATURALSTANDINGINVERSE varchar(255),
1127
        RANKCLASS varchar(255),
1128
        CREATEDBY_ID integer,
1129
        UPDATEDBY_ID integer,
1130
        KINDOF_ID integer,
1131
        PARTOF_ID integer,
1132
        VOCABULARY_ID integer,
1133
        PROPERTY_ID integer,
1134
        PROPERTYMODIFIER_ID integer,
1135
        RATIOTOSTRUCTURE_ID integer,
1136
        STRUCTURE_ID integer,
1137
        STRUCTUREMODIFIER_ID integer,
1138
        LEVEL_ID integer,
1139
        POINTAPPROXIMATION_REFERENCESYSTEM_ID integer,
1140
        SHAPE_ID integer,
1141
        TYPE_ID integer,
1142
        primary key (ID)
1143
    );
1144

  
1145
    create table PUBLIC.DEFINEDTERMBASE_ANNOTATION (
1146
       DEFINEDTERMBASE_ID integer not null,
1147
        ANNOTATIONS_ID integer not null,
1148
        primary key (DEFINEDTERMBASE_ID, ANNOTATIONS_ID)
1149
    );
1150

  
1151
    create table PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD (
1152
       REV integer not null,
1153
        DEFINEDTERMBASE_ID integer not null,
1154
        ANNOTATIONS_ID integer not null,
1155
        REVTYPE tinyint,
1156
        primary key (REV, DEFINEDTERMBASE_ID, ANNOTATIONS_ID)
1157
    );
1158

  
1159
    create table PUBLIC.DEFINEDTERMBASE_AUD (
1160
       ID integer not null,
1161
        REV integer not null,
1162
        DTYPE varchar(31) not null,
1163
        REVTYPE tinyint,
1164
        CREATED timestamp,
1165
        UUID varchar(36),
1166
        UPDATED timestamp,
1167
        LSID_AUTHORITY varchar(255),
1168
        LSID_LSID varchar(255),
1169
        LSID_NAMESPACE varchar(255),
1170
        LSID_OBJECT varchar(255),
1171
        LSID_REVISION varchar(255),
1172
        PROTECTEDTITLECACHE boolean,
1173
        TITLECACHE varchar(800),
1174
        TERMTYPE varchar(255),
1175
        URI clob,
1176
        AUTHORITYTYPE varchar(10),
1177
        EXTERNALID varchar(255),
1178
        EXTERNALLINK clob,
1179
        IMPORTMETHOD varchar(30),
1180
        LASTRETRIEVED timestamp,
1181
        IDINVOCABULARY varchar(255),
1182
        SYMBOL varchar(30),
1183
        SYMBOL2 varchar(30),
1184
        CREATEDBY_ID integer,
1185
        UPDATEDBY_ID integer,
1186
        KINDOF_ID integer,
1187
        PARTOF_ID integer,
1188
        VOCABULARY_ID integer,
1189
        AVAILABLEFOR varchar(255),
1190
        SUPPORTEDDATATYPES varchar(255),
1191
        PROPERTY_ID integer,
1192
        PROPERTYMODIFIER_ID integer,
1193
        RATIOTOSTRUCTURE_ID integer,
1194
        STRUCTURE_ID integer,
1195
        STRUCTUREMODIFIER_ID integer,
1196
        ISTECHNICAL boolean,
1197
        ISO639_1 varchar(2),
1198
        ORDERINDEX integer,
1199
        RANKCLASS varchar(255),
1200
        NOMENCLATURALSTANDING varchar(255),
1201
        POINTAPPROXIMATION_ERRORRADIUS integer,
1202
        POINTAPPROXIMATION_LATITUDE double,
1203
        POINTAPPROXIMATION_LONGITUDE double,
1204
        VALIDPERIOD_END varchar(255),
1205
        VALIDPERIOD_FREETEXT varchar(255),
1206
        VALIDPERIOD_START varchar(255),
1207
        LEVEL_ID integer,
1208
        POINTAPPROXIMATION_REFERENCESYSTEM_ID integer,
1209
        SHAPE_ID integer,
1210
        TYPE_ID integer,
1211
        ISO3166_A2 varchar(2),
1212
        ABSENCETERM boolean,
1213
        DEFAULTCOLOR varchar(255),
1214
        INVERSESYMBOL varchar(30),
1215
        SYMMETRICAL boolean,
1216
        TRANSITIVE boolean,
1217
        NOMENCLATURALSTANDINGINVERSE varchar(255),
1218
        primary key (ID, REV)
1219
    );
1220

  
1221
    create table PUBLIC.DEFINEDTERMBASE_CONTINENT (
1222
       COUNTRY_ID integer not null,
1223
        CONTINENTS_ID integer not null,
1224
        primary key (COUNTRY_ID, CONTINENTS_ID)
1225
    );
1226

  
1227
    create table PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD (
1228
       REV integer not null,
1229
        COUNTRY_ID integer not null,
1230
        CONTINENTS_ID integer not null,
1231
        REVTYPE tinyint,
1232
        primary key (REV, COUNTRY_ID, CONTINENTS_ID)
1233
    );
1234

  
1235
    create table PUBLIC.DEFINEDTERMBASE_COUNTRY (
1236
       NAMEDAREA_ID integer not null,
1237
        COUNTRIES_ID integer not null,
1238
        primary key (NAMEDAREA_ID, COUNTRIES_ID)
1239
    );
1240

  
1241
    create table PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD (
1242
       REV integer not null,
1243
        NAMEDAREA_ID integer not null,
1244
        COUNTRIES_ID integer not null,
1245
        REVTYPE tinyint,
1246
        primary key (REV, NAMEDAREA_ID, COUNTRIES_ID)
1247
    );
1248

  
1249
    create table PUBLIC.DEFINEDTERMBASE_CREDIT (
1250
       DEFINEDTERMBASE_ID integer not null,
1251
        CREDITS_ID integer not null,
1252
        SORTINDEX integer not null,
1253
        primary key (DEFINEDTERMBASE_ID, SORTINDEX)
1254
    );
1255

  
1256
    create table PUBLIC.DEFINEDTERMBASE_CREDIT_AUD (
1257
       REV integer not null,
1258
        DEFINEDTERMBASE_ID integer not null,
1259
        CREDITS_ID integer not null,
1260
        SORTINDEX integer not null,
1261
        REVTYPE tinyint,
1262
        primary key (REV, DEFINEDTERMBASE_ID, CREDITS_ID, SORTINDEX)
1263
    );
1264

  
1265
    create table PUBLIC.DEFINEDTERMBASE_EXTENSION (
1266
       DEFINEDTERMBASE_ID integer not null,
1267
        EXTENSIONS_ID integer not null,
1268
        primary key (DEFINEDTERMBASE_ID, EXTENSIONS_ID)
1269
    );
1270

  
1271
    create table PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD (
1272
       REV integer not null,
1273
        DEFINEDTERMBASE_ID integer not null,
1274
        EXTENSIONS_ID integer not null,
1275
        REVTYPE tinyint,
1276
        primary key (REV, DEFINEDTERMBASE_ID, EXTENSIONS_ID)
1277
    );
1278

  
1279
    create table PUBLIC.DEFINEDTERMBASE_EXTERNALLINK (
1280
       DEFINEDTERMBASE_ID integer not null,
1281
        LINKS_ID integer not null,
1282
        primary key (DEFINEDTERMBASE_ID, LINKS_ID)
1283
    );
1284

  
1285
    create table PUBLIC.DEFINEDTERMBASE_EXTERNALLINK_AUD (
1286
       REV integer not null,
1287
        DEFINEDTERMBASE_ID integer not null,
1288
        LINKS_ID integer not null,
1289
        REVTYPE tinyint,
1290
        primary key (REV, DEFINEDTERMBASE_ID, LINKS_ID)
1291
    );
1292

  
1293
    create table PUBLIC.DEFINEDTERMBASE_IDENTIFIER (
1294
       DEFINEDTERMBASE_ID integer not null,
1295
        IDENTIFIERS_ID integer not null,
1296
        SORTINDEX integer not null,
1297
        primary key (DEFINEDTERMBASE_ID, SORTINDEX)
1298
    );
1299

  
1300
    create table PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD (
1301
       REV integer not null,
1302
        DEFINEDTERMBASE_ID integer not null,
1303
        IDENTIFIERS_ID integer not null,
1304
        SORTINDEX integer not null,
1305
        REVTYPE tinyint,
1306
        primary key (REV, DEFINEDTERMBASE_ID, IDENTIFIERS_ID, SORTINDEX)
1307
    );
1308

  
1309
    create table PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION (
1310
       DEFINEDTERMBASE_ID integer not null,
1311
        INVERSEREPRESENTATIONS_ID integer not null,
1312
        primary key (DEFINEDTERMBASE_ID, INVERSEREPRESENTATIONS_ID)
1313
    );
1314

  
1315
    create table PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION_AUD (
1316
       REV integer not null,
1317
        DEFINEDTERMBASE_ID integer not null,
1318
        INVERSEREPRESENTATIONS_ID integer not null,
1319
        REVTYPE tinyint,
1320
        primary key (REV, DEFINEDTERMBASE_ID, INVERSEREPRESENTATIONS_ID)
1321
    );
1322

  
1323
    create table PUBLIC.DEFINEDTERMBASE_MARKER (
1324
       DEFINEDTERMBASE_ID integer not null,
1325
        MARKERS_ID integer not null,
1326
        primary key (DEFINEDTERMBASE_ID, MARKERS_ID)
1327
    );
1328

  
1329
    create table PUBLIC.DEFINEDTERMBASE_MARKER_AUD (
1330
       REV integer not null,
1331
        DEFINEDTERMBASE_ID integer not null,
1332
        MARKERS_ID integer not null,
1333
        REVTYPE tinyint,
1334
        primary key (REV, DEFINEDTERMBASE_ID, MARKERS_ID)
1335
    );
1336

  
1337
    create table PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT (
1338
       FEATURE_ID integer not null,
1339
        RECOMMENDEDMEASUREMENTUNITS_ID integer not null,
1340
        primary key (FEATURE_ID, RECOMMENDEDMEASUREMENTUNITS_ID)
1341
    );
1342

  
1343
    create table PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD (
1344
       REV integer not null,
1345
        FEATURE_ID integer not null,
1346
        RECOMMENDEDMEASUREMENTUNITS_ID integer not null,
1347
        REVTYPE tinyint,
1348
        primary key (REV, FEATURE_ID, RECOMMENDEDMEASUREMENTUNITS_ID)
1349
    );
1350

  
1351
    create table PUBLIC.DEFINEDTERMBASE_MEDIA (
1352
       DEFINEDTERMBASE_ID integer not null,
1353
        MEDIA_ID integer not null,
1354
        primary key (DEFINEDTERMBASE_ID, MEDIA_ID)
1355
    );
1356

  
1357
    create table PUBLIC.DEFINEDTERMBASE_MEDIA_AUD (
1358
       REV integer not null,
1359
        DEFINEDTERMBASE_ID integer not null,
1360
        MEDIA_ID integer not null,
1361
        REVTYPE tinyint,
1362
        primary key (REV, DEFINEDTERMBASE_ID, MEDIA_ID)
1363
    );
1364

  
1365
    create table PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE (
1366
       DEFINEDTERMBASE_ID integer not null,
1367
        SOURCES_ID integer not null,
1368
        primary key (DEFINEDTERMBASE_ID, SOURCES_ID)
1369
    );
1370

  
1371
    create table PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD (
1372
       REV integer not null,
1373
        DEFINEDTERMBASE_ID integer not null,
1374
        SOURCES_ID integer not null,
1375
        REVTYPE tinyint,
1376
        primary key (REV, DEFINEDTERMBASE_ID, SOURCES_ID)
1377
    );
1378

  
1379
    create table PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION (
1380
       FEATURE_ID integer not null,
1381
        RECOMMENDEDMODIFIERENUMERATION_ID integer not null,
1382
        primary key (FEATURE_ID, RECOMMENDEDMODIFIERENUMERATION_ID)
1383
    );
1384

  
1385
    create table PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD (
1386
       REV integer not null,
1387
        FEATURE_ID integer not null,
1388
        RECOMMENDEDMODIFIERENUMERATION_ID integer not null,
1389
        REVTYPE tinyint,
1390
        primary key (REV, FEATURE_ID, RECOMMENDEDMODIFIERENUMERATION_ID)
1391
    );
1392

  
1393
    create table PUBLIC.DEFINEDTERMBASE_REPRESENTATION (
1394
       DEFINEDTERMBASE_ID integer not null,
1395
        REPRESENTATIONS_ID integer not null,
1396
        primary key (DEFINEDTERMBASE_ID, REPRESENTATIONS_ID)
1397
    );
1398

  
1399
    create table PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD (
1400
       REV integer not null,
1401
        DEFINEDTERMBASE_ID integer not null,
1402
        REPRESENTATIONS_ID integer not null,
1403
        REVTYPE tinyint,
1404
        primary key (REV, DEFINEDTERMBASE_ID, REPRESENTATIONS_ID)
1405
    );
1406

  
1407
    create table PUBLIC.DEFINEDTERMBASE_RIGHTSINFO (
1408
       DEFINEDTERMBASE_ID integer not null,
1409
        RIGHTS_ID integer not null,
1410
        primary key (DEFINEDTERMBASE_ID, RIGHTS_ID)
1411
    );
1412

  
1413
    create table PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD (
1414
       REV integer not null,
1415
        DEFINEDTERMBASE_ID integer not null,
1416
        RIGHTS_ID integer not null,
1417
        REVTYPE tinyint,
1418
        primary key (REV, DEFINEDTERMBASE_ID, RIGHTS_ID)
1419
    );
1420

  
1421
    create table PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE (
1422
       FEATURE_ID integer not null,
1423
        RECOMMENDEDSTATISTICALMEASURES_ID integer not null,
1424
        primary key (FEATURE_ID, RECOMMENDEDSTATISTICALMEASURES_ID)
1425
    );
1426

  
1427
    create table PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD (
1428
       REV integer not null,
1429
        FEATURE_ID integer not null,
1430
        RECOMMENDEDSTATISTICALMEASURES_ID integer not null,
1431
        REVTYPE tinyint,
1432
        primary key (REV, FEATURE_ID, RECOMMENDEDSTATISTICALMEASURES_ID)
1433
    );
1434

  
1435
    create table PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION (
1436
       FEATURE_ID integer not null,
1437
        SUPPORTEDCATEGORICALENUMERATIONS_ID integer not null,
1438
        primary key (FEATURE_ID, SUPPORTEDCATEGORICALENUMERATIONS_ID)
1439
    );
1440

  
1441
    create table PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD (
1442
       REV integer not null,
1443
        FEATURE_ID integer not null,
1444
        SUPPORTEDCATEGORICALENUMERATIONS_ID integer not null,
1445
        REVTYPE tinyint,
1446
        primary key (REV, FEATURE_ID, SUPPORTEDCATEGORICALENUMERATIONS_ID)
1447
    );
1448

  
1449
    create table PUBLIC.DERIVATIONEVENT (
1450
       ID integer not null,
1451
        CREATED timestamp,
1452
        UUID varchar(36),
1453
        UPDATED timestamp,
1454
        DESCRIPTION varchar(255),
1455
        TIMEPERIOD_END varchar(255),
1456
        TIMEPERIOD_FREETEXT varchar(255),
1457
        TIMEPERIOD_START varchar(255),
1458
        CREATEDBY_ID integer,
1459
        UPDATEDBY_ID integer,
1460
        ACTOR_ID integer,
1461
        INSTITUTION_ID integer,
1462
        TYPE_ID integer,
1463
        primary key (ID)
1464
    );
1465

  
1466
    create table PUBLIC.DERIVATIONEVENT_ANNOTATION (
1467
       DERIVATIONEVENT_ID integer not null,
1468
        ANNOTATIONS_ID integer not null,
1469
        primary key (DERIVATIONEVENT_ID, ANNOTATIONS_ID)
1470
    );
1471

  
1472
    create table PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD (
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff