Project

General

Profile

Revision 560ec68e

ID560ec68e2b63f7aadd9ebf03d8c513c9ac9487c1
Parent c8189eb7
Child f4934ec3

Added by Andreas Müller 2 months ago

fix 6714 preliminary add generated 001-cdm.h2.sql (cont.)

View differences:

cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql
12047 12047
        add constraint FKlt42h4kqm2ekw8y41980phxbx 
12048 12048
        foreign key (MEMBERS_ID) 
12049 12049
        references PUBLIC.USERACCOUNT;
12050

  
12051
    create table PUBLIC.ADDRESS (
12052
        ID integer not null,
12053
        CREATED timestamp,
12054
        UUID varchar(36),
12055
        UPDATED timestamp,
12056
        LOCALITY varchar(255),
12057
        LOCATION_ERRORRADIUS integer,
12058
        LOCATION_LATITUDE double,
12059
        LOCATION_LONGITUDE double,
12060
        POBOX varchar(255),
12061
        POSTCODE varchar(255),
12062
        REGION varchar(255),
12063
        STREET varchar(255),
12064
        CREATEDBY_ID integer,
12065
        UPDATEDBY_ID integer,
12066
        COUNTRY_ID integer,
12067
        LOCATION_REFERENCESYSTEM_ID integer,
12068
        primary key (ID)
12069
    );
12070

  
12071
    create table PUBLIC.ADDRESS_AUD (
12072
        ID integer not null,
12073
        REV integer not null,
12074
        REVTYPE tinyint,
12075
        CREATED timestamp,
12076
        UUID varchar(36),
12077
        UPDATED timestamp,
12078
        LOCALITY varchar(255),
12079
        LOCATION_ERRORRADIUS integer,
12080
        LOCATION_LATITUDE double,
12081
        LOCATION_LONGITUDE double,
12082
        POBOX varchar(255),
12083
        POSTCODE varchar(255),
12084
        REGION varchar(255),
12085
        STREET varchar(255),
12086
        CREATEDBY_ID integer,
12087
        UPDATEDBY_ID integer,
12088
        COUNTRY_ID integer,
12089
        LOCATION_REFERENCESYSTEM_ID integer,
12090
        primary key (ID, REV)
12091
    );
12092

  
12093
    create table PUBLIC.AGENTBASE (
12094
        DTYPE varchar(31) not null,
12095
        ID integer not null,
12096
        CREATED timestamp,
12097
        UUID varchar(36),
12098
        UPDATED timestamp,
12099
        LSID_AUTHORITY varchar(255),
12100
        LSID_LSID varchar(255),
12101
        LSID_NAMESPACE varchar(255),
12102
        LSID_OBJECT varchar(255),
12103
        LSID_REVISION varchar(255),
12104
        PROTECTEDTITLECACHE boolean not null,
12105
        TITLECACHE varchar(800),
12106
        CODE varchar(255),
12107
        NAME varchar(255),
12108
        COLLECTORTITLE varchar(255),
12109
        NOMENCLATURALTITLE varchar(255),
12110
        FAMILYNAME varchar(255),
12111
        GIVENNAME varchar(255),
12112
        INITIALS varchar(80),
12113
        LIFESPAN_END varchar(255),
12114
        LIFESPAN_FREETEXT varchar(255),
12115
        LIFESPAN_START varchar(255),
12116
        ORCID varchar(16),
12117
        PREFIX varchar(255),
12118
        SUFFIX varchar(255),
12119
        HASMOREMEMBERS boolean,
12120
        PROTECTEDCOLLECTORTITLECACHE boolean,
12121
        PROTECTEDNOMENCLATURALTITLECACHE boolean,
12122
        CREATEDBY_ID integer,
12123
        UPDATEDBY_ID integer,
12124
        ISPARTOF_ID integer,
12125
        primary key (ID)
12126
    );
12127

  
12128
    create table PUBLIC.AGENTBASE_ADDRESS (
12129
        AGENTBASE_ID integer not null,
12130
        CONTACT_ADDRESSES_ID integer not null,
12131
        primary key (AGENTBASE_ID, CONTACT_ADDRESSES_ID)
12132
    );
12133

  
12134
    create table PUBLIC.AGENTBASE_ADDRESS_AUD (
12135
        REV integer not null,
12136
        AGENTBASE_ID integer not null,
12137
        CONTACT_ADDRESSES_ID integer not null,
12138
        REVTYPE tinyint,
12139
        primary key (REV, AGENTBASE_ID, CONTACT_ADDRESSES_ID)
12140
    );
12141

  
12142
    create table PUBLIC.AGENTBASE_AGENTBASE (
12143
        TEAM_ID integer not null,
12144
        TEAMMEMBERS_ID integer not null,
12145
        SORTINDEX integer not null,
12146
        primary key (TEAM_ID, SORTINDEX)
12147
    );
12148

  
12149
    create table PUBLIC.AGENTBASE_AGENTBASE_AUD (
12150
        REV integer not null,
12151
        TEAM_ID integer not null,
12152
        TEAMMEMBERS_ID integer not null,
12153
        SORTINDEX integer not null,
12154
        REVTYPE tinyint,
12155
        primary key (REV, TEAM_ID, TEAMMEMBERS_ID, SORTINDEX)
12156
    );
12157

  
12158
    create table PUBLIC.AGENTBASE_ANNOTATION (
12159
        AGENTBASE_ID integer not null,
12160
        ANNOTATIONS_ID integer not null,
12161
        primary key (AGENTBASE_ID, ANNOTATIONS_ID)
12162
    );
12163

  
12164
    create table PUBLIC.AGENTBASE_ANNOTATION_AUD (
12165
        REV integer not null,
12166
        AGENTBASE_ID integer not null,
12167
        ANNOTATIONS_ID integer not null,
12168
        REVTYPE tinyint,
12169
        primary key (REV, AGENTBASE_ID, ANNOTATIONS_ID)
12170
    );
12171

  
12172
    create table PUBLIC.AGENTBASE_AUD (
12173
        ID integer not null,
12174
        REV integer not null,
12175
        DTYPE varchar(31) not null,
12176
        REVTYPE tinyint,
12177
        CREATED timestamp,
12178
        UUID varchar(36),
12179
        UPDATED timestamp,
12180
        LSID_AUTHORITY varchar(255),
12181
        LSID_LSID varchar(255),
12182
        LSID_NAMESPACE varchar(255),
12183
        LSID_OBJECT varchar(255),
12184
        LSID_REVISION varchar(255),
12185
        PROTECTEDTITLECACHE boolean,
12186
        TITLECACHE varchar(800),
12187
        CREATEDBY_ID integer,
12188
        UPDATEDBY_ID integer,
12189
        CODE varchar(255),
12190
        NAME varchar(255),
12191
        ISPARTOF_ID integer,
12192
        COLLECTORTITLE varchar(255),
12193
        NOMENCLATURALTITLE varchar(255),
12194
        HASMOREMEMBERS boolean,
12195
        PROTECTEDCOLLECTORTITLECACHE boolean,
12196
        PROTECTEDNOMENCLATURALTITLECACHE boolean,
12197
        FAMILYNAME varchar(255),
12198
        GIVENNAME varchar(255),
12199
        INITIALS varchar(80),
12200
        LIFESPAN_END varchar(255),
12201
        LIFESPAN_FREETEXT varchar(255),
12202
        LIFESPAN_START varchar(255),
12203
        ORCID varchar(16),
12204
        PREFIX varchar(255),
12205
        SUFFIX varchar(255),
12206
        primary key (ID, REV)
12207
    );
12208

  
12209
    create table PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES (
12210
        AGENTBASE_ID integer not null,
12211
        CONTACT_EMAILADDRESSES_ELEMENT varchar(255)
12212
    );
12213

  
12214
    create table PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD (
12215
        REV integer not null,
12216
        AGENTBASE_ID integer not null,
12217
        CONTACT_EMAILADDRESSES_ELEMENT varchar(255) not null,
12218
        REVTYPE tinyint,
12219
        primary key (REV, AGENTBASE_ID, CONTACT_EMAILADDRESSES_ELEMENT)
12220
    );
12221

  
12222
    create table PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS (
12223
        AGENTBASE_ID integer not null,
12224
        CONTACT_FAXNUMBERS_ELEMENT varchar(255)
12225
    );
12226

  
12227
    create table PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD (
12228
        REV integer not null,
12229
        AGENTBASE_ID integer not null,
12230
        CONTACT_FAXNUMBERS_ELEMENT varchar(255) not null,
12231
        REVTYPE tinyint,
12232
        primary key (REV, AGENTBASE_ID, CONTACT_FAXNUMBERS_ELEMENT)
12233
    );
12234

  
12235
    create table PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS (
12236
        AGENTBASE_ID integer not null,
12237
        CONTACT_PHONENUMBERS_ELEMENT varchar(255)
12238
    );
12239

  
12240
    create table PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD (
12241
        REV integer not null,
12242
        AGENTBASE_ID integer not null,
12243
        CONTACT_PHONENUMBERS_ELEMENT varchar(255) not null,
12244
        REVTYPE tinyint,
12245
        primary key (REV, AGENTBASE_ID, CONTACT_PHONENUMBERS_ELEMENT)
12246
    );
12247

  
12248
    create table PUBLIC.AGENTBASE_CONTACT_URLS (
12249
        AGENTBASE_ID integer not null,
12250
        CONTACT_URLS_ELEMENT varchar(255)
12251
    );
12252

  
12253
    create table PUBLIC.AGENTBASE_CONTACT_URLS_AUD (
12254
        REV integer not null,
12255
        AGENTBASE_ID integer not null,
12256
        CONTACT_URLS_ELEMENT varchar(255) not null,
12257
        REVTYPE tinyint,
12258
        primary key (REV, AGENTBASE_ID, CONTACT_URLS_ELEMENT)
12259
    );
12260

  
12261
    create table PUBLIC.AGENTBASE_CREDIT (
12262
        AGENTBASE_ID integer not null,
12263
        CREDITS_ID integer not null,
12264
        SORTINDEX integer not null,
12265
        primary key (AGENTBASE_ID, SORTINDEX)
12266
    );
12267

  
12268
    create table PUBLIC.AGENTBASE_CREDIT_AUD (
12269
        REV integer not null,
12270
        AGENTBASE_ID integer not null,
12271
        CREDITS_ID integer not null,
12272
        SORTINDEX integer not null,
12273
        REVTYPE tinyint,
12274
        primary key (REV, AGENTBASE_ID, CREDITS_ID, SORTINDEX)
12275
    );
12276

  
12277
    create table PUBLIC.AGENTBASE_DEFINEDTERMBASE (
12278
        INSTITUTION_ID integer not null,
12279
        TYPES_ID integer not null,
12280
        primary key (INSTITUTION_ID, TYPES_ID)
12281
    );
12282

  
12283
    create table PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD (
12284
        REV integer not null,
12285
        INSTITUTION_ID integer not null,
12286
        TYPES_ID integer not null,
12287
        REVTYPE tinyint,
12288
        primary key (REV, INSTITUTION_ID, TYPES_ID)
12289
    );
12290

  
12291
    create table PUBLIC.AGENTBASE_EXTENSION (
12292
        AGENTBASE_ID integer not null,
12293
        EXTENSIONS_ID integer not null,
12294
        primary key (AGENTBASE_ID, EXTENSIONS_ID)
12295
    );
12296

  
12297
    create table PUBLIC.AGENTBASE_EXTENSION_AUD (
12298
        REV integer not null,
12299
        AGENTBASE_ID integer not null,
12300
        EXTENSIONS_ID integer not null,
12301
        REVTYPE tinyint,
12302
        primary key (REV, AGENTBASE_ID, EXTENSIONS_ID)
12303
    );
12304

  
12305
    create table PUBLIC.AGENTBASE_EXTERNALLINK (
12306
        AGENTBASE_ID integer not null,
12307
        LINKS_ID integer not null,
12308
        primary key (AGENTBASE_ID, LINKS_ID)
12309
    );
12310

  
12311
    create table PUBLIC.AGENTBASE_EXTERNALLINK_AUD (
12312
        REV integer not null,
12313
        AGENTBASE_ID integer not null,
12314
        LINKS_ID integer not null,
12315
        REVTYPE tinyint,
12316
        primary key (REV, AGENTBASE_ID, LINKS_ID)
12317
    );
12318

  
12319
    create table PUBLIC.AGENTBASE_IDENTIFIER (
12320
        AGENTBASE_ID integer not null,
12321
        IDENTIFIERS_ID integer not null,
12322
        SORTINDEX integer not null,
12323
        primary key (AGENTBASE_ID, SORTINDEX)
12324
    );
12325

  
12326
    create table PUBLIC.AGENTBASE_IDENTIFIER_AUD (
12327
        REV integer not null,
12328
        AGENTBASE_ID integer not null,
12329
        IDENTIFIERS_ID integer not null,
12330
        SORTINDEX integer not null,
12331
        REVTYPE tinyint,
12332
        primary key (REV, AGENTBASE_ID, IDENTIFIERS_ID, SORTINDEX)
12333
    );
12334

  
12335
    create table PUBLIC.AGENTBASE_MARKER (
12336
        AGENTBASE_ID integer not null,
12337
        MARKERS_ID integer not null,
12338
        primary key (AGENTBASE_ID, MARKERS_ID)
12339
    );
12340

  
12341
    create table PUBLIC.AGENTBASE_MARKER_AUD (
12342
        REV integer not null,
12343
        AGENTBASE_ID integer not null,
12344
        MARKERS_ID integer not null,
12345
        REVTYPE tinyint,
12346
        primary key (REV, AGENTBASE_ID, MARKERS_ID)
12347
    );
12348

  
12349
    create table PUBLIC.AGENTBASE_MEDIA (
12350
        AGENTBASE_ID integer not null,
12351
        MEDIA_ID integer not null,
12352
        primary key (AGENTBASE_ID, MEDIA_ID)
12353
    );
12354

  
12355
    create table PUBLIC.AGENTBASE_MEDIA_AUD (
12356
        REV integer not null,
12357
        AGENTBASE_ID integer not null,
12358
        MEDIA_ID integer not null,
12359
        REVTYPE tinyint,
12360
        primary key (REV, AGENTBASE_ID, MEDIA_ID)
12361
    );
12362

  
12363
    create table PUBLIC.AGENTBASE_ORIGINALSOURCEBASE (
12364
        AGENTBASE_ID integer not null,
12365
        SOURCES_ID integer not null,
12366
        primary key (AGENTBASE_ID, SOURCES_ID)
12367
    );
12368

  
12369
    create table PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD (
12370
        REV integer not null,
12371
        AGENTBASE_ID integer not null,
12372
        SOURCES_ID integer not null,
12373
        REVTYPE tinyint,
12374
        primary key (REV, AGENTBASE_ID, SOURCES_ID)
12375
    );
12376

  
12377
    create table PUBLIC.AGENTBASE_RIGHTSINFO (
12378
        AGENTBASE_ID integer not null,
12379
        RIGHTS_ID integer not null,
12380
        primary key (AGENTBASE_ID, RIGHTS_ID)
12381
    );
12382

  
12383
    create table PUBLIC.AGENTBASE_RIGHTSINFO_AUD (
12384
        REV integer not null,
12385
        AGENTBASE_ID integer not null,
12386
        RIGHTS_ID integer not null,
12387
        REVTYPE tinyint,
12388
        primary key (REV, AGENTBASE_ID, RIGHTS_ID)
12389
    );
12390

  
12391
    create table PUBLIC.AMPLIFICATION (
12392
        ID integer not null,
12393
        CREATED timestamp,
12394
        UUID varchar(36),
12395
        UPDATED timestamp,
12396
        DESCRIPTION varchar(255),
12397
        TIMEPERIOD_END varchar(255),
12398
        TIMEPERIOD_FREETEXT varchar(255),
12399
        TIMEPERIOD_START varchar(255),
12400
        ELECTROPHORESISVOLTAGE double,
12401
        GELCONCENTRATION double,
12402
        GELRUNNINGTIME double,
12403
        LABELCACHE varchar(255),
12404
        LADDERUSED varchar(255),
12405
        CREATEDBY_ID integer,
12406
        UPDATEDBY_ID integer,
12407
        ACTOR_ID integer,
12408
        DNAMARKER_ID integer,
12409
        FORWARDPRIMER_ID integer,
12410
        INSTITUTION_ID integer,
12411
        PURIFICATION_ID integer,
12412
        REVERSEPRIMER_ID integer,
12413
        primary key (ID)
12414
    );
12415

  
12416
    create table PUBLIC.AMPLIFICATION_ANNOTATION (
12417
        AMPLIFICATION_ID integer not null,
12418
        ANNOTATIONS_ID integer not null,
12419
        primary key (AMPLIFICATION_ID, ANNOTATIONS_ID)
12420
    );
12421

  
12422
    create table PUBLIC.AMPLIFICATION_ANNOTATION_AUD (
12423
        REV integer not null,
12424
        AMPLIFICATION_ID integer not null,
12425
        ANNOTATIONS_ID integer not null,
12426
        REVTYPE tinyint,
12427
        primary key (REV, AMPLIFICATION_ID, ANNOTATIONS_ID)
12428
    );
12429

  
12430
    create table PUBLIC.AMPLIFICATION_AUD (
12431
        ID integer not null,
12432
        REV integer not null,
12433
        REVTYPE tinyint,
12434
        CREATED timestamp,
12435
        UUID varchar(36),
12436
        UPDATED timestamp,
12437
        DESCRIPTION varchar(255),
12438
        TIMEPERIOD_END varchar(255),
12439
        TIMEPERIOD_FREETEXT varchar(255),
12440
        TIMEPERIOD_START varchar(255),
12441
        ELECTROPHORESISVOLTAGE double,
12442
        GELCONCENTRATION double,
12443
        GELRUNNINGTIME double,
12444
        LABELCACHE varchar(255),
12445
        LADDERUSED varchar(255),
12446
        CREATEDBY_ID integer,
12447
        UPDATEDBY_ID integer,
12448
        ACTOR_ID integer,
12449
        DNAMARKER_ID integer,
12450
        FORWARDPRIMER_ID integer,
12451
        INSTITUTION_ID integer,
12452
        PURIFICATION_ID integer,
12453
        REVERSEPRIMER_ID integer,
12454
        primary key (ID, REV)
12455
    );
12456

  
12457
    create table PUBLIC.AMPLIFICATION_MARKER (
12458
        AMPLIFICATION_ID integer not null,
12459
        MARKERS_ID integer not null,
12460
        primary key (AMPLIFICATION_ID, MARKERS_ID)
12461
    );
12462

  
12463
    create table PUBLIC.AMPLIFICATION_MARKER_AUD (
12464
        REV integer not null,
12465
        AMPLIFICATION_ID integer not null,
12466
        MARKERS_ID integer not null,
12467
        REVTYPE tinyint,
12468
        primary key (REV, AMPLIFICATION_ID, MARKERS_ID)
12469
    );
12470

  
12471
    create table PUBLIC.AMPLIFICATIONRESULT (
12472
        ID integer not null,
12473
        CREATED timestamp,
12474
        UUID varchar(36),
12475
        UPDATED timestamp,
12476
        SUCCESSTEXT varchar(255),
12477
        SUCCESSFUL boolean,
12478
        CREATEDBY_ID integer,
12479
        UPDATEDBY_ID integer,
12480
        AMPLIFICATION_ID integer,
12481
        CLONING_ID integer,
12482
        DNASAMPLE_ID integer,
12483
        GELPHOTO_ID integer,
12484
        primary key (ID)
12485
    );
12486

  
12487
    create table PUBLIC.AMPLIFICATIONRESULT_ANNOTATION (
12488
        AMPLIFICATIONRESULT_ID integer not null,
12489
        ANNOTATIONS_ID integer not null,
12490
        primary key (AMPLIFICATIONRESULT_ID, ANNOTATIONS_ID)
12491
    );
12492

  
12493
    create table PUBLIC.AMPLIFICATIONRESULT_ANNOTATION_AUD (
12494
        REV integer not null,
12495
        AMPLIFICATIONRESULT_ID integer not null,
12496
        ANNOTATIONS_ID integer not null,
12497
        REVTYPE tinyint,
12498
        primary key (REV, AMPLIFICATIONRESULT_ID, ANNOTATIONS_ID)
12499
    );
12500

  
12501
    create table PUBLIC.AMPLIFICATIONRESULT_AUD (
12502
        ID integer not null,
12503
        REV integer not null,
12504
        REVTYPE tinyint,
12505
        CREATED timestamp,
12506
        UUID varchar(36),
12507
        UPDATED timestamp,
12508
        SUCCESSTEXT varchar(255),
12509
        SUCCESSFUL boolean,
12510
        CREATEDBY_ID integer,
12511
        UPDATEDBY_ID integer,
12512
        AMPLIFICATION_ID integer,
12513
        CLONING_ID integer,
12514
        DNASAMPLE_ID integer,
12515
        GELPHOTO_ID integer,
12516
        primary key (ID, REV)
12517
    );
12518

  
12519
    create table PUBLIC.AMPLIFICATIONRESULT_MARKER (
12520
        AMPLIFICATIONRESULT_ID integer not null,
12521
        MARKERS_ID integer not null,
12522
        primary key (AMPLIFICATIONRESULT_ID, MARKERS_ID)
12523
    );
12524

  
12525
    create table PUBLIC.AMPLIFICATIONRESULT_MARKER_AUD (
12526
        REV integer not null,
12527
        AMPLIFICATIONRESULT_ID integer not null,
12528
        MARKERS_ID integer not null,
12529
        REVTYPE tinyint,
12530
        primary key (REV, AMPLIFICATIONRESULT_ID, MARKERS_ID)
12531
    );
12532

  
12533
    create table PUBLIC.ANNOTATION (
12534
        ID integer not null,
12535
        CREATED timestamp,
12536
        UUID varchar(36),
12537
        UPDATED timestamp,
12538
        TEXT clob,
12539
        LINKBACKURI clob,
12540
        CREATEDBY_ID integer,
12541
        UPDATEDBY_ID integer,
12542
        LANGUAGE_ID integer,
12543
        ANNOTATIONTYPE_ID integer,
12544
        COMMENTATOR_ID integer,
12545
        primary key (ID)
12546
    );
12547

  
12548
    create table PUBLIC.ANNOTATION_ANNOTATION (
12549
        ANNOTATION_ID integer not null,
12550
        ANNOTATIONS_ID integer not null,
12551
        primary key (ANNOTATION_ID, ANNOTATIONS_ID)
12552
    );
12553

  
12554
    create table PUBLIC.ANNOTATION_ANNOTATION_AUD (
12555
        REV integer not null,
12556
        ANNOTATION_ID integer not null,
12557
        ANNOTATIONS_ID integer not null,
12558
        REVTYPE tinyint,
12559
        primary key (REV, ANNOTATION_ID, ANNOTATIONS_ID)
12560
    );
12561

  
12562
    create table PUBLIC.ANNOTATION_AUD (
12563
        ID integer not null,
12564
        REV integer not null,
12565
        REVTYPE tinyint,
12566
        CREATED timestamp,
12567
        UUID varchar(36),
12568
        UPDATED timestamp,
12569
        TEXT clob,
12570
        LINKBACKURI clob,
12571
        CREATEDBY_ID integer,
12572
        UPDATEDBY_ID integer,
12573
        LANGUAGE_ID integer,
12574
        ANNOTATIONTYPE_ID integer,
12575
        COMMENTATOR_ID integer,
12576
        primary key (ID, REV)
12577
    );
12578

  
12579
    create table PUBLIC.ANNOTATION_MARKER (
12580
        ANNOTATION_ID integer not null,
12581
        MARKERS_ID integer not null,
12582
        primary key (ANNOTATION_ID, MARKERS_ID)
12583
    );
12584

  
12585
    create table PUBLIC.ANNOTATION_MARKER_AUD (
12586
        REV integer not null,
12587
        ANNOTATION_ID integer not null,
12588
        MARKERS_ID integer not null,
12589
        REVTYPE tinyint,
12590
        primary key (REV, ANNOTATION_ID, MARKERS_ID)
12591
    );
12592

  
12593
    create table PUBLIC.AUDITEVENT (
12594
        REVISIONNUMBER integer not null,
12595
        DATE timestamp,
12596
        TIMESTAMP bigint,
12597
        UUID varchar(255),
12598
        primary key (REVISIONNUMBER)
12599
    );
12600

  
12601
    create table PUBLIC.AUTHORITY (
12602
        DTYPE varchar(31) not null,
12603
        ID integer not null,
12604
        CREATED timestamp,
12605
        UUID varchar(36),
12606
        OPERATIONS varchar(255),
12607
        PERMISSIONCLASS varchar(255),
12608
        PROPERTY varchar(255),
12609
        TARGETUUID varchar(36),
12610
        ROLE varchar(255),
12611
        CREATEDBY_ID integer,
12612
        primary key (ID)
12613
    );
12614

  
12615
    create table PUBLIC.CDMLINK (
12616
        DTYPE varchar(31) not null,
12617
        ID integer not null,
12618
        CREATED timestamp,
12619
        UUID varchar(36),
12620
        UPDATED timestamp,
12621
        ENDPOS integer,
12622
        STARTPOS integer,
12623
        CREATEDBY_ID integer,
12624
        UPDATEDBY_ID integer,
12625
        TAXON_ID integer,
12626
        AGENT_ID integer,
12627
        ANNOTATION_ID integer,
12628
        KEY_ID integer,
12629
        LANGUAGESTRING_ID integer,
12630
        MEDIA_ID integer,
12631
        OCCURRENCE_ID integer,
12632
        REFERENCE_ID integer,
12633
        SOURCE_ID integer,
12634
        TAXONNAME_ID integer,
12635
        DESCRIPTION_ID integer,
12636
        primary key (ID)
12637
    );
12638

  
12639
    create table PUBLIC.CDMLINK_AUD (
12640
        ID integer not null,
12641
        REV integer not null,
12642
        DTYPE varchar(31) not null,
12643
        REVTYPE tinyint,
12644
        CREATED timestamp,
12645
        UUID varchar(36),
12646
        UPDATED timestamp,
12647
        CREATEDBY_ID integer,
12648
        UPDATEDBY_ID integer,
12649
        TAXON_ID integer,
12650
        ENDPOS integer,
12651
        STARTPOS integer,
12652
        AGENT_ID integer,
12653
        ANNOTATION_ID integer,
12654
        KEY_ID integer,
12655
        LANGUAGESTRING_ID integer,
12656
        MEDIA_ID integer,
12657
        OCCURRENCE_ID integer,
12658
        REFERENCE_ID integer,
12659
        SOURCE_ID integer,
12660
        TAXONNAME_ID integer,
12661
        DESCRIPTION_ID integer,
12662
        primary key (ID, REV)
12663
    );
12664

  
12665
    create table PUBLIC.CDMMETADATA (
12666
        ID integer not null,
12667
        CREATED timestamp,
12668
        UUID varchar(36),
12669
        PROPERTYNAME varchar(20),
12670
        VALUE varchar(255),
12671
        CREATEDBY_ID integer,
12672
        primary key (ID)
12673
    );
12674

  
12675
    create table PUBLIC.CDMPREFERENCE (
12676
        KEY_PREDICATE varchar(100) not null,
12677
        KEY_SUBJECT varchar(100) not null,
12678
        ALLOWOVERRIDE boolean not null,
12679
        VALUE clob,
12680
        primary key (KEY_PREDICATE, KEY_SUBJECT)
12681
    );
12682

  
12683
    create table PUBLIC.CLASSIFICATION (
12684
        ID integer not null,
12685
        CREATED timestamp,
12686
        UUID varchar(36),
12687
        UPDATED timestamp,
12688
        LSID_AUTHORITY varchar(255),
12689
        LSID_LSID varchar(255),
12690
        LSID_NAMESPACE varchar(255),
12691
        LSID_OBJECT varchar(255),
12692
        LSID_REVISION varchar(255),
12693
        PROTECTEDTITLECACHE boolean not null,
12694
        TITLECACHE varchar(800),
12695
        MICROREFERENCE varchar(255),
12696
        TIMEPERIOD_END varchar(255),
12697
        TIMEPERIOD_FREETEXT varchar(255),
12698
        TIMEPERIOD_START varchar(255),
12699
        CREATEDBY_ID integer,
12700
        UPDATEDBY_ID integer,
12701
        NAME_ID integer,
12702
        REFERENCE_ID integer,
12703
        ROOTNODE_ID integer,
12704
        SOURCE_ID integer,
12705
        primary key (ID)
12706
    );
12707

  
12708
    create table PUBLIC.CLASSIFICATION_ANNOTATION (
12709
        CLASSIFICATION_ID integer not null,
12710
        ANNOTATIONS_ID integer not null,
12711
        primary key (CLASSIFICATION_ID, ANNOTATIONS_ID)
12712
    );
12713

  
12714
    create table PUBLIC.CLASSIFICATION_ANNOTATION_AUD (
12715
        REV integer not null,
12716
        CLASSIFICATION_ID integer not null,
12717
        ANNOTATIONS_ID integer not null,
12718
        REVTYPE tinyint,
12719
        primary key (REV, CLASSIFICATION_ID, ANNOTATIONS_ID)
12720
    );
12721

  
12722
    create table PUBLIC.CLASSIFICATION_AUD (
12723
        ID integer not null,
12724
        REV integer not null,
12725
        REVTYPE tinyint,
12726
        CREATED timestamp,
12727
        UUID varchar(36),
12728
        UPDATED timestamp,
12729
        LSID_AUTHORITY varchar(255),
12730
        LSID_LSID varchar(255),
12731
        LSID_NAMESPACE varchar(255),
12732
        LSID_OBJECT varchar(255),
12733
        LSID_REVISION varchar(255),
12734
        PROTECTEDTITLECACHE boolean,
12735
        TITLECACHE varchar(800),
12736
        MICROREFERENCE varchar(255),
12737
        TIMEPERIOD_END varchar(255),
12738
        TIMEPERIOD_FREETEXT varchar(255),
12739
        TIMEPERIOD_START varchar(255),
12740
        CREATEDBY_ID integer,
12741
        UPDATEDBY_ID integer,
12742
        NAME_ID integer,
12743
        REFERENCE_ID integer,
12744
        ROOTNODE_ID integer,
12745
        SOURCE_ID integer,
12746
        primary key (ID, REV)
12747
    );
12748

  
12749
    create table PUBLIC.CLASSIFICATION_CREDIT (
12750
        CLASSIFICATION_ID integer not null,
12751
        CREDITS_ID integer not null,
12752
        SORTINDEX integer not null,
12753
        primary key (CLASSIFICATION_ID, SORTINDEX)
12754
    );
12755

  
12756
    create table PUBLIC.CLASSIFICATION_CREDIT_AUD (
12757
        REV integer not null,
12758
        CLASSIFICATION_ID integer not null,
12759
        CREDITS_ID integer not null,
12760
        SORTINDEX integer not null,
12761
        REVTYPE tinyint,
12762
        primary key (REV, CLASSIFICATION_ID, CREDITS_ID, SORTINDEX)
12763
    );
12764

  
12765
    create table PUBLIC.CLASSIFICATION_DESCRIPTION (
12766
        CLASSIFICATION_ID integer not null,
12767
        DESCRIPTION_ID integer not null,
12768
        DESCRIPTION_MAPKEY_ID integer not null,
12769
        primary key (CLASSIFICATION_ID, DESCRIPTION_MAPKEY_ID)
12770
    );
12771

  
12772
    create table PUBLIC.CLASSIFICATION_DESCRIPTION_AUD (
12773
        REV integer not null,
12774
        CLASSIFICATION_ID integer not null,
12775
        DESCRIPTION_ID integer not null,
12776
        DESCRIPTION_MAPKEY_ID integer not null,
12777
        REVTYPE tinyint,
12778
        primary key (REV, CLASSIFICATION_ID, DESCRIPTION_ID, DESCRIPTION_MAPKEY_ID)
12779
    );
12780

  
12781
    create table PUBLIC.CLASSIFICATION_EXTENSION (
12782
        CLASSIFICATION_ID integer not null,
12783
        EXTENSIONS_ID integer not null,
12784
        primary key (CLASSIFICATION_ID, EXTENSIONS_ID)
12785
    );
12786

  
12787
    create table PUBLIC.CLASSIFICATION_EXTENSION_AUD (
12788
        REV integer not null,
12789
        CLASSIFICATION_ID integer not null,
12790
        EXTENSIONS_ID integer not null,
12791
        REVTYPE tinyint,
12792
        primary key (REV, CLASSIFICATION_ID, EXTENSIONS_ID)
12793
    );
12794

  
12795
    create table PUBLIC.CLASSIFICATION_EXTERNALLINK (
12796
        CLASSIFICATION_ID integer not null,
12797
        LINKS_ID integer not null,
12798
        primary key (CLASSIFICATION_ID, LINKS_ID)
12799
    );
12800

  
12801
    create table PUBLIC.CLASSIFICATION_EXTERNALLINK_AUD (
12802
        REV integer not null,
12803
        CLASSIFICATION_ID integer not null,
12804
        LINKS_ID integer not null,
12805
        REVTYPE tinyint,
12806
        primary key (REV, CLASSIFICATION_ID, LINKS_ID)
12807
    );
12808

  
12809
    create table PUBLIC.CLASSIFICATION_GEOSCOPE (
12810
        CLASSIFICATION_ID integer not null,
12811
        GEOSCOPES_ID integer not null,
12812
        primary key (CLASSIFICATION_ID, GEOSCOPES_ID)
12813
    );
12814

  
12815
    create table PUBLIC.CLASSIFICATION_GEOSCOPE_AUD (
12816
        REV integer not null,
12817
        CLASSIFICATION_ID integer not null,
12818
        GEOSCOPES_ID integer not null,
12819
        REVTYPE tinyint,
12820
        primary key (REV, CLASSIFICATION_ID, GEOSCOPES_ID)
12821
    );
12822

  
12823
    create table PUBLIC.CLASSIFICATION_IDENTIFIER (
12824
        CLASSIFICATION_ID integer not null,
12825
        IDENTIFIERS_ID integer not null,
12826
        SORTINDEX integer not null,
12827
        primary key (CLASSIFICATION_ID, SORTINDEX)
12828
    );
12829

  
12830
    create table PUBLIC.CLASSIFICATION_IDENTIFIER_AUD (
12831
        REV integer not null,
12832
        CLASSIFICATION_ID integer not null,
12833
        IDENTIFIERS_ID integer not null,
12834
        SORTINDEX integer not null,
12835
        REVTYPE tinyint,
12836
        primary key (REV, CLASSIFICATION_ID, IDENTIFIERS_ID, SORTINDEX)
12837
    );
12838

  
12839
    create table PUBLIC.CLASSIFICATION_MARKER (
12840
        CLASSIFICATION_ID integer not null,
12841
        MARKERS_ID integer not null,
12842
        primary key (CLASSIFICATION_ID, MARKERS_ID)
12843
    );
12844

  
12845
    create table PUBLIC.CLASSIFICATION_MARKER_AUD (
12846
        REV integer not null,
12847
        CLASSIFICATION_ID integer not null,
12848
        MARKERS_ID integer not null,
12849
        REVTYPE tinyint,
12850
        primary key (REV, CLASSIFICATION_ID, MARKERS_ID)
12851
    );
12852

  
12853
    create table PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE (
12854
        CLASSIFICATION_ID integer not null,
12855
        SOURCES_ID integer not null,
12856
        primary key (CLASSIFICATION_ID, SOURCES_ID)
12857
    );
12858

  
12859
    create table PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD (
12860
        REV integer not null,
12861
        CLASSIFICATION_ID integer not null,
12862
        SOURCES_ID integer not null,
12863
        REVTYPE tinyint,
12864
        primary key (REV, CLASSIFICATION_ID, SOURCES_ID)
12865
    );
12866

  
12867
    create table PUBLIC.CLASSIFICATION_RIGHTSINFO (
12868
        CLASSIFICATION_ID integer not null,
12869
        RIGHTS_ID integer not null,
12870
        primary key (CLASSIFICATION_ID, RIGHTS_ID)
12871
    );
12872

  
12873
    create table PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD (
12874
        REV integer not null,
12875
        CLASSIFICATION_ID integer not null,
12876
        RIGHTS_ID integer not null,
12877
        REVTYPE tinyint,
12878
        primary key (REV, CLASSIFICATION_ID, RIGHTS_ID)
12879
    );
12880

  
12881
    create table PUBLIC.COLLECTION (
12882
        ID integer not null,
12883
        CREATED timestamp,
12884
        UUID varchar(36),
12885
        UPDATED timestamp,
12886
        LSID_AUTHORITY varchar(255),
12887
        LSID_LSID varchar(255),
12888
        LSID_NAMESPACE varchar(255),
12889
        LSID_OBJECT varchar(255),
12890
        LSID_REVISION varchar(255),
12891
        PROTECTEDTITLECACHE boolean not null,
12892
        TITLECACHE varchar(800),
12893
        CODE varchar(255),
12894
        CODESTANDARD varchar(255),
12895
        NAME varchar(255),
12896
        TOWNORLOCATION varchar(255),
12897
        CREATEDBY_ID integer,
12898
        UPDATEDBY_ID integer,
12899
        INSTITUTE_ID integer,
12900
        SUPERCOLLECTION_ID integer,
12901
        primary key (ID)
12902
    );
12903

  
12904
    create table PUBLIC.COLLECTION_ANNOTATION (
12905
        COLLECTION_ID integer not null,
12906
        ANNOTATIONS_ID integer not null,
12907
        primary key (COLLECTION_ID, ANNOTATIONS_ID)
12908
    );
12909

  
12910
    create table PUBLIC.COLLECTION_ANNOTATION_AUD (
12911
        REV integer not null,
12912
        COLLECTION_ID integer not null,
12913
        ANNOTATIONS_ID integer not null,
12914
        REVTYPE tinyint,
12915
        primary key (REV, COLLECTION_ID, ANNOTATIONS_ID)
12916
    );
12917

  
12918
    create table PUBLIC.COLLECTION_AUD (
12919
        ID integer not null,
12920
        REV integer not null,
12921
        REVTYPE tinyint,
12922
        CREATED timestamp,
12923
        UUID varchar(36),
12924
        UPDATED timestamp,
12925
        LSID_AUTHORITY varchar(255),
12926
        LSID_LSID varchar(255),
12927
        LSID_NAMESPACE varchar(255),
12928
        LSID_OBJECT varchar(255),
12929
        LSID_REVISION varchar(255),
12930
        PROTECTEDTITLECACHE boolean,
12931
        TITLECACHE varchar(800),
12932
        CODE varchar(255),
12933
        CODESTANDARD varchar(255),
12934
        NAME varchar(255),
12935
        TOWNORLOCATION varchar(255),
12936
        CREATEDBY_ID integer,
12937
        UPDATEDBY_ID integer,
12938
        INSTITUTE_ID integer,
12939
        SUPERCOLLECTION_ID integer,
12940
        primary key (ID, REV)
12941
    );
12942

  
12943
    create table PUBLIC.COLLECTION_CREDIT (
12944
        COLLECTION_ID integer not null,
12945
        CREDITS_ID integer not null,
12946
        SORTINDEX integer not null,
12947
        primary key (COLLECTION_ID, SORTINDEX)
12948
    );
12949

  
12950
    create table PUBLIC.COLLECTION_CREDIT_AUD (
12951
        REV integer not null,
12952
        COLLECTION_ID integer not null,
12953
        CREDITS_ID integer not null,
12954
        SORTINDEX integer not null,
12955
        REVTYPE tinyint,
12956
        primary key (REV, COLLECTION_ID, CREDITS_ID, SORTINDEX)
12957
    );
12958

  
12959
    create table PUBLIC.COLLECTION_EXTENSION (
12960
        COLLECTION_ID integer not null,
12961
        EXTENSIONS_ID integer not null,
12962
        primary key (COLLECTION_ID, EXTENSIONS_ID)
12963
    );
12964

  
12965
    create table PUBLIC.COLLECTION_EXTENSION_AUD (
12966
        REV integer not null,
12967
        COLLECTION_ID integer not null,
12968
        EXTENSIONS_ID integer not null,
12969
        REVTYPE tinyint,
12970
        primary key (REV, COLLECTION_ID, EXTENSIONS_ID)
12971
    );
12972

  
12973
    create table PUBLIC.COLLECTION_EXTERNALLINK (
12974
        COLLECTION_ID integer not null,
12975
        LINKS_ID integer not null,
12976
        primary key (COLLECTION_ID, LINKS_ID)
12977
    );
12978

  
12979
    create table PUBLIC.COLLECTION_EXTERNALLINK_AUD (
12980
        REV integer not null,
12981
        COLLECTION_ID integer not null,
12982
        LINKS_ID integer not null,
12983
        REVTYPE tinyint,
12984
        primary key (REV, COLLECTION_ID, LINKS_ID)
12985
    );
12986

  
12987
    create table PUBLIC.COLLECTION_IDENTIFIER (
12988
        COLLECTION_ID integer not null,
12989
        IDENTIFIERS_ID integer not null,
12990
        SORTINDEX integer not null,
12991
        primary key (COLLECTION_ID, SORTINDEX)
12992
    );
12993

  
12994
    create table PUBLIC.COLLECTION_IDENTIFIER_AUD (
12995
        REV integer not null,
12996
        COLLECTION_ID integer not null,
12997
        IDENTIFIERS_ID integer not null,
12998
        SORTINDEX integer not null,
12999
        REVTYPE tinyint,
13000
        primary key (REV, COLLECTION_ID, IDENTIFIERS_ID, SORTINDEX)
13001
    );
13002

  
13003
    create table PUBLIC.COLLECTION_MARKER (
13004
        COLLECTION_ID integer not null,
13005
        MARKERS_ID integer not null,
13006
        primary key (COLLECTION_ID, MARKERS_ID)
13007
    );
13008

  
13009
    create table PUBLIC.COLLECTION_MARKER_AUD (
13010
        REV integer not null,
13011
        COLLECTION_ID integer not null,
13012
        MARKERS_ID integer not null,
13013
        REVTYPE tinyint,
13014
        primary key (REV, COLLECTION_ID, MARKERS_ID)
13015
    );
13016

  
13017
    create table PUBLIC.COLLECTION_MEDIA (
13018
        COLLECTION_ID integer not null,
13019
        MEDIA_ID integer not null,
13020
        primary key (COLLECTION_ID, MEDIA_ID)
13021
    );
13022

  
13023
    create table PUBLIC.COLLECTION_MEDIA_AUD (
13024
        REV integer not null,
13025
        COLLECTION_ID integer not null,
13026
        MEDIA_ID integer not null,
13027
        REVTYPE tinyint,
13028
        primary key (REV, COLLECTION_ID, MEDIA_ID)
13029
    );
13030

  
13031
    create table PUBLIC.COLLECTION_ORIGINALSOURCEBASE (
13032
        COLLECTION_ID integer not null,
13033
        SOURCES_ID integer not null,
13034
        primary key (COLLECTION_ID, SOURCES_ID)
13035
    );
13036

  
13037
    create table PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD (
13038
        REV integer not null,
13039
        COLLECTION_ID integer not null,
13040
        SOURCES_ID integer not null,
13041
        REVTYPE tinyint,
13042
        primary key (REV, COLLECTION_ID, SOURCES_ID)
13043
    );
13044

  
13045
    create table PUBLIC.COLLECTION_RIGHTSINFO (
13046
        COLLECTION_ID integer not null,
13047
        RIGHTS_ID integer not null,
13048
        primary key (COLLECTION_ID, RIGHTS_ID)
13049
    );
13050

  
13051
    create table PUBLIC.COLLECTION_RIGHTSINFO_AUD (
13052
        REV integer not null,
13053
        COLLECTION_ID integer not null,
13054
        RIGHTS_ID integer not null,
13055
        REVTYPE tinyint,
13056
        primary key (REV, COLLECTION_ID, RIGHTS_ID)
13057
    );
13058

  
13059
    create table PUBLIC.CREDIT (
13060
        ID integer not null,
13061
        CREATED timestamp,
13062
        UUID varchar(36),
13063
        UPDATED timestamp,
13064
        TEXT clob,
13065
        ABBREVIATEDTEXT varchar(255),
13066
        CREATEDBY_ID integer,
13067
        UPDATEDBY_ID integer,
13068
        LANGUAGE_ID integer,
13069
        AGENT_ID integer,
13070
        primary key (ID)
13071
    );
13072

  
13073
    create table PUBLIC.CREDIT_ANNOTATION (
13074
        CREDIT_ID integer not null,
13075
        ANNOTATIONS_ID integer not null,
13076
        primary key (CREDIT_ID, ANNOTATIONS_ID)
13077
    );
13078

  
13079
    create table PUBLIC.CREDIT_ANNOTATION_AUD (
13080
        REV integer not null,
13081
        CREDIT_ID integer not null,
13082
        ANNOTATIONS_ID integer not null,
13083
        REVTYPE tinyint,
13084
        primary key (REV, CREDIT_ID, ANNOTATIONS_ID)
13085
    );
13086

  
13087
    create table PUBLIC.CREDIT_AUD (
13088
        ID integer not null,
13089
        REV integer not null,
13090
        REVTYPE tinyint,
13091
        CREATED timestamp,
13092
        UUID varchar(36),
13093
        UPDATED timestamp,
13094
        TEXT clob,
13095
        ABBREVIATEDTEXT varchar(255),
13096
        CREATEDBY_ID integer,
13097
        UPDATEDBY_ID integer,
13098
        LANGUAGE_ID integer,
13099
        AGENT_ID integer,
13100
        primary key (ID, REV)
13101
    );
13102

  
13103
    create table PUBLIC.CREDIT_MARKER (
13104
        CREDIT_ID integer not null,
13105
        MARKERS_ID integer not null,
13106
        primary key (CREDIT_ID, MARKERS_ID)
13107
    );
13108

  
13109
    create table PUBLIC.CREDIT_MARKER_AUD (
13110
        REV integer not null,
13111
        CREDIT_ID integer not null,
13112
        MARKERS_ID integer not null,
13113
        REVTYPE tinyint,
13114
        primary key (REV, CREDIT_ID, MARKERS_ID)
13115
    );
13116

  
13117
    create table PUBLIC.DEFINEDTERMBASE (
13118
        DTYPE varchar(31) not null,
13119
        ID integer not null,
13120
        CREATED timestamp,
13121
        UUID varchar(36),
13122
        UPDATED timestamp,
13123
        LSID_AUTHORITY varchar(255),
13124
        LSID_LSID varchar(255),
13125
        LSID_NAMESPACE varchar(255),
13126
        LSID_OBJECT varchar(255),
13127
        LSID_REVISION varchar(255),
13128
        PROTECTEDTITLECACHE boolean not null,
13129
        TITLECACHE varchar(800),
13130
        TERMTYPE varchar(255),
13131
        URI clob,
13132
        AUTHORITYTYPE varchar(10),
13133
        EXTERNALID varchar(255),
13134
        EXTERNALLINK clob,
13135
        IMPORTMETHOD varchar(30),
13136
        LASTRETRIEVED timestamp,
13137
        IDINVOCABULARY varchar(255),
13138
        SYMBOL varchar(30),
13139
        SYMBOL2 varchar(30),
13140
        ISO639_1 varchar(2),
13141
        ISTECHNICAL boolean,
13142
        ORDERINDEX integer,
13143
        INVERSESYMBOL varchar(30),
13144
        SYMMETRICAL boolean,
13145
        TRANSITIVE boolean,
13146
        AVAILABLEFOR varchar(255),
13147
        SUPPORTEDDATATYPES varchar(255),
13148
        ABSENCETERM boolean,
13149
        DEFAULTCOLOR varchar(255),
13150
        POINTAPPROXIMATION_ERRORRADIUS integer,
13151
        POINTAPPROXIMATION_LATITUDE double,
13152
        POINTAPPROXIMATION_LONGITUDE double,
13153
        VALIDPERIOD_END varchar(255),
13154
        VALIDPERIOD_FREETEXT varchar(255),
13155
        VALIDPERIOD_START varchar(255),
13156
        ISO3166_A2 varchar(2),
13157
        RANKCLASS varchar(255),
13158
        CREATEDBY_ID integer,
13159
        UPDATEDBY_ID integer,
13160
        KINDOF_ID integer,
13161
        PARTOF_ID integer,
13162
        VOCABULARY_ID integer,
13163
        PROPERTY_ID integer,
13164
        PROPERTYMODIFIER_ID integer,
13165
        STRUCTURE_ID integer,
13166
        STRUCTUREMODIFIER_ID integer,
13167
        LEVEL_ID integer,
13168
        POINTAPPROXIMATION_REFERENCESYSTEM_ID integer,
13169
        SHAPE_ID integer,
13170
        TYPE_ID integer,
13171
        primary key (ID)
13172
    );
13173

  
13174
    create table PUBLIC.DEFINEDTERMBASE_ANNOTATION (
13175
        DEFINEDTERMBASE_ID integer not null,
13176
        ANNOTATIONS_ID integer not null,
13177
        primary key (DEFINEDTERMBASE_ID, ANNOTATIONS_ID)
13178
    );
13179

  
13180
    create table PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD (
13181
        REV integer not null,
13182
        DEFINEDTERMBASE_ID integer not null,
13183
        ANNOTATIONS_ID integer not null,
13184
        REVTYPE tinyint,
13185
        primary key (REV, DEFINEDTERMBASE_ID, ANNOTATIONS_ID)
13186
    );
13187

  
13188
    create table PUBLIC.DEFINEDTERMBASE_AUD (
13189
        ID integer not null,
13190
        REV integer not null,
13191
        DTYPE varchar(31) not null,
13192
        REVTYPE tinyint,
13193
        CREATED timestamp,
13194
        UUID varchar(36),
13195
        UPDATED timestamp,
13196
        LSID_AUTHORITY varchar(255),
13197
        LSID_LSID varchar(255),
13198
        LSID_NAMESPACE varchar(255),
13199
        LSID_OBJECT varchar(255),
13200
        LSID_REVISION varchar(255),
13201
        PROTECTEDTITLECACHE boolean,
13202
        TITLECACHE varchar(800),
13203
        TERMTYPE varchar(255),
13204
        URI clob,
13205
        AUTHORITYTYPE varchar(10),
13206
        EXTERNALID varchar(255),
13207
        EXTERNALLINK clob,
13208
        IMPORTMETHOD varchar(30),
13209
        LASTRETRIEVED timestamp,
13210
        IDINVOCABULARY varchar(255),
13211
        SYMBOL varchar(30),
13212
        SYMBOL2 varchar(30),
13213
        CREATEDBY_ID integer,
13214
        UPDATEDBY_ID integer,
13215
        KINDOF_ID integer,
13216
        PARTOF_ID integer,
13217
        VOCABULARY_ID integer,
13218
        AVAILABLEFOR varchar(255),
13219
        SUPPORTEDDATATYPES varchar(255),
13220
        PROPERTY_ID integer,
13221
        PROPERTYMODIFIER_ID integer,
13222
        STRUCTURE_ID integer,
13223
        STRUCTUREMODIFIER_ID integer,
13224
        ISO639_1 varchar(2),
13225
        ISTECHNICAL boolean,
13226
        ORDERINDEX integer,
13227
        RANKCLASS varchar(255),
13228
        POINTAPPROXIMATION_ERRORRADIUS integer,
13229
        POINTAPPROXIMATION_LATITUDE double,
13230
        POINTAPPROXIMATION_LONGITUDE double,
13231
        VALIDPERIOD_END varchar(255),
13232
        VALIDPERIOD_FREETEXT varchar(255),
13233
        VALIDPERIOD_START varchar(255),
13234
        LEVEL_ID integer,
13235
        POINTAPPROXIMATION_REFERENCESYSTEM_ID integer,
13236
        SHAPE_ID integer,
13237
        TYPE_ID integer,
13238
        ISO3166_A2 varchar(2),
13239
        ABSENCETERM boolean,
13240
        DEFAULTCOLOR varchar(255),
13241
        INVERSESYMBOL varchar(30),
13242
        SYMMETRICAL boolean,
13243
        TRANSITIVE boolean,
13244
        primary key (ID, REV)
13245
    );
13246

  
13247
    create table PUBLIC.DEFINEDTERMBASE_CONTINENT (
13248
        COUNTRY_ID integer not null,
13249
        CONTINENTS_ID integer not null,
13250
        primary key (COUNTRY_ID, CONTINENTS_ID)
13251
    );
13252

  
13253
    create table PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD (
13254
        REV integer not null,
13255
        COUNTRY_ID integer not null,
13256
        CONTINENTS_ID integer not null,
13257
        REVTYPE tinyint,
13258
        primary key (REV, COUNTRY_ID, CONTINENTS_ID)
13259
    );
13260

  
13261
    create table PUBLIC.DEFINEDTERMBASE_COUNTRY (
13262
        NAMEDAREA_ID integer not null,
13263
        COUNTRIES_ID integer not null,
13264
        primary key (NAMEDAREA_ID, COUNTRIES_ID)
13265
    );
13266

  
13267
    create table PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD (
13268
        REV integer not null,
13269
        NAMEDAREA_ID integer not null,
13270
        COUNTRIES_ID integer not null,
13271
        REVTYPE tinyint,
13272
        primary key (REV, NAMEDAREA_ID, COUNTRIES_ID)
13273
    );
13274

  
13275
    create table PUBLIC.DEFINEDTERMBASE_CREDIT (
13276
        DEFINEDTERMBASE_ID integer not null,
13277
        CREDITS_ID integer not null,
13278
        SORTINDEX integer not null,
13279
        primary key (DEFINEDTERMBASE_ID, SORTINDEX)
13280
    );
13281

  
13282
    create table PUBLIC.DEFINEDTERMBASE_CREDIT_AUD (
13283
        REV integer not null,
13284
        DEFINEDTERMBASE_ID integer not null,
13285
        CREDITS_ID integer not null,
13286
        SORTINDEX integer not null,
13287
        REVTYPE tinyint,
13288
        primary key (REV, DEFINEDTERMBASE_ID, CREDITS_ID, SORTINDEX)
13289
    );
13290

  
13291
    create table PUBLIC.DEFINEDTERMBASE_EXTENSION (
13292
        DEFINEDTERMBASE_ID integer not null,
13293
        EXTENSIONS_ID integer not null,
13294
        primary key (DEFINEDTERMBASE_ID, EXTENSIONS_ID)
13295
    );
13296

  
13297
    create table PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD (
13298
        REV integer not null,
13299
        DEFINEDTERMBASE_ID integer not null,
13300
        EXTENSIONS_ID integer not null,
13301
        REVTYPE tinyint,
13302
        primary key (REV, DEFINEDTERMBASE_ID, EXTENSIONS_ID)
13303
    );
13304

  
13305
    create table PUBLIC.DEFINEDTERMBASE_EXTERNALLINK (
13306
        DEFINEDTERMBASE_ID integer not null,
13307
        LINKS_ID integer not null,
13308
        primary key (DEFINEDTERMBASE_ID, LINKS_ID)
13309
    );
13310

  
13311
    create table PUBLIC.DEFINEDTERMBASE_EXTERNALLINK_AUD (
13312
        REV integer not null,
13313
        DEFINEDTERMBASE_ID integer not null,
13314
        LINKS_ID integer not null,
13315
        REVTYPE tinyint,
13316
        primary key (REV, DEFINEDTERMBASE_ID, LINKS_ID)
13317
    );
13318

  
13319
    create table PUBLIC.DEFINEDTERMBASE_IDENTIFIER (
13320
        DEFINEDTERMBASE_ID integer not null,
13321
        IDENTIFIERS_ID integer not null,
13322
        SORTINDEX integer not null,
13323
        primary key (DEFINEDTERMBASE_ID, SORTINDEX)
13324
    );
13325

  
13326
    create table PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD (
13327
        REV integer not null,
13328
        DEFINEDTERMBASE_ID integer not null,
13329
        IDENTIFIERS_ID integer not null,
13330
        SORTINDEX integer not null,
13331
        REVTYPE tinyint,
13332
        primary key (REV, DEFINEDTERMBASE_ID, IDENTIFIERS_ID, SORTINDEX)
13333
    );
13334

  
13335
    create table PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION (
13336
        DEFINEDTERMBASE_ID integer not null,
13337
        INVERSEREPRESENTATIONS_ID integer not null,
13338
        primary key (DEFINEDTERMBASE_ID, INVERSEREPRESENTATIONS_ID)
13339
    );
13340

  
13341
    create table PUBLIC.DEFINEDTERMBASE_INVERSEREPRESENTATION_AUD (
13342
        REV integer not null,
13343
        DEFINEDTERMBASE_ID integer not null,
13344
        INVERSEREPRESENTATIONS_ID integer not null,
13345
        REVTYPE tinyint,
13346
        primary key (REV, DEFINEDTERMBASE_ID, INVERSEREPRESENTATIONS_ID)
13347
    );
13348

  
13349
    create table PUBLIC.DEFINEDTERMBASE_MARKER (
13350
        DEFINEDTERMBASE_ID integer not null,
13351
        MARKERS_ID integer not null,
13352
        primary key (DEFINEDTERMBASE_ID, MARKERS_ID)
13353
    );
13354

  
13355
    create table PUBLIC.DEFINEDTERMBASE_MARKER_AUD (
13356
        REV integer not null,
13357
        DEFINEDTERMBASE_ID integer not null,
13358
        MARKERS_ID integer not null,
13359
        REVTYPE tinyint,
13360
        primary key (REV, DEFINEDTERMBASE_ID, MARKERS_ID)
13361
    );
13362

  
13363
    create table PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT (
13364
        FEATURE_ID integer not null,
13365
        RECOMMENDEDMEASUREMENTUNITS_ID integer not null,
13366
        primary key (FEATURE_ID, RECOMMENDEDMEASUREMENTUNITS_ID)
13367
    );
13368

  
13369
    create table PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD (
13370
        REV integer not null,
13371
        FEATURE_ID integer not null,
13372
        RECOMMENDEDMEASUREMENTUNITS_ID integer not null,
13373
        REVTYPE tinyint,
13374
        primary key (REV, FEATURE_ID, RECOMMENDEDMEASUREMENTUNITS_ID)
13375
    );
13376

  
13377
    create table PUBLIC.DEFINEDTERMBASE_MEDIA (
13378
        DEFINEDTERMBASE_ID integer not null,
13379
        MEDIA_ID integer not null,
13380
        primary key (DEFINEDTERMBASE_ID, MEDIA_ID)
13381
    );
13382

  
13383
    create table PUBLIC.DEFINEDTERMBASE_MEDIA_AUD (
13384
        REV integer not null,
13385
        DEFINEDTERMBASE_ID integer not null,
13386
        MEDIA_ID integer not null,
13387
        REVTYPE tinyint,
13388
        primary key (REV, DEFINEDTERMBASE_ID, MEDIA_ID)
13389
    );
13390

  
13391
    create table PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE (
13392
        DEFINEDTERMBASE_ID integer not null,
13393
        SOURCES_ID integer not null,
13394
        primary key (DEFINEDTERMBASE_ID, SOURCES_ID)
13395
    );
13396

  
13397
    create table PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD (
13398
        REV integer not null,
13399
        DEFINEDTERMBASE_ID integer not null,
13400
        SOURCES_ID integer not null,
13401
        REVTYPE tinyint,
13402
        primary key (REV, DEFINEDTERMBASE_ID, SOURCES_ID)
13403
    );
13404

  
13405
    create table PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION (
13406
        FEATURE_ID integer not null,
13407
        RECOMMENDEDMODIFIERENUMERATION_ID integer not null,
13408
        primary key (FEATURE_ID, RECOMMENDEDMODIFIERENUMERATION_ID)
13409
    );
13410

  
13411
    create table PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD (
13412
        REV integer not null,
13413
        FEATURE_ID integer not null,
13414
        RECOMMENDEDMODIFIERENUMERATION_ID integer not null,
13415
        REVTYPE tinyint,
13416
        primary key (REV, FEATURE_ID, RECOMMENDEDMODIFIERENUMERATION_ID)
13417
    );
13418

  
13419
    create table PUBLIC.DEFINEDTERMBASE_REPRESENTATION (
13420
        DEFINEDTERMBASE_ID integer not null,
13421
        REPRESENTATIONS_ID integer not null,
13422
        primary key (DEFINEDTERMBASE_ID, REPRESENTATIONS_ID)
13423
    );
13424

  
13425
    create table PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD (
13426
        REV integer not null,
13427
        DEFINEDTERMBASE_ID integer not null,
13428
        REPRESENTATIONS_ID integer not null,
13429
        REVTYPE tinyint,
13430
        primary key (REV, DEFINEDTERMBASE_ID, REPRESENTATIONS_ID)
13431
    );
13432

  
13433
    create table PUBLIC.DEFINEDTERMBASE_RIGHTSINFO (
13434
        DEFINEDTERMBASE_ID integer not null,
13435
        RIGHTS_ID integer not null,
13436
        primary key (DEFINEDTERMBASE_ID, RIGHTS_ID)
13437
    );
13438

  
13439
    create table PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD (
13440
        REV integer not null,
13441
        DEFINEDTERMBASE_ID integer not null,
13442
        RIGHTS_ID integer not null,
13443
        REVTYPE tinyint,
13444
        primary key (REV, DEFINEDTERMBASE_ID, RIGHTS_ID)
13445
    );
13446

  
13447
    create table PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE (
13448
        FEATURE_ID integer not null,
13449
        RECOMMENDEDSTATISTICALMEASURES_ID integer not null,
13450
        primary key (FEATURE_ID, RECOMMENDEDSTATISTICALMEASURES_ID)
13451
    );
13452

  
13453
    create table PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD (
13454
        REV integer not null,
13455
        FEATURE_ID integer not null,
13456
        RECOMMENDEDSTATISTICALMEASURES_ID integer not null,
13457
        REVTYPE tinyint,
13458
        primary key (REV, FEATURE_ID, RECOMMENDEDSTATISTICALMEASURES_ID)
13459
    );
13460

  
13461
    create table PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION (
13462
        FEATURE_ID integer not null,
13463
        SUPPORTEDCATEGORICALENUMERATIONS_ID integer not null,
13464
        primary key (FEATURE_ID, SUPPORTEDCATEGORICALENUMERATIONS_ID)
13465
    );
13466

  
13467
    create table PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD (
13468
        REV integer not null,
13469
        FEATURE_ID integer not null,
13470
        SUPPORTEDCATEGORICALENUMERATIONS_ID integer not null,
13471
        REVTYPE tinyint,
13472
        primary key (REV, FEATURE_ID, SUPPORTEDCATEGORICALENUMERATIONS_ID)
13473
    );
13474

  
13475
    create table PUBLIC.DERIVATIONEVENT (
13476
        ID integer not null,
13477
        CREATED timestamp,
13478
        UUID varchar(36),
13479
        UPDATED timestamp,
13480
        DESCRIPTION varchar(255),
13481
        TIMEPERIOD_END varchar(255),
13482
        TIMEPERIOD_FREETEXT varchar(255),
13483
        TIMEPERIOD_START varchar(255),
13484
        CREATEDBY_ID integer,
13485
        UPDATEDBY_ID integer,
13486
        ACTOR_ID integer,
13487
        INSTITUTION_ID integer,
13488
        TYPE_ID integer,
13489
        primary key (ID)
13490
    );
13491

  
13492
    create table PUBLIC.DERIVATIONEVENT_ANNOTATION (
13493
        DERIVATIONEVENT_ID integer not null,
13494
        ANNOTATIONS_ID integer not null,
13495
        primary key (DERIVATIONEVENT_ID, ANNOTATIONS_ID)
13496
    );
13497

  
13498
    create table PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD (
13499
        REV integer not null,
13500
        DERIVATIONEVENT_ID integer not null,
13501
        ANNOTATIONS_ID integer not null,
13502
        REVTYPE tinyint,
13503
        primary key (REV, DERIVATIONEVENT_ID, ANNOTATIONS_ID)
13504
    );
13505

  
13506
    create table PUBLIC.DERIVATIONEVENT_AUD (
13507
        ID integer not null,
13508
        REV integer not null,
13509
        REVTYPE tinyint,
13510
        CREATED timestamp,
13511
        UUID varchar(36),
13512
        UPDATED timestamp,
13513
        DESCRIPTION varchar(255),
13514
        TIMEPERIOD_END varchar(255),
13515
        TIMEPERIOD_FREETEXT varchar(255),
13516
        TIMEPERIOD_START varchar(255),
13517
        CREATEDBY_ID integer,
13518
        UPDATEDBY_ID integer,
13519
        ACTOR_ID integer,
13520
        INSTITUTION_ID integer,
13521
        TYPE_ID integer,
13522
        primary key (ID, REV)
13523
    );
13524

  
13525
    create table PUBLIC.DERIVATIONEVENT_MARKER (
13526
        DERIVATIONEVENT_ID integer not null,
13527
        MARKERS_ID integer not null,
13528
        primary key (DERIVATIONEVENT_ID, MARKERS_ID)
13529
    );
13530

  
13531
    create table PUBLIC.DERIVATIONEVENT_MARKER_AUD (
13532
        REV integer not null,
13533
        DERIVATIONEVENT_ID integer not null,
13534
        MARKERS_ID integer not null,
13535
        REVTYPE tinyint,
13536
        primary key (REV, DERIVATIONEVENT_ID, MARKERS_ID)
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)