Moving editor sources back into trunk
[taxeditor.git] / taxeditor-store / src / test / resources / dbscripts / 001_cdm.ddl
1 create table Address (id integer not null, created timestamp, uuid varchar(255), updated timestamp, locality varchar(255), location_errorradius integer, location_latitude double, location_longitude double, pobox varchar(255), postcode varchar(255), region varchar(255), street varchar(255), createdby_id integer, updatedby_id integer, contact_id integer, country_id integer, location_referencesystem_id integer, primary key (id));
2 create table Agent (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, code varchar(255), name varchar(255), nomenclaturaltitle varchar(255), firstname varchar(255), lastname varchar(255), lifespan_end varchar(255), lifespan_start varchar(255), prefix varchar(255), suffix varchar(255), createdby_id integer, updatedby_id integer, contact_id integer, ispartof_id integer, primary key (id));
3 create table Agent_Agent (Agent_id integer not null, teammembers_id integer not null);
4 create table Agent_Annotation (Agent_id integer not null, annotations_id integer not null, primary key (Agent_id, annotations_id), unique (annotations_id));
5 create table Agent_DefinedTermBase (Agent_id integer not null, types_id integer not null, primary key (Agent_id, types_id));
6 create table Agent_Extension (Agent_id integer not null, extensions_id integer not null, primary key (Agent_id, extensions_id), unique (extensions_id));
7 create table Agent_Marker (Agent_id integer not null, markers_id integer not null, primary key (Agent_id, markers_id), unique (markers_id));
8 create table Agent_Media (Agent_id integer not null, media_id integer not null, primary key (Agent_id, media_id), unique (media_id));
9 create table Agent_OriginalSource (Agent_id integer not null, sources_id integer not null, primary key (Agent_id, sources_id), unique (sources_id));
10 create table Agent_Rights (Agent_id integer not null, rights_id integer not null, primary key (Agent_id, rights_id));
11 create table Annotation (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), annotatedObj_type varchar(255), annotatedObj_id integer not null, linkbackurlstr varchar(255), createdby_id integer, updatedby_id integer, language_id integer, annotationtype_id integer, commentator_id integer, primary key (id));
12 create table Annotation_Annotation (Annotation_id integer not null, annotations_id integer not null, primary key (Annotation_id, annotations_id), unique (annotations_id));
13 create table Annotation_Marker (Annotation_id integer not null, markers_id integer not null, primary key (Annotation_id, markers_id), unique (markers_id));
14 create table CDM_VIEW (id integer not null, created timestamp, uuid varchar(255), description varchar(255), name varchar(255), reference varbinary(255), createdby_id integer, primary key (id));
15 create table CDM_VIEW_CDM_VIEW (CDM_VIEW_id integer not null, superviews_id integer not null, primary key (CDM_VIEW_id, superviews_id), unique (superviews_id));
16 create table Collection (id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, code varchar(255), codestandard varchar(255), name varchar(255), townorlocation varchar(255), createdby_id integer, updatedby_id integer, institute_id integer, supercollection_id integer, primary key (id));
17 create table Collection_Annotation (Collection_id integer not null, annotations_id integer not null, primary key (Collection_id, annotations_id), unique (annotations_id));
18 create table Collection_Extension (Collection_id integer not null, extensions_id integer not null, primary key (Collection_id, extensions_id), unique (extensions_id));
19 create table Collection_Marker (Collection_id integer not null, markers_id integer not null, primary key (Collection_id, markers_id), unique (markers_id));
20 create table Collection_Media (Collection_id integer not null, media_id integer not null, primary key (Collection_id, media_id), unique (media_id));
21 create table Collection_OriginalSource (Collection_id integer not null, sources_id integer not null, primary key (Collection_id, sources_id), unique (sources_id));
22 create table Collection_Rights (Collection_id integer not null, rights_id integer not null, primary key (Collection_id, rights_id));
23 create table Contact (id integer not null, created timestamp, uuid varchar(255), updated timestamp, email varchar(255), fax varchar(255), phone varchar(255), url varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
24 create table DefinedTermBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, uri varchar(255), orderindex integer, iso639_1 varchar(2), iso639_2 varchar(3), symmetric boolean, transitive boolean, defaultcolor varchar(255), supportscommontaxonname boolean, supportsdistribution boolean, supportsindividualassociation boolean, supportsquantitativedata boolean, supportstaxoninteraction boolean, supportstextdata boolean, pointapproximation_errorradius integer, pointapproximation_latitude double, pointapproximation_longitude double, validperiod_end varchar(255), validperiod_start varchar(255), iso3166_a2 varchar(2), createdby_id integer, updatedby_id integer, kindof_id integer, partof_id integer, vocabulary_id integer, level_id integer, pointapproximation_referencesystem_id integer, shape_id integer, type_id integer, primary key (id));
25 create table DefinedTermBase_Continent (DefinedTermBase_id integer not null, continents_id integer not null, primary key (DefinedTermBase_id, continents_id));
26 create table DefinedTermBase_Media (DefinedTermBase_id integer not null, media_id integer not null, primary key (DefinedTermBase_id, media_id), unique (media_id));
27 create table DefinedTermBase_RecommendedModifierEnumeration (DefinedTermBase_id integer not null, recommendedmodifierenumeration_id integer not null, primary key (DefinedTermBase_id, recommendedmodifierenumeration_id), unique (recommendedmodifierenumeration_id));
28 create table DefinedTermBase_Representation (DefinedTermBase_id integer not null, representations_id integer not null, primary key (DefinedTermBase_id, representations_id), unique (representations_id));
29 create table DefinedTermBase_StatisticalMeasure (DefinedTermBase_id integer not null, recommendedstatisticalmeasures_id integer not null, primary key (DefinedTermBase_id, recommendedstatisticalmeasures_id));
30 create table DefinedTermBase_SupportedCategoricalEnumeration (DefinedTermBase_id integer not null, supportedcategoricalenumerations_id integer not null, primary key (DefinedTermBase_id, supportedcategoricalenumerations_id), unique (supportedcategoricalenumerations_id));
31 create table DefinedTermBase_WaterbodyOrCountry (DefinedTermBase_id integer not null, waterbodiesorcountries_id integer not null, primary key (DefinedTermBase_id, waterbodiesorcountries_id));
32 create table DerivationEvent (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), timeperiod_end varchar(255), timeperiod_start varchar(255), createdby_id integer, updatedby_id integer, actor_id integer, type_id integer, primary key (id));
33 create table DerivationEvent_Annotation (DerivationEvent_id integer not null, annotations_id integer not null, primary key (DerivationEvent_id, annotations_id), unique (annotations_id));
34 create table DerivationEvent_Marker (DerivationEvent_id integer not null, markers_id integer not null, primary key (DerivationEvent_id, markers_id), unique (markers_id));
35 create table DescriptionBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, createdby_id integer, updatedby_id integer, taxon_fk integer, taxonName_fk integer, primary key (id));
36 create table DescriptionBase_Annotation (DescriptionBase_id integer not null, annotations_id integer not null, primary key (DescriptionBase_id, annotations_id), unique (annotations_id));
37 create table DescriptionBase_Extension (DescriptionBase_id integer not null, extensions_id integer not null, primary key (DescriptionBase_id, extensions_id), unique (extensions_id));
38 create table DescriptionBase_GeoScope (DescriptionBase_id integer not null, geoscopes_id integer not null, primary key (DescriptionBase_id, geoscopes_id), unique (geoscopes_id));
39 create table DescriptionBase_Marker (DescriptionBase_id integer not null, markers_id integer not null, primary key (DescriptionBase_id, markers_id), unique (markers_id));
40 create table DescriptionBase_OriginalSource (DescriptionBase_id integer not null, sources_id integer not null, primary key (DescriptionBase_id, sources_id), unique (sources_id));
41 create table DescriptionBase_ReferenceBase (DescriptionBase_id integer not null, descriptionsources_id integer not null, primary key (DescriptionBase_id, descriptionsources_id));
42 create table DescriptionBase_Rights (DescriptionBase_id integer not null, rights_id integer not null, primary key (DescriptionBase_id, rights_id));
43 create table DescriptionBase_Scope (DescriptionBase_id integer not null, scopes_id integer not null, primary key (DescriptionBase_id, scopes_id), unique (scopes_id));
44 create table DescriptionElementBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), modifyingtext varbinary(255), orderrelevant boolean, name varchar(255), description varbinary(255), createdby_id integer, updatedby_id integer, citation_id integer, feature_id integer, indescription_id integer, language_id integer, area_id integer, status_id integer, associatedspecimenorobservation_id integer, unit_id integer, taxon2_id integer, format_id integer, primary key (id));
45 create table DescriptionElementBase_Annotation (DescriptionElementBase_id integer not null, annotations_id integer not null, primary key (DescriptionElementBase_id, annotations_id), unique (annotations_id));
46 create table DescriptionElementBase_LanguageString (DescriptionElementBase_id integer not null, multilanguagetext_id integer not null, primary key (DescriptionElementBase_id, multilanguagetext_id), unique (multilanguagetext_id));
47 create table DescriptionElementBase_Marker (DescriptionElementBase_id integer not null, markers_id integer not null, primary key (DescriptionElementBase_id, markers_id), unique (markers_id));
48 create table DescriptionElementBase_Media (DescriptionElementBase_id integer not null, media_id integer not null, primary key (DescriptionElementBase_id, media_id), unique (media_id));
49 create table DescriptionElementBase_Modifier (DescriptionElementBase_id integer not null, modifiers_id integer not null, primary key (DescriptionElementBase_id, modifiers_id), unique (modifiers_id));
50 create table DescriptionElementBase_StateData (DescriptionElementBase_id integer not null, states_id integer not null);
51 create table DescriptionElementBase_StatisticalMeasurementValue (DescriptionElementBase_id integer not null, statisticalvalues_id integer not null, primary key (DescriptionElementBase_id, statisticalvalues_id), unique (statisticalvalues_id));
52 create table DeterminationEvent (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), timeperiod_end varchar(255), timeperiod_start varchar(255), preferredflag boolean not null, createdby_id integer, updatedby_id integer, actor_id integer, identifiedunit_id integer, modifier_id integer, taxon_id integer, primary key (id));
53 create table DeterminationEvent_Annotation (DeterminationEvent_id integer not null, annotations_id integer not null, primary key (DeterminationEvent_id, annotations_id), unique (annotations_id));
54 create table DeterminationEvent_Marker (DeterminationEvent_id integer not null, markers_id integer not null, primary key (DeterminationEvent_id, markers_id), unique (markers_id));
55 create table DeterminationEvent_ReferenceBase (DeterminationEvent_id integer not null, references_id integer not null, primary key (DeterminationEvent_id, references_id));
56 create table Extension (id integer not null, created timestamp, uuid varchar(255), updated timestamp, value varchar(255), createdby_id integer, updatedby_id integer, type_id integer, primary key (id));
57 create table FeatureNode (id integer not null, created timestamp, uuid varchar(255), updated timestamp, createdby_id integer, updatedby_id integer, feature_id integer, parent_fk integer, primary key (id));
58 create table FeatureTree (id integer not null, created timestamp, uuid varchar(255), updated timestamp, uri varchar(255), descriptionseparated boolean not null, createdby_id integer, updatedby_id integer, root_id integer, primary key (id));
59 create table FeatureTree_Representation (FeatureTree_id integer not null, representations_id integer not null, primary key (FeatureTree_id, representations_id), unique (representations_id));
60 create table GatheringEvent (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), timeperiod_end varchar(255), timeperiod_start varchar(255), absoluteelevation integer, absoluteelevationerror integer, collectingmethod varchar(255), distancetoground integer, distancetowatersurface integer, exactlocation_errorradius integer, exactlocation_latitude double, exactlocation_longitude double, createdby_id integer, updatedby_id integer, actor_id integer, exactlocation_referencesystem_id integer, locality_id integer, primary key (id));
61 create table GatheringEvent_Annotation (GatheringEvent_id integer not null, annotations_id integer not null, primary key (GatheringEvent_id, annotations_id), unique (annotations_id));
62 create table GatheringEvent_DefinedTermBase (GatheringEvent_id integer not null, collectingareas_id integer not null, primary key (GatheringEvent_id, collectingareas_id));
63 create table GatheringEvent_Marker (GatheringEvent_id integer not null, markers_id integer not null, primary key (GatheringEvent_id, markers_id), unique (markers_id));
64 create table GenBankAccession (id integer not null, created timestamp, uuid varchar(255), updated timestamp, accessionnumber varchar(255), uri varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
65 create table GrantedAuthorityImpl (id integer not null, created timestamp, uuid varchar(255), authority varchar(255), createdby_id integer, primary key (id), unique (authority));
66 create table HomotypicalGroup (id integer not null, created timestamp, uuid varchar(255), updated timestamp, createdby_id integer, updatedby_id integer, primary key (id));
67 create table HomotypicalGroup_Annotation (HomotypicalGroup_id integer not null, annotations_id integer not null, primary key (HomotypicalGroup_id, annotations_id), unique (annotations_id));
68 create table HomotypicalGroup_Marker (HomotypicalGroup_id integer not null, markers_id integer not null, primary key (HomotypicalGroup_id, markers_id), unique (markers_id));
69 create table HybridRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, ruleconsidered varchar(255), createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
70 create table HybridRelationship_Annotation (HybridRelationship_id integer not null, annotations_id integer not null, primary key (HybridRelationship_id, annotations_id), unique (annotations_id));
71 create table HybridRelationship_Marker (HybridRelationship_id integer not null, markers_id integer not null, primary key (HybridRelationship_id, markers_id), unique (markers_id));
72 create table IdentificationKey_Taxon (identificationKey_fk integer not null, taxon_fk integer not null, primary key (identificationKey_fk, taxon_fk));
73 create table InstitutionalMembership (id integer not null, created timestamp, uuid varchar(255), updated timestamp, department varchar(255), period_end varchar(255), period_start varchar(255), role varchar(255), createdby_id integer, updatedby_id integer, institute_id integer, person_id integer, primary key (id));
74 create table LanguageString (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), createdby_id integer, updatedby_id integer, language_id integer, primary key (id));
75 create table LanguageString_Annotation (LanguageString_id integer not null, annotations_id integer not null, primary key (LanguageString_id, annotations_id), unique (annotations_id));
76 create table LanguageString_Marker (LanguageString_id integer not null, markers_id integer not null, primary key (LanguageString_id, markers_id), unique (markers_id));
77 create table Locus (id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varchar(255), name varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
78 create table Marker (id integer not null, created timestamp, uuid varchar(255), updated timestamp, flag boolean not null, markedObj_type varchar(255), markedObj_id integer not null, createdby_id integer, updatedby_id integer, markertype_id integer, primary key (id));
79 create table Media (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, description varbinary(255), mediacreated date, title varbinary(255), citationmicroreference varchar(255), createdby_id integer, updatedby_id integer, artist_id integer, citation_id integer, primary key (id));
80 create table MediaRepresentation (id integer not null, created timestamp, uuid varchar(255), updated timestamp, mimetype varchar(255), suffix varchar(255), createdby_id integer, updatedby_id integer, media_id integer, primary key (id));
81 create table MediaRepresentationPart (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, size integer, uri varchar(255), duration integer, height integer, width integer, createdby_id integer, updatedby_id integer, representation_id integer not null, sortIndex integer, primary key (id));
82 create table Media_Annotation (Media_id integer not null, annotations_id integer not null, primary key (Media_id, annotations_id), unique (annotations_id));
83 create table Media_DefinedTermBase (Media_id integer not null, geoscopes_id integer not null, primary key (Media_id, geoscopes_id));
84 create table Media_Marker (Media_id integer not null, markers_id integer not null, primary key (Media_id, markers_id), unique (markers_id));
85 create table Media_Rights (Media_id integer not null, rights_id integer not null, primary key (Media_id, rights_id));
86 create table Media_Sequence (Media_id integer not null, usedsequences_id integer not null, primary key (Media_id, usedsequences_id), unique (usedsequences_id));
87 create table Media_TaxonBase (Media_id integer not null, coveredtaxa_id integer not null, primary key (Media_id, coveredtaxa_id), unique (coveredtaxa_id));
88 create table NameRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, ruleconsidered varchar(255), createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
89 create table NameRelationship_Annotation (NameRelationship_id integer not null, annotations_id integer not null, primary key (NameRelationship_id, annotations_id), unique (annotations_id));
90 create table NameRelationship_Marker (NameRelationship_id integer not null, markers_id integer not null, primary key (NameRelationship_id, markers_id), unique (markers_id));
91 create table NomenclaturalStatus (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), ruleconsidered varchar(255), createdby_id integer, updatedby_id integer, citation_id integer, type_id integer, primary key (id));
92 create table NomenclaturalStatus_Annotation (NomenclaturalStatus_id integer not null, annotations_id integer not null, primary key (NomenclaturalStatus_id, annotations_id), unique (annotations_id));
93 create table NomenclaturalStatus_Marker (NomenclaturalStatus_id integer not null, markers_id integer not null, primary key (NomenclaturalStatus_id, markers_id), unique (markers_id));
94 create table OriginalSource (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), idinsource varchar(255), idnamespace varchar(255), sourcedObj_type varchar(255), sourcedObj_id integer not null, createdby_id integer, updatedby_id integer, citation_id integer, primary key (id));
95 create table OriginalSource_Annotation (OriginalSource_id integer not null, annotations_id integer not null, primary key (OriginalSource_id, annotations_id), unique (annotations_id));
96 create table OriginalSource_Marker (OriginalSource_id integer not null, markers_id integer not null, primary key (OriginalSource_id, markers_id), unique (markers_id));
97 create table PermissionGroup (id integer not null, created timestamp, uuid varchar(255), name varchar(255), createdby_id integer, primary key (id));
98 create table PermissionGroup_GrantedAuthorityImpl (PermissionGroup_id integer not null, grantedauthorities_id integer not null, primary key (PermissionGroup_id, grantedauthorities_id));
99 create table Person_Keyword (person_fk integer not null, keyword_fk integer not null, primary key (person_fk, keyword_fk));
100 create table ReferenceBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, hasproblem boolean not null, nomenclaturallyrelevant boolean not null, problemends integer not null, problemstarts integer not null, uri varchar(255), datepublished_end varchar(255), datepublished_start varchar(255), title varchar(255), pages varchar(255), series varchar(255), volume varchar(255), address varchar(255), annote varchar(255), booktitle varchar(255), chapter varchar(255), edition varchar(255), editor varchar(255), eprint varchar(255), howpublished varchar(255), institution varchar(255), journal varchar(255), month varchar(255), note varchar(255), number varchar(255), organization varchar(255), publisher varchar(255), reporttype varchar(255), school varchar(255), year varchar(255), placepublished varchar(255), seriespart varchar(255), isbn varchar(255), issn varchar(255), createdby_id integer, updatedby_id integer, authorteam_id integer, injournal_id integer, crossref_id integer, type_id integer, inseries_id integer, inbook_id integer, inproceedings_id integer, institution_id integer, school_id integer, primary key (id));
101 create table ReferenceBase_Annotation (ReferenceBase_id integer not null, annotations_id integer not null, primary key (ReferenceBase_id, annotations_id), unique (annotations_id));
102 create table ReferenceBase_Extension (ReferenceBase_id integer not null, extensions_id integer not null, primary key (ReferenceBase_id, extensions_id), unique (extensions_id));
103 create table ReferenceBase_Marker (ReferenceBase_id integer not null, markers_id integer not null, primary key (ReferenceBase_id, markers_id), unique (markers_id));
104 create table ReferenceBase_Media (ReferenceBase_id integer not null, media_id integer not null, primary key (ReferenceBase_id, media_id), unique (media_id));
105 create table ReferenceBase_OriginalSource (ReferenceBase_id integer not null, sources_id integer not null, primary key (ReferenceBase_id, sources_id), unique (sources_id));
106 create table ReferenceBase_Rights (ReferenceBase_id integer not null, rights_id integer not null, primary key (ReferenceBase_id, rights_id));
107 create table RelationshipTermBase_inverseRepresentation (DefinedTermBase_id integer not null, inverserepresentations_id integer not null, primary key (DefinedTermBase_id, inverserepresentations_id), unique (inverserepresentations_id));
108 create table Representation (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), abbreviatedlabel varchar(255), label varchar(255), createdby_id integer, updatedby_id integer, language_id integer, primary key (id));
109 create table Representation_Annotation (Representation_id integer not null, annotations_id integer not null, primary key (Representation_id, annotations_id), unique (annotations_id));
110 create table Representation_Marker (Representation_id integer not null, markers_id integer not null, primary key (Representation_id, markers_id), unique (markers_id));
111 create table Rights (id integer not null, created timestamp, uuid varchar(255), updated timestamp, text varchar(4096), abbreviatedtext varchar(255), uri varchar(255), createdby_id integer, updatedby_id integer, language_id integer, agent_id integer, type_id integer, primary key (id));
112 create table Rights_Annotation (Rights_id integer not null, annotations_id integer not null, primary key (Rights_id, annotations_id), unique (annotations_id));
113 create table Rights_Marker (Rights_id integer not null, markers_id integer not null, primary key (Rights_id, markers_id), unique (markers_id));
114 create table Sequence (id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, barcode boolean not null, citationmicroreference varchar(255), datesequenced date, length integer, sequence varchar(255), createdby_id integer, updatedby_id integer, locus_id integer, publishedin_id integer, primary key (id));
115 create table Sequence_Annotation (Sequence_id integer not null, annotations_id integer not null, primary key (Sequence_id, annotations_id), unique (annotations_id));
116 create table Sequence_Extension (Sequence_id integer not null, extensions_id integer not null, primary key (Sequence_id, extensions_id), unique (extensions_id));
117 create table Sequence_GenBankAccession (Sequence_id integer not null, genbankaccession_id integer not null, primary key (Sequence_id, genbankaccession_id), unique (genbankaccession_id));
118 create table Sequence_Marker (Sequence_id integer not null, markers_id integer not null, primary key (Sequence_id, markers_id), unique (markers_id));
119 create table Sequence_Media (Sequence_id integer not null, chromatograms_id integer not null, primary key (Sequence_id, chromatograms_id), unique (chromatograms_id));
120 create table Sequence_OriginalSource (Sequence_id integer not null, sources_id integer not null, primary key (Sequence_id, sources_id), unique (sources_id));
121 create table Sequence_ReferenceBase (Sequence_id integer not null, citations_id integer not null, primary key (Sequence_id, citations_id), unique (citations_id));
122 create table Sequence_Rights (Sequence_id integer not null, rights_id integer not null, primary key (Sequence_id, rights_id));
123 create table SpecimenOrObservationBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, definition varbinary(255), individualcount integer, accessionnumber varchar(255), catalognumber varchar(255), collectorsnumber varchar(255), fieldnotes varchar(255), fieldnumber varchar(255), createdby_id integer, updatedby_id integer, lifestage_id integer, sex_id integer, collection_id integer, derivationevent_id integer, storedunder_id integer, preservation_id integer, gatheringevent_id integer, primary key (id));
124 create table SpecimenOrObservationBase_Annotation (SpecimenOrObservationBase_id integer not null, annotations_id integer not null, primary key (SpecimenOrObservationBase_id, annotations_id), unique (annotations_id));
125 create table SpecimenOrObservationBase_DerivationEvent (originals_id integer not null, derivationevents_id integer not null, primary key (originals_id, derivationevents_id));
126 create table SpecimenOrObservationBase_Extension (SpecimenOrObservationBase_id integer not null, extensions_id integer not null, primary key (SpecimenOrObservationBase_id, extensions_id), unique (extensions_id));
127 create table SpecimenOrObservationBase_Marker (SpecimenOrObservationBase_id integer not null, markers_id integer not null, primary key (SpecimenOrObservationBase_id, markers_id), unique (markers_id));
128 create table SpecimenOrObservationBase_Media (SpecimenOrObservationBase_id integer not null, media_id integer not null, primary key (SpecimenOrObservationBase_id, media_id), unique (media_id));
129 create table SpecimenOrObservationBase_OriginalSource (SpecimenOrObservationBase_id integer not null, sources_id integer not null, primary key (SpecimenOrObservationBase_id, sources_id), unique (sources_id));
130 create table SpecimenOrObservationBase_Rights (SpecimenOrObservationBase_id integer not null, rights_id integer not null, primary key (SpecimenOrObservationBase_id, rights_id));
131 create table SpecimenOrObservationBase_Sequence (SpecimenOrObservationBase_id integer not null, sequences_id integer not null, primary key (SpecimenOrObservationBase_id, sequences_id), unique (sequences_id));
132 create table StateData (id integer not null, created timestamp, uuid varchar(255), updated timestamp, modifyingtext varbinary(255), createdby_id integer, updatedby_id integer, state_id integer, primary key (id));
133 create table StateData_DefinedTermBase (StateData_id integer not null, modifiers_id integer not null, primary key (StateData_id, modifiers_id), unique (modifiers_id));
134 create table StatisticalMeasurementValue (id integer not null, created timestamp, uuid varchar(255), updated timestamp, value double not null, createdby_id integer, updatedby_id integer, type_id integer, primary key (id));
135 create table StatisticalMeasurementValue_DefinedTermBase (StatisticalMeasurementValue_id integer not null, modifiers_id integer not null, primary key (StatisticalMeasurementValue_id, modifiers_id), unique (modifiers_id));
136 create table SynonymRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, partial boolean not null, proparte boolean not null, createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
137 create table SynonymRelationship_Annotation (SynonymRelationship_id integer not null, annotations_id integer not null, primary key (SynonymRelationship_id, annotations_id), unique (annotations_id));
138 create table SynonymRelationship_Marker (SynonymRelationship_id integer not null, markers_id integer not null, primary key (SynonymRelationship_id, markers_id), unique (markers_id));
139 create table TaxonBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, doubtful boolean not null, taxonomicchildrencount integer, createdby_id integer, updatedby_id integer, taxonName_fk integer, sec_id integer, taxonomicparentcache_id integer, primary key (id));
140 create table TaxonBase_Annotation (TaxonBase_id integer not null, annotations_id integer not null, primary key (TaxonBase_id, annotations_id), unique (annotations_id));
141 create table TaxonBase_Extension (TaxonBase_id integer not null, extensions_id integer not null, primary key (TaxonBase_id, extensions_id), unique (extensions_id));
142 create table TaxonBase_Marker (TaxonBase_id integer not null, markers_id integer not null, primary key (TaxonBase_id, markers_id), unique (markers_id));
143 create table TaxonBase_OriginalSource (TaxonBase_id integer not null, sources_id integer not null, primary key (TaxonBase_id, sources_id), unique (sources_id));
144 create table TaxonBase_Rights (TaxonBase_id integer not null, rights_id integer not null, primary key (TaxonBase_id, rights_id));
145 create table TaxonNameBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, lsid varchar(255), titleCache varchar(255), protectedtitlecache boolean not null, appendedphrase varchar(255), hasproblem boolean not null, nomenclaturalmicroreference varchar(255), fullTitleCache varchar(330), problemends integer not null, problemstarts integer not null, protectedfulltitlecache boolean not null, authorshipcache varchar(255), genusoruninomial varchar(255), infragenericepithet varchar(255), infraspecificepithet varchar(255), namecache varchar(255), protectedauthorshipcache boolean, protectednamecache boolean, specificepithet varchar(255), nameapprobation varchar(255), subgenusauthorship varchar(255), anamorphic boolean, binomhybrid boolean, hybridformula boolean, monomhybrid boolean, trinomhybrid boolean, cultivarname varchar(255), acronym varchar(255), breed varchar(255), originalpublicationyear integer, publicationyear integer, createdby_id integer, updatedby_id integer, homotypicalgroup_id integer, nomenclaturalreference_id integer, rank_id integer, basionymauthorteam_id integer, combinationauthorteam_id integer, exbasionymauthorteam_id integer, excombinationauthorteam_id integer, primary key (id));
146 create table TaxonNameBase_Annotation (TaxonNameBase_id integer not null, annotations_id integer not null, primary key (TaxonNameBase_id, annotations_id), unique (annotations_id));
147 create table TaxonNameBase_Extension (TaxonNameBase_id integer not null, extensions_id integer not null, primary key (TaxonNameBase_id, extensions_id), unique (extensions_id));
148 create table TaxonNameBase_HybridRelationship (TaxonNameBase_id integer not null, hybridrelationships_id integer not null, primary key (TaxonNameBase_id, hybridrelationships_id), unique (hybridrelationships_id));
149 create table TaxonNameBase_Marker (TaxonNameBase_id integer not null, markers_id integer not null, primary key (TaxonNameBase_id, markers_id), unique (markers_id));
150 create table TaxonNameBase_NomenclaturalStatus (TaxonNameBase_id integer not null, status_id integer not null, primary key (TaxonNameBase_id, status_id), unique (status_id));
151 create table TaxonNameBase_OriginalSource (TaxonNameBase_id integer not null, sources_id integer not null, primary key (TaxonNameBase_id, sources_id), unique (sources_id));
152 create table TaxonNameBase_Rights (TaxonNameBase_id integer not null, rights_id integer not null, primary key (TaxonNameBase_id, rights_id));
153 create table TaxonNameBase_TypeDesignationBase (TaxonNameBase_id integer not null, typedesignations_id integer not null, primary key (TaxonNameBase_id, typedesignations_id));
154 create table TaxonRelationship (id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), doubtful boolean not null, createdby_id integer, updatedby_id integer, citation_id integer, relatedfrom_id integer, relatedto_id integer, type_id integer, primary key (id));
155 create table TaxonRelationship_Annotation (TaxonRelationship_id integer not null, annotations_id integer not null, primary key (TaxonRelationship_id, annotations_id), unique (annotations_id));
156 create table TaxonRelationship_Marker (TaxonRelationship_id integer not null, markers_id integer not null, primary key (TaxonRelationship_id, markers_id), unique (markers_id));
157 create table TermVocabulary (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, uri varchar(255), termsourceuri varchar(255), createdby_id integer, updatedby_id integer, primary key (id));
158 create table TermVocabulary_Representation (TermVocabulary_id integer not null, representations_id integer not null, primary key (TermVocabulary_id, representations_id), unique (representations_id));
159 create table TypeDesignationBase (DTYPE varchar(31) not null, id integer not null, created timestamp, uuid varchar(255), updated timestamp, citationmicroreference varchar(255), originalnamestring varchar(255), notdesignated boolean not null, conservedtype boolean, lectotype boolean, rejectedtype boolean, createdby_id integer, updatedby_id integer, citation_id integer, homotypicalgroup_id integer, typename_id integer, typespecimen_id integer, typestatus_id integer, primary key (id));
160 create table TypeDesignationBase_Annotation (TypeDesignationBase_id integer not null, annotations_id integer not null, primary key (TypeDesignationBase_id, annotations_id), unique (annotations_id));
161 create table TypeDesignationBase_Marker (TypeDesignationBase_id integer not null, markers_id integer not null, primary key (TypeDesignationBase_id, markers_id), unique (markers_id));
162 create table TypeDesignationBase_TaxonNameBase (TypeDesignationBase_id integer not null, typifiednames_id integer not null, primary key (TypeDesignationBase_id, typifiednames_id));
163 create table User (id integer not null, created timestamp, uuid varchar(255), accountnonexpired boolean not null, accountnonlocked boolean not null, credentialsnonexpired boolean not null, emailaddress varchar(255), enabled boolean not null, password varchar(255), username varchar(255), createdby_id integer, primary key (id), unique (username));
164 create table User_GrantedAuthorityImpl (User_id integer not null, grantedauthorities_id integer not null, primary key (User_id, grantedauthorities_id));
165 create table User_PermissionGroup (members_id integer not null, groups_id integer not null, primary key (members_id, groups_id));
166 alter table Address add constraint FK1ED033D4132A2FE8 foreign key (location_referencesystem_id) references DefinedTermBase;
167 alter table Address add constraint FK1ED033D4EE7A4BF4 foreign key (contact_id) references Contact;
168 alter table Address add constraint FK1ED033D4EF7921F6 foreign key (createdby_id) references Agent;
169 alter table Address add constraint FK1ED033D42687715A foreign key (country_id) references DefinedTermBase;
170 alter table Address add constraint FK1ED033D45BE3EC03 foreign key (updatedby_id) references Agent;
171 create index agentTitleCacheIndex on Agent (titleCache);
172 alter table Agent add constraint FK3C452E5EE7A4BF4 foreign key (contact_id) references Contact;
173 alter table Agent add constraint FK3C452E5EF7921F6 foreign key (createdby_id) references Agent;
174 alter table Agent add constraint FK3C452E5A830578 foreign key (ispartof_id) references Agent;
175 alter table Agent add constraint FK3C452E55BE3EC03 foreign key (updatedby_id) references Agent;
176 alter table Agent_Agent add constraint FKD792890B8CB642F8 foreign key (Agent_id) references Agent;
177 alter table Agent_Agent add constraint FKD792890BE9E535F9 foreign key (teammembers_id) references Agent;
178 alter table Agent_Annotation add constraint FKDD9D78E9C5F7EC54 foreign key (Agent_id) references Agent;
179 alter table Agent_Annotation add constraint FKDD9D78E91E403E0B foreign key (annotations_id) references Annotation;
180 alter table Agent_DefinedTermBase add constraint FK7029490CFE425B87 foreign key (Agent_id) references Agent;
181 alter table Agent_DefinedTermBase add constraint FK7029490C9A161BED foreign key (types_id) references DefinedTermBase;
182 alter table Agent_Extension add constraint FK8AC9EF45C5F7EC54 foreign key (Agent_id) references Agent;
183 alter table Agent_Extension add constraint FK8AC9EF45927DE9DF foreign key (extensions_id) references Extension;
184 alter table Agent_Marker add constraint FK2EEA0EF4C5F7EC54 foreign key (Agent_id) references Agent;
185 alter table Agent_Marker add constraint FK2EEA0EF4777265A1 foreign key (markers_id) references Marker;
186 alter table Agent_Media add constraint FKD83AB5EAC5F7EC54 foreign key (Agent_id) references Agent;
187 alter table Agent_Media add constraint FKD83AB5EAC2C29593 foreign key (media_id) references Media;
188 alter table Agent_OriginalSource add constraint FK774F9E06C5F7EC54 foreign key (Agent_id) references Agent;
189 alter table Agent_OriginalSource add constraint FK774F9E063BAB2414 foreign key (sources_id) references OriginalSource;
190 alter table Agent_Rights add constraint FK37DDFC91C5F7EC54 foreign key (Agent_id) references Agent;
191 alter table Agent_Rights add constraint FK37DDFC91C13F7B21 foreign key (rights_id) references Rights;
192 alter table Annotation add constraint FK1A21C74FDF299D00 foreign key (annotationtype_id) references DefinedTermBase;
193 alter table Annotation add constraint FK1A21C74FEF7921F6 foreign key (createdby_id) references Agent;
194 alter table Annotation add constraint FK1A21C74FE7692740 foreign key (commentator_id) references Agent;
195 alter table Annotation add constraint FK1A21C74F5BE3EC03 foreign key (updatedby_id) references Agent;
196 alter table Annotation add constraint FK1A21C74FE8D36B00 foreign key (language_id) references DefinedTermBase;
197 alter table Annotation_Annotation add constraint FKC99DFE3F994CCE20 foreign key (Annotation_id) references Annotation;
198 alter table Annotation_Annotation add constraint FKC99DFE3F1E403E0B foreign key (annotations_id) references Annotation;
199 alter table Annotation_Marker add constraint FKB17EAF4A994CCE20 foreign key (Annotation_id) references Annotation;
200 alter table Annotation_Marker add constraint FKB17EAF4A777265A1 foreign key (markers_id) references Marker;
201 alter table CDM_VIEW add constraint FKC5DE8EF8EF7921F6 foreign key (createdby_id) references Agent;
202 alter table CDM_VIEW_CDM_VIEW add constraint FK230A885F7208BB38 foreign key (superviews_id) references CDM_VIEW;
203 alter table CDM_VIEW_CDM_VIEW add constraint FK230A885FC00D1213 foreign key (CDM_VIEW_id) references CDM_VIEW;
204 create index collectionTitleCacheIndex on Collection (titleCache);
205 alter table Collection add constraint FKF078ABECEB38EFF foreign key (supercollection_id) references Collection;
206 alter table Collection add constraint FKF078ABEEF7921F6 foreign key (createdby_id) references Agent;
207 alter table Collection add constraint FKF078ABE16B9CA77 foreign key (institute_id) references Agent;
208 alter table Collection add constraint FKF078ABE5BE3EC03 foreign key (updatedby_id) references Agent;
209 alter table Collection_Annotation add constraint FKEA970F70EB62BE9A foreign key (Collection_id) references Collection;
210 alter table Collection_Annotation add constraint FKEA970F701E403E0B foreign key (annotations_id) references Annotation;
211 alter table Collection_Extension add constraint FKF68FEBDE927DE9DF foreign key (extensions_id) references Extension;
212 alter table Collection_Extension add constraint FKF68FEBDEEB62BE9A foreign key (Collection_id) references Collection;
213 alter table Collection_Marker add constraint FKF0CA00FBEB62BE9A foreign key (Collection_id) references Collection;
214 alter table Collection_Marker add constraint FKF0CA00FB777265A1 foreign key (markers_id) references Marker;
215 alter table Collection_Media add constraint FK7320E703EB62BE9A foreign key (Collection_id) references Collection;
216 alter table Collection_Media add constraint FK7320E703C2C29593 foreign key (media_id) references Media;
217 alter table Collection_OriginalSource add constraint FKA8FC990DEB62BE9A foreign key (Collection_id) references Collection;
218 alter table Collection_OriginalSource add constraint FKA8FC990D3BAB2414 foreign key (sources_id) references OriginalSource;
219 alter table Collection_Rights add constraint FKF9BDEE98EB62BE9A foreign key (Collection_id) references Collection;
220 alter table Collection_Rights add constraint FKF9BDEE98C13F7B21 foreign key (rights_id) references Rights;
221 alter table Contact add constraint FK9BEFBC00EF7921F6 foreign key (createdby_id) references Agent;
222 alter table Contact add constraint FK9BEFBC005BE3EC03 foreign key (updatedby_id) references Agent;
223 alter table DefinedTermBase add constraint FK2E340A6636C6F6F6 foreign key (pointapproximation_referencesystem_id) references DefinedTermBase;
224 alter table DefinedTermBase add constraint FK2E340A66EF7921F6 foreign key (createdby_id) references Agent;
225 alter table DefinedTermBase add constraint FK2E340A6688206484 foreign key (type_id) references DefinedTermBase;
226 alter table DefinedTermBase add constraint FK2E340A6647AF954C foreign key (vocabulary_id) references TermVocabulary;
227 alter table DefinedTermBase add constraint FK2E340A663B0DA0EF foreign key (kindof_id) references DefinedTermBase;
228 alter table DefinedTermBase add constraint FK2E340A6624AF3F70 foreign key (level_id) references DefinedTermBase;
229 alter table DefinedTermBase add constraint FK2E340A665BE3EC03 foreign key (updatedby_id) references Agent;
230 alter table DefinedTermBase add constraint FK2E340A66CC0240B6 foreign key (shape_id) references Media;
231 alter table DefinedTermBase add constraint FK2E340A66D040DBF0 foreign key (partof_id) references DefinedTermBase;
232 alter table DefinedTermBase_Continent add constraint FK45F60AFBE8CE10AA foreign key (DefinedTermBase_id) references DefinedTermBase;
233 alter table DefinedTermBase_Continent add constraint FK45F60AFB3927C853 foreign key (continents_id) references DefinedTermBase;
234 alter table DefinedTermBase_Media add constraint FK6FC908ABC0DB4934 foreign key (DefinedTermBase_id) references DefinedTermBase;
235 alter table DefinedTermBase_Media add constraint FK6FC908ABC2C29593 foreign key (media_id) references Media;
236 alter table DefinedTermBase_RecommendedModifierEnumeration add constraint FKA72FB5AED0BDAE9B foreign key (DefinedTermBase_id) references DefinedTermBase;
237 alter table DefinedTermBase_RecommendedModifierEnumeration add constraint FKA72FB5AE5255EAFD foreign key (recommendedmodifierenumeration_id) references TermVocabulary;
238 alter table DefinedTermBase_Representation add constraint FKAAC8AFE6C0DB4934 foreign key (DefinedTermBase_id) references DefinedTermBase;
239 alter table DefinedTermBase_Representation add constraint FKAAC8AFE6B31C4747 foreign key (representations_id) references Representation;
240 alter table DefinedTermBase_StatisticalMeasure add constraint FK6FF15DFCD0BDAE9B foreign key (DefinedTermBase_id) references DefinedTermBase;
241 alter table DefinedTermBase_StatisticalMeasure add constraint FK6FF15DFCC9CD5B57 foreign key (recommendedstatisticalmeasures_id) references DefinedTermBase;
242 alter table DefinedTermBase_SupportedCategoricalEnumeration add constraint FK2170B25CD0BDAE9B foreign key (DefinedTermBase_id) references DefinedTermBase;
243 alter table DefinedTermBase_SupportedCategoricalEnumeration add constraint FK2170B25C5AF2C74 foreign key (supportedcategoricalenumerations_id) references TermVocabulary;
244 alter table DefinedTermBase_WaterbodyOrCountry add constraint FKCAF4393CE5C0F9E foreign key (DefinedTermBase_id) references DefinedTermBase;
245 alter table DefinedTermBase_WaterbodyOrCountry add constraint FKCAF43931603B036 foreign key (waterbodiesorcountries_id) references DefinedTermBase;
246 alter table DerivationEvent add constraint FK426BC03EF7921F6 foreign key (createdby_id) references Agent;
247 alter table DerivationEvent add constraint FK426BC038524B89D foreign key (type_id) references DefinedTermBase;
248 alter table DerivationEvent add constraint FK426BC035BE3EC03 foreign key (updatedby_id) references Agent;
249 alter table DerivationEvent add constraint FK426BC03C04DF64 foreign key (actor_id) references Agent;
250 alter table DerivationEvent_Annotation add constraint FKEFA0D10B4AAB411A foreign key (DerivationEvent_id) references DerivationEvent;
251 alter table DerivationEvent_Annotation add constraint FKEFA0D10B1E403E0B foreign key (annotations_id) references Annotation;
252 alter table DerivationEvent_Marker add constraint FKE412C8164AAB411A foreign key (DerivationEvent_id) references DerivationEvent;
253 alter table DerivationEvent_Marker add constraint FKE412C816777265A1 foreign key (markers_id) references Marker;
254 alter table DescriptionBase add constraint FKFF4D58CDEF7921F6 foreign key (createdby_id) references Agent;
255 alter table DescriptionBase add constraint FKFF4D58CDDA93512F foreign key (taxonName_fk) references TaxonNameBase;
256 alter table DescriptionBase add constraint FKFF4D58CD5BE3EC03 foreign key (updatedby_id) references Agent;
257 alter table DescriptionBase add constraint FKFF4D58CDDE9A3DE3 foreign key (taxon_fk) references TaxonBase;
258 alter table DescriptionBase_Annotation add constraint FKF3AD3201F1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
259 alter table DescriptionBase_Annotation add constraint FKF3AD32011E403E0B foreign key (annotations_id) references Annotation;
260 alter table DescriptionBase_Extension add constraint FKD5D2B32DF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
261 alter table DescriptionBase_Extension add constraint FKD5D2B32D927DE9DF foreign key (extensions_id) references Extension;
262 alter table DescriptionBase_GeoScope add constraint FK3ADD7CD5D86445CE foreign key (DescriptionBase_id) references DescriptionBase;
263 alter table DescriptionBase_GeoScope add constraint FK3ADD7CD586D04E74 foreign key (geoscopes_id) references DefinedTermBase;
264 alter table DescriptionBase_Marker add constraint FK6132140CF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
265 alter table DescriptionBase_Marker add constraint FK6132140C777265A1 foreign key (markers_id) references Marker;
266 alter table DescriptionBase_OriginalSource add constraint FK1E2D0B1EF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
267 alter table DescriptionBase_OriginalSource add constraint FK1E2D0B1E3BAB2414 foreign key (sources_id) references OriginalSource;
268 alter table DescriptionBase_ReferenceBase add constraint FK76188CAAF1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
269 alter table DescriptionBase_ReferenceBase add constraint FK76188CAA45AB7BBA foreign key (descriptionsources_id) references ReferenceBase;
270 alter table DescriptionBase_Rights add constraint FK6A2601A9F1DDBFAB foreign key (DescriptionBase_id) references DescriptionBase;
271 alter table DescriptionBase_Rights add constraint FK6A2601A9C13F7B21 foreign key (rights_id) references Rights;
272 alter table DescriptionBase_Scope add constraint FKB9257C42D86445CE foreign key (DescriptionBase_id) references DescriptionBase;
273 alter table DescriptionBase_Scope add constraint FKB9257C42951A5D40 foreign key (scopes_id) references DefinedTermBase;
274 alter table DescriptionElementBase add constraint FK38FE767134AF0E81 foreign key (indescription_id) references DescriptionBase;
275 alter table DescriptionElementBase add constraint FK38FE76716561D9B1 foreign key (associatedspecimenorobservation_id) references SpecimenOrObservationBase;
276 alter table DescriptionElementBase add constraint FK38FE7671EF7921F6 foreign key (createdby_id) references Agent;
277 alter table DescriptionElementBase add constraint FK38FE767110A80E07 foreign key (unit_id) references DefinedTermBase;
278 alter table DescriptionElementBase add constraint FK38FE76716D0D7A56 foreign key (format_id) references DefinedTermBase;
279 alter table DescriptionElementBase add constraint FK38FE76715E9914B8 foreign key (status_id) references DefinedTermBase;
280 alter table DescriptionElementBase add constraint FK38FE76714220AFEB foreign key (feature_id) references DefinedTermBase;
281 alter table DescriptionElementBase add constraint FK38FE76719803512F foreign key (citation_id) references ReferenceBase;
282 alter table DescriptionElementBase add constraint FK38FE76715BE3EC03 foreign key (updatedby_id) references Agent;
283 alter table DescriptionElementBase add constraint FK38FE76719108D9B foreign key (taxon2_id) references TaxonBase;
284 alter table DescriptionElementBase add constraint FK38FE76711C3C3FF7 foreign key (area_id) references DefinedTermBase;
285 alter table DescriptionElementBase add constraint FK38FE7671E8D36B00 foreign key (language_id) references DefinedTermBase;
286 alter table DescriptionElementBase_Annotation add constraint FK7EE5E5DD3B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
287 alter table DescriptionElementBase_Annotation add constraint FK7EE5E5DD1E403E0B foreign key (annotations_id) references Annotation;
288 alter table DescriptionElementBase_LanguageString add constraint FKC753F137ACF5F60B foreign key (multilanguagetext_id) references LanguageString;
289 alter table DescriptionElementBase_LanguageString add constraint FKC753F137C086B46F foreign key (DescriptionElementBase_id) references DescriptionElementBase;
290 alter table DescriptionElementBase_Marker add constraint FK1CB715E83B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
291 alter table DescriptionElementBase_Marker add constraint FK1CB715E8777265A1 foreign key (markers_id) references Marker;
292 alter table DescriptionElementBase_Media add constraint FK21F70076C2C29593 foreign key (media_id) references Media;
293 alter table DescriptionElementBase_Media add constraint FK21F700763B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
294 alter table DescriptionElementBase_Modifier add constraint FK97E0D105E0960EC4 foreign key (modifiers_id) references DefinedTermBase;
295 alter table DescriptionElementBase_Modifier add constraint FK97E0D1053B8BB609 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
296 alter table DescriptionElementBase_StateData add constraint FK592D6F6D987CC6A4 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
297 alter table DescriptionElementBase_StateData add constraint FK592D6F6D15153604 foreign key (states_id) references StateData;
298 alter table DescriptionElementBase_StatisticalMeasurementValue add constraint FK8AF511C2D883945E foreign key (statisticalvalues_id) references StatisticalMeasurementValue;
299 alter table DescriptionElementBase_StatisticalMeasurementValue add constraint FK8AF511C28F213219 foreign key (DescriptionElementBase_id) references DescriptionElementBase;
300 alter table DeterminationEvent add constraint FK1DB2497EF7921F6 foreign key (createdby_id) references Agent;
301 alter table DeterminationEvent add constraint FK1DB2497378D1BD foreign key (modifier_id) references DefinedTermBase;
302 alter table DeterminationEvent add constraint FK1DB2497DE9A3E39 foreign key (taxon_id) references TaxonBase;
303 alter table DeterminationEvent add constraint FK1DB24974B251DAD foreign key (identifiedunit_id) references SpecimenOrObservationBase;
304 alter table DeterminationEvent add constraint FK1DB24975BE3EC03 foreign key (updatedby_id) references Agent;
305 alter table DeterminationEvent add constraint FK1DB2497C04DF64 foreign key (actor_id) references Agent;
306 alter table DeterminationEvent_Annotation add constraint FKB74F03F76BE0BFDA foreign key (DeterminationEvent_id) references DeterminationEvent;
307 alter table DeterminationEvent_Annotation add constraint FKB74F03F71E403E0B foreign key (annotations_id) references Annotation;
308 alter table DeterminationEvent_Marker add constraint FK5C475102777265A1 foreign key (markers_id) references Marker;
309 alter table DeterminationEvent_Marker add constraint FK5C4751026BE0BFDA foreign key (DeterminationEvent_id) references DeterminationEvent;
310 alter table DeterminationEvent_ReferenceBase add constraint FK6248EEF4F3C981EE foreign key (references_id) references ReferenceBase;
311 alter table DeterminationEvent_ReferenceBase add constraint FK6248EEF46BE0BFDA foreign key (DeterminationEvent_id) references DeterminationEvent;
312 alter table Extension add constraint FK52EF3C1FEF7921F6 foreign key (createdby_id) references Agent;
313 alter table Extension add constraint FK52EF3C1FAD392BD3 foreign key (type_id) references DefinedTermBase;
314 alter table Extension add constraint FK52EF3C1F5BE3EC03 foreign key (updatedby_id) references Agent;
315 alter table FeatureNode add constraint FK4CEED9F8E0AD2C03 foreign key (parent_fk) references FeatureNode;
316 alter table FeatureNode add constraint FK4CEED9F8EF7921F6 foreign key (createdby_id) references Agent;
317 alter table FeatureNode add constraint FK4CEED9F84220AFEB foreign key (feature_id) references DefinedTermBase;
318 alter table FeatureNode add constraint FK4CEED9F85BE3EC03 foreign key (updatedby_id) references Agent;
319 alter table FeatureTree add constraint FK4CF19F94EF7921F6 foreign key (createdby_id) references Agent;
320 alter table FeatureTree add constraint FK4CF19F94B7892921 foreign key (root_id) references FeatureNode;
321 alter table FeatureTree add constraint FK4CF19F945BE3EC03 foreign key (updatedby_id) references Agent;
322 alter table FeatureTree_Representation add constraint FK8C458F847C496CB foreign key (FeatureTree_id) references FeatureTree;
323 alter table FeatureTree_Representation add constraint FK8C458F8B31C4747 foreign key (representations_id) references Representation;
324 alter table GatheringEvent add constraint FK6F1286F3F55AFD89 foreign key (exactlocation_referencesystem_id) references DefinedTermBase;
325 alter table GatheringEvent add constraint FK6F1286F38B455EC6 foreign key (locality_id) references LanguageString;
326 alter table GatheringEvent add constraint FK6F1286F3EF7921F6 foreign key (createdby_id) references Agent;
327 alter table GatheringEvent add constraint FK6F1286F35BE3EC03 foreign key (updatedby_id) references Agent;
328 alter table GatheringEvent add constraint FK6F1286F3C04DF64 foreign key (actor_id) references Agent;
329 alter table GatheringEvent_Annotation add constraint FK76DDD01BF95F225A foreign key (GatheringEvent_id) references GatheringEvent;
330 alter table GatheringEvent_Annotation add constraint FK76DDD01B1E403E0B foreign key (annotations_id) references Annotation;
331 alter table GatheringEvent_DefinedTermBase add constraint FK69D9A11A7C34B6D6 foreign key (collectingareas_id) references DefinedTermBase;
332 alter table GatheringEvent_DefinedTermBase add constraint FK69D9A11AF95F225A foreign key (GatheringEvent_id) references GatheringEvent;
333 alter table GatheringEvent_Marker add constraint FK7B49CF26777265A1 foreign key (markers_id) references Marker;
334 alter table GatheringEvent_Marker add constraint FK7B49CF26F95F225A foreign key (GatheringEvent_id) references GatheringEvent;
335 alter table GenBankAccession add constraint FK86C1DBF8EF7921F6 foreign key (createdby_id) references Agent;
336 alter table GenBankAccession add constraint FK86C1DBF85BE3EC03 foreign key (updatedby_id) references Agent;
337 alter table GrantedAuthorityImpl add constraint FKB05CF928EF7921F6 foreign key (createdby_id) references Agent;
338 alter table HomotypicalGroup add constraint FK7DECCC18EF7921F6 foreign key (createdby_id) references Agent;
339 alter table HomotypicalGroup add constraint FK7DECCC185BE3EC03 foreign key (updatedby_id) references Agent;
340 alter table HomotypicalGroup_Annotation add constraint FK7A0351D6BFEAE500 foreign key (HomotypicalGroup_id) references HomotypicalGroup;
341 alter table HomotypicalGroup_Annotation add constraint FK7A0351D61E403E0B foreign key (annotations_id) references Annotation;
342 alter table HomotypicalGroup_Marker add constraint FK97D36661BFEAE500 foreign key (HomotypicalGroup_id) references HomotypicalGroup;
343 alter table HomotypicalGroup_Marker add constraint FK97D36661777265A1 foreign key (markers_id) references Marker;
344 alter table HybridRelationship add constraint FK9033CE745831BDC3 foreign key (relatedfrom_id) references TaxonNameBase;
345 alter table HybridRelationship add constraint FK9033CE7469ABE292 foreign key (relatedto_id) references TaxonNameBase;
346 alter table HybridRelationship add constraint FK9033CE74EF7921F6 foreign key (createdby_id) references Agent;
347 alter table HybridRelationship add constraint FK9033CE7455F241D4 foreign key (type_id) references DefinedTermBase;
348 alter table HybridRelationship add constraint FK9033CE749803512F foreign key (citation_id) references ReferenceBase;
349 alter table HybridRelationship add constraint FK9033CE745BE3EC03 foreign key (updatedby_id) references Agent;
350 alter table HybridRelationship_Annotation add constraint FK2C7E7DFA59832240 foreign key (HybridRelationship_id) references HybridRelationship;
351 alter table HybridRelationship_Annotation add constraint FK2C7E7DFA1E403E0B foreign key (annotations_id) references Annotation;
352 alter table HybridRelationship_Marker add constraint FKCEF2448559832240 foreign key (HybridRelationship_id) references HybridRelationship;
353 alter table HybridRelationship_Marker add constraint FKCEF24485777265A1 foreign key (markers_id) references Marker;
354 alter table IdentificationKey_Taxon add constraint FKD847ADDC996CD055 foreign key (identificationKey_fk) references Media;
355 alter table IdentificationKey_Taxon add constraint FKD847ADDCDE9A3DE3 foreign key (taxon_fk) references TaxonBase;
356 alter table InstitutionalMembership add constraint FK3C8E1FF9EF7921F6 foreign key (createdby_id) references Agent;
357 alter table InstitutionalMembership add constraint FK3C8E1FF9AAC1B820 foreign key (person_id) references Agent;
358 alter table InstitutionalMembership add constraint FK3C8E1FF916B9CA77 foreign key (institute_id) references Agent;
359 alter table InstitutionalMembership add constraint FK3C8E1FF95BE3EC03 foreign key (updatedby_id) references Agent;
360 alter table LanguageString add constraint FKB5FDC9A9EF7921F6 foreign key (createdby_id) references Agent;
361 alter table LanguageString add constraint FKB5FDC9A95BE3EC03 foreign key (updatedby_id) references Agent;
362 alter table LanguageString add constraint FKB5FDC9A9E8D36B00 foreign key (language_id) references DefinedTermBase;
363 alter table LanguageString_Annotation add constraint FK8400DFA51E403E0B foreign key (annotations_id) references Annotation;
364 alter table LanguageString_Annotation add constraint FK8400DFA537998500 foreign key (LanguageString_id) references LanguageString;
365 alter table LanguageString_Marker add constraint FK8DA633B0777265A1 foreign key (markers_id) references Marker;
366 alter table LanguageString_Marker add constraint FK8DA633B037998500 foreign key (LanguageString_id) references LanguageString;
367 alter table Locus add constraint FK462F1BEEF7921F6 foreign key (createdby_id) references Agent;
368 alter table Locus add constraint FK462F1BE5BE3EC03 foreign key (updatedby_id) references Agent;
369 alter table Marker add constraint FK88F1805AEF7921F6 foreign key (createdby_id) references Agent;
370 alter table Marker add constraint FK88F1805AD64DC020 foreign key (markertype_id) references DefinedTermBase;
371 alter table Marker add constraint FK88F1805A5BE3EC03 foreign key (updatedby_id) references Agent;
372 alter table Media add constraint FK46C7FC4EF7921F6 foreign key (createdby_id) references Agent;
373 alter table Media add constraint FK46C7FC490A4D0D2 foreign key (artist_id) references Agent;
374 alter table Media add constraint FK46C7FC49803512F foreign key (citation_id) references ReferenceBase;
375 alter table Media add constraint FK46C7FC45BE3EC03 foreign key (updatedby_id) references Agent;
376 alter table MediaRepresentation add constraint FK1966BDB1EF7921F6 foreign key (createdby_id) references Agent;
377 alter table MediaRepresentation add constraint FK1966BDB1C2C29593 foreign key (media_id) references Media;
378 alter table MediaRepresentation add constraint FK1966BDB15BE3EC03 foreign key (updatedby_id) references Agent;
379 alter table MediaRepresentationPart add constraint FK67A45544E3818E37 foreign key (representation_id) references MediaRepresentation;
380 alter table MediaRepresentationPart add constraint FK67A45544EF7921F6 foreign key (createdby_id) references Agent;
381 alter table MediaRepresentationPart add constraint FK67A455445BE3EC03 foreign key (updatedby_id) references Agent;
382 alter table Media_Annotation add constraint FKA020DAAAC2C29593 foreign key (Media_id) references Media;
383 alter table Media_Annotation add constraint FKA020DAAA1E403E0B foreign key (annotations_id) references Annotation;
384 alter table Media_DefinedTermBase add constraint FK96F1D7EB8A6C9D18 foreign key (Media_id) references Media;
385 alter table Media_DefinedTermBase add constraint FK96F1D7EB86D04E74 foreign key (geoscopes_id) references DefinedTermBase;
386 alter table Media_Marker add constraint FKD21E7935C2C29593 foreign key (Media_id) references Media;
387 alter table Media_Marker add constraint FKD21E7935777265A1 foreign key (markers_id) references Marker;
388 alter table Media_Rights add constraint FKDB1266D2C2C29593 foreign key (Media_id) references Media;
389 alter table Media_Rights add constraint FKDB1266D2C13F7B21 foreign key (rights_id) references Rights;
390 alter table Media_Sequence add constraint FK61D09FC3282B64 foreign key (Media_id) references Media;
391 alter table Media_Sequence add constraint FK61D09FCF29B4761 foreign key (usedsequences_id) references Sequence;
392 alter table Media_TaxonBase add constraint FK1ABD49E07C3D0017 foreign key (coveredtaxa_id) references TaxonBase;
393 alter table Media_TaxonBase add constraint FK1ABD49E08A6C9D18 foreign key (Media_id) references Media;
394 alter table NameRelationship add constraint FK5E5108316CDFF85 foreign key (relatedfrom_id) references TaxonNameBase;
395 alter table NameRelationship add constraint FK5E5108328482454 foreign key (relatedto_id) references TaxonNameBase;
396 alter table NameRelationship add constraint FK5E51083EF7921F6 foreign key (createdby_id) references Agent;
397 alter table NameRelationship add constraint FK5E51083AF619DE3 foreign key (type_id) references DefinedTermBase;
398 alter table NameRelationship add constraint FK5E510839803512F foreign key (citation_id) references ReferenceBase;
399 alter table NameRelationship add constraint FK5E510835BE3EC03 foreign key (updatedby_id) references Agent;
400 alter table NameRelationship_Annotation add constraint FK2E38AC8B7B4CB560 foreign key (NameRelationship_id) references NameRelationship;
401 alter table NameRelationship_Annotation add constraint FK2E38AC8B1E403E0B foreign key (annotations_id) references Annotation;
402 alter table NameRelationship_Marker add constraint FKE3E463967B4CB560 foreign key (NameRelationship_id) references NameRelationship;
403 alter table NameRelationship_Marker add constraint FKE3E46396777265A1 foreign key (markers_id) references Marker;
404 alter table NomenclaturalStatus add constraint FK1FFEC88BEF7921F6 foreign key (createdby_id) references Agent;
405 alter table NomenclaturalStatus add constraint FK1FFEC88B7029BD9F foreign key (type_id) references DefinedTermBase;
406 alter table NomenclaturalStatus add constraint FK1FFEC88B9803512F foreign key (citation_id) references ReferenceBase;
407 alter table NomenclaturalStatus add constraint FK1FFEC88B5BE3EC03 foreign key (updatedby_id) references Agent;
408 alter table NomenclaturalStatus_Annotation add constraint FKE6E91F838D2CB1D4 foreign key (NomenclaturalStatus_id) references NomenclaturalStatus;
409 alter table NomenclaturalStatus_Annotation add constraint FKE6E91F831E403E0B foreign key (annotations_id) references Annotation;
410 alter table NomenclaturalStatus_Marker add constraint FK2F5128E8D2CB1D4 foreign key (NomenclaturalStatus_id) references NomenclaturalStatus;
411 alter table NomenclaturalStatus_Marker add constraint FK2F5128E777265A1 foreign key (markers_id) references Marker;
412 alter table OriginalSource add constraint FK229A496CEF7921F6 foreign key (createdby_id) references Agent;
413 alter table OriginalSource add constraint FK229A496C9803512F foreign key (citation_id) references ReferenceBase;
414 alter table OriginalSource add constraint FK229A496C5BE3EC03 foreign key (updatedby_id) references Agent;
415 alter table OriginalSource_Annotation add constraint FK5B3FF802DC2DCA20 foreign key (OriginalSource_id) references OriginalSource;
416 alter table OriginalSource_Annotation add constraint FK5B3FF8021E403E0B foreign key (annotations_id) references Annotation;
417 alter table OriginalSource_Marker add constraint FKCF52028DDC2DCA20 foreign key (OriginalSource_id) references OriginalSource;
418 alter table OriginalSource_Marker add constraint FKCF52028D777265A1 foreign key (markers_id) references Marker;
419 alter table PermissionGroup add constraint FK629941D0EF7921F6 foreign key (createdby_id) references Agent;
420 alter table PermissionGroup_GrantedAuthorityImpl add constraint FK5311437CA0971A3 foreign key (PermissionGroup_id) references PermissionGroup;
421 alter table PermissionGroup_GrantedAuthorityImpl add constraint FK53114371857F6C2 foreign key (grantedauthorities_id) references GrantedAuthorityImpl;
422 alter table Person_Keyword add constraint FK5F559EFF13A443BE foreign key (keyword_fk) references DefinedTermBase;
423 alter table Person_Keyword add constraint FK5F559EFFAAC1B7CA foreign key (person_fk) references Agent;
424 create index ReferenceBaseTitleCacheIndex on ReferenceBase (titleCache);
425 alter table ReferenceBase add constraint FK8F034C9C1A488155 foreign key (inbook_id) references ReferenceBase;
426 alter table ReferenceBase add constraint FK8F034C9CEF7921F6 foreign key (createdby_id) references Agent;
427 alter table ReferenceBase add constraint FK8F034C9C403E17F4 foreign key (institution_id) references Agent;
428 alter table ReferenceBase add constraint FK8F034C9CCCE9AAE2 foreign key (inseries_id) references ReferenceBase;
429 alter table ReferenceBase add constraint FK8F034C9CD893F6E6 foreign key (crossref_id) references ReferenceBase;
430 alter table ReferenceBase add constraint FK8F034C9CAEC3B8B8 foreign key (school_id) references Agent;
431 alter table ReferenceBase add constraint FK8F034C9CE3A02620 foreign key (type_id) references DefinedTermBase;
432 alter table ReferenceBase add constraint FK8F034C9CE87E60BF foreign key (inproceedings_id) references ReferenceBase;
433 alter table ReferenceBase add constraint FK8F034C9CE019003F foreign key (injournal_id) references ReferenceBase;
434 alter table ReferenceBase add constraint FK8F034C9C697665E foreign key (authorteam_id) references Agent;
435 alter table ReferenceBase add constraint FK8F034C9C5BE3EC03 foreign key (updatedby_id) references Agent;
436 alter table ReferenceBase_Annotation add constraint FKC97616D2F443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
437 alter table ReferenceBase_Annotation add constraint FKC97616D21E403E0B foreign key (annotations_id) references Annotation;
438 alter table ReferenceBase_Extension add constraint FK81E1703C927DE9DF foreign key (extensions_id) references Extension;
439 alter table ReferenceBase_Extension add constraint FK81E1703CF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
440 alter table ReferenceBase_Marker add constraint FK6888095DF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
441 alter table ReferenceBase_Marker add constraint FK6888095D777265A1 foreign key (markers_id) references Marker;
442 alter table ReferenceBase_Media add constraint FK3D2F4A61C2C29593 foreign key (media_id) references Media;
443 alter table ReferenceBase_Media add constraint FK3D2F4A61F443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
444 alter table ReferenceBase_OriginalSource add constraint FK68651F6F3BAB2414 foreign key (sources_id) references OriginalSource;
445 alter table ReferenceBase_OriginalSource add constraint FK68651F6FF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
446 alter table ReferenceBase_Rights add constraint FK717BF6FAF443DB5A foreign key (ReferenceBase_id) references ReferenceBase;
447 alter table ReferenceBase_Rights add constraint FK717BF6FAC13F7B21 foreign key (rights_id) references Rights;
448 alter table RelationshipTermBase_inverseRepresentation add constraint FK98592F33ECEEF4AF foreign key (DefinedTermBase_id) references DefinedTermBase;
449 alter table RelationshipTermBase_inverseRepresentation add constraint FK98592F33473FB677 foreign key (inverserepresentations_id) references Representation;
450 alter table Representation add constraint FK9C4724EDEF7921F6 foreign key (createdby_id) references Agent;
451 alter table Representation add constraint FK9C4724ED5BE3EC03 foreign key (updatedby_id) references Agent;
452 alter table Representation add constraint FK9C4724EDE8D36B00 foreign key (language_id) references DefinedTermBase;
453 alter table Representation_Annotation add constraint FK371091E147E8AE60 foreign key (Representation_id) references Representation;
454 alter table Representation_Annotation add constraint FK371091E11E403E0B foreign key (annotations_id) references Annotation;
455 alter table Representation_Marker add constraint FK560063EC47E8AE60 foreign key (Representation_id) references Representation;
456 alter table Representation_Marker add constraint FK560063EC777265A1 foreign key (markers_id) references Marker;
457 alter table Rights add constraint FK91E56DF7C5F7EC54 foreign key (agent_id) references Agent;
458 alter table Rights add constraint FK91E56DF7EF7921F6 foreign key (createdby_id) references Agent;
459 alter table Rights add constraint FK91E56DF7E6D2886A foreign key (type_id) references DefinedTermBase;
460 alter table Rights add constraint FK91E56DF75BE3EC03 foreign key (updatedby_id) references Agent;
461 alter table Rights add constraint FK91E56DF7E8D36B00 foreign key (language_id) references DefinedTermBase;
462 alter table Rights_Annotation add constraint FK27CB1E97C13F7B21 foreign key (Rights_id) references Rights;
463 alter table Rights_Annotation add constraint FK27CB1E971E403E0B foreign key (annotations_id) references Annotation;
464 alter table Rights_Marker add constraint FKB739BBA2C13F7B21 foreign key (Rights_id) references Rights;
465 alter table Rights_Marker add constraint FKB739BBA2777265A1 foreign key (markers_id) references Marker;
466 create index sequenceTitleCacheIndex on Sequence (titleCache);
467 alter table Sequence add constraint FK544ADBE1EF7921F6 foreign key (createdby_id) references Agent;
468 alter table Sequence add constraint FK544ADBE1B982A103 foreign key (publishedin_id) references ReferenceBase;
469 alter table Sequence add constraint FK544ADBE12DBE1F1F foreign key (locus_id) references Locus;
470 alter table Sequence add constraint FK544ADBE15BE3EC03 foreign key (updatedby_id) references Agent;
471 alter table Sequence_Annotation add constraint FK1010BA6D1E403E0B foreign key (annotations_id) references Annotation;
472 alter table Sequence_Annotation add constraint FK1010BA6DD57FFDD5 foreign key (Sequence_id) references Sequence;
473 alter table Sequence_Extension add constraint FK7BE66D41927DE9DF foreign key (extensions_id) references Extension;
474 alter table Sequence_Extension add constraint FK7BE66D41D57FFDD5 foreign key (Sequence_id) references Sequence;
475 alter table Sequence_GenBankAccession add constraint FK8F69809615C4EF35 foreign key (genbankaccession_id) references GenBankAccession;
476 alter table Sequence_GenBankAccession add constraint FK8F698096D57FFDD5 foreign key (Sequence_id) references Sequence;
477 alter table Sequence_Marker add constraint FK3D22B278777265A1 foreign key (markers_id) references Marker;
478 alter table Sequence_Marker add constraint FK3D22B278D57FFDD5 foreign key (Sequence_id) references Sequence;
479 alter table Sequence_Media add constraint FK8E5D91E666ACA7EC foreign key (chromatograms_id) references Media;
480 alter table Sequence_Media add constraint FK8E5D91E6D57FFDD5 foreign key (Sequence_id) references Sequence;
481 alter table Sequence_OriginalSource add constraint FKD37E7D8A3BAB2414 foreign key (sources_id) references OriginalSource;
482 alter table Sequence_OriginalSource add constraint FKD37E7D8AD57FFDD5 foreign key (Sequence_id) references Sequence;
483 alter table Sequence_ReferenceBase add constraint FK18D91CBE7291F8A foreign key (citations_id) references ReferenceBase;
484 alter table Sequence_ReferenceBase add constraint FK18D91CBED57FFDD5 foreign key (Sequence_id) references Sequence;
485 alter table Sequence_Rights add constraint FK4616A015C13F7B21 foreign key (rights_id) references Rights;
486 alter table Sequence_Rights add constraint FK4616A015D57FFDD5 foreign key (Sequence_id) references Sequence;
487 create index specimenOrObservationBaseTitleCacheIndex on SpecimenOrObservationBase (titleCache);
488 alter table SpecimenOrObservationBase add constraint FK21CA3272C8505DB foreign key (preservation_id) references DefinedTermBase;
489 alter table SpecimenOrObservationBase add constraint FK21CA3272EF7921F6 foreign key (createdby_id) references Agent;
490 alter table SpecimenOrObservationBase add constraint FK21CA32727CC340C5 foreign key (storedunder_id) references TaxonNameBase;
491 alter table SpecimenOrObservationBase add constraint FK21CA3272EB62BE9A foreign key (collection_id) references Collection;
492 alter table SpecimenOrObservationBase add constraint FK21CA3272E17C9A6B foreign key (sex_id) references DefinedTermBase;
493 alter table SpecimenOrObservationBase add constraint FK21CA32728C750E27 foreign key (lifestage_id) references DefinedTermBase;
494 alter table SpecimenOrObservationBase add constraint FK21CA32724AAB411A foreign key (derivationevent_id) references DerivationEvent;
495 alter table SpecimenOrObservationBase add constraint FK21CA3272F95F225A foreign key (gatheringevent_id) references GatheringEvent;
496 alter table SpecimenOrObservationBase add constraint FK21CA32725BE3EC03 foreign key (updatedby_id) references Agent;
497 alter table SpecimenOrObservationBase_Annotation add constraint FK365E4F3C3B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
498 alter table SpecimenOrObservationBase_Annotation add constraint FK365E4F3C1E403E0B foreign key (annotations_id) references Annotation;
499 alter table SpecimenOrObservationBase_DerivationEvent add constraint FK20132036BD59A1AD foreign key (derivationevents_id) references DerivationEvent;
500 alter table SpecimenOrObservationBase_DerivationEvent add constraint FK2013203654C216AA foreign key (originals_id) references SpecimenOrObservationBase;
501 alter table SpecimenOrObservationBase_Extension add constraint FKE03B82923B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
502 alter table SpecimenOrObservationBase_Extension add constraint FKE03B8292927DE9DF foreign key (extensions_id) references Extension;
503 alter table SpecimenOrObservationBase_Marker add constraint FK8E6106C73B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
504 alter table SpecimenOrObservationBase_Marker add constraint FK8E6106C7777265A1 foreign key (markers_id) references Marker;
505 alter table SpecimenOrObservationBase_Media add constraint FK4EEBF7B73B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
506 alter table SpecimenOrObservationBase_Media add constraint FK4EEBF7B7C2C29593 foreign key (media_id) references Media;
507 alter table SpecimenOrObservationBase_OriginalSource add constraint FK3C4712D93B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
508 alter table SpecimenOrObservationBase_OriginalSource add constraint FK3C4712D93BAB2414 foreign key (sources_id) references OriginalSource;
509 alter table SpecimenOrObservationBase_Rights add constraint FK9754F4643B8A5ABA foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
510 alter table SpecimenOrObservationBase_Rights add constraint FK9754F464C13F7B21 foreign key (rights_id) references Rights;
511 alter table SpecimenOrObservationBase_Sequence add constraint FKBBF27B0E7EE2770E foreign key (SpecimenOrObservationBase_id) references SpecimenOrObservationBase;
512 alter table SpecimenOrObservationBase_Sequence add constraint FKBBF27B0E35B10F24 foreign key (sequences_id) references Sequence;
513 alter table StateData add constraint FKFB1697BBEF7921F6 foreign key (createdby_id) references Agent;
514 alter table StateData add constraint FKFB1697BB682A4E4B foreign key (state_id) references DefinedTermBase;
515 alter table StateData add constraint FKFB1697BB5BE3EC03 foreign key (updatedby_id) references Agent;
516 alter table StateData_DefinedTermBase add constraint FK107321E28E7BF9AB foreign key (StateData_id) references StateData;
517 alter table StateData_DefinedTermBase add constraint FK107321E2E0960EC4 foreign key (modifiers_id) references DefinedTermBase;
518 alter table StatisticalMeasurementValue add constraint FK2DCE0290EF7921F6 foreign key (createdby_id) references Agent;
519 alter table StatisticalMeasurementValue add constraint FK2DCE02904C428112 foreign key (type_id) references DefinedTermBase;
520 alter table StatisticalMeasurementValue add constraint FK2DCE02905BE3EC03 foreign key (updatedby_id) references Agent;
521 alter table StatisticalMeasurementValue_DefinedTermBase add constraint FK686C42B75C9F4F2B foreign key (StatisticalMeasurementValue_id) references StatisticalMeasurementValue;
522 alter table StatisticalMeasurementValue_DefinedTermBase add constraint FK686C42B7E0960EC4 foreign key (modifiers_id) references DefinedTermBase;
523 alter table SynonymRelationship add constraint FKF483ADB34BAC703F foreign key (relatedfrom_id) references TaxonBase;
524 alter table SynonymRelationship add constraint FKF483ADB3F8991B9D foreign key (relatedto_id) references TaxonBase;
525 alter table SynonymRelationship add constraint FKF483ADB3EF7921F6 foreign key (createdby_id) references Agent;
526 alter table SynonymRelationship add constraint FKF483ADB380924EEC foreign key (type_id) references DefinedTermBase;
527 alter table SynonymRelationship add constraint FKF483ADB39803512F foreign key (citation_id) references ReferenceBase;
528 alter table SynonymRelationship add constraint FKF483ADB35BE3EC03 foreign key (updatedby_id) references Agent;
529 alter table SynonymRelationship_Annotation add constraint FKF494F15B260A8379 foreign key (SynonymRelationship_id) references SynonymRelationship;
530 alter table SynonymRelationship_Annotation add constraint FKF494F15B1E403E0B foreign key (annotations_id) references Annotation;
531 alter table SynonymRelationship_Marker add constraint FK7A439066260A8379 foreign key (SynonymRelationship_id) references SynonymRelationship;
532 alter table SynonymRelationship_Marker add constraint FK7A439066777265A1 foreign key (markers_id) references Marker;
533 create index taxonBaseTitleCacheIndex on TaxonBase (titleCache);
534 alter table TaxonBase add constraint FK9249B49BEF7921F6 foreign key (createdby_id) references Agent;
535 alter table TaxonBase add constraint FK9249B49BDA93512F foreign key (taxonName_fk) references TaxonNameBase;
536 alter table TaxonBase add constraint FK9249B49B7C7B5AED foreign key (taxonomicparentcache_id) references TaxonBase;
537 alter table TaxonBase add constraint FK9249B49B5E4A2F85 foreign key (sec_id) references ReferenceBase;
538 alter table TaxonBase add constraint FK9249B49B5BE3EC03 foreign key (updatedby_id) references Agent;
539 alter table TaxonBase_Annotation add constraint FK41ED09739C9D39 foreign key (TaxonBase_id) references TaxonBase;
540 alter table TaxonBase_Annotation add constraint FK41ED09731E403E0B foreign key (annotations_id) references Annotation;
541 alter table TaxonBase_Extension add constraint FKF961257B927DE9DF foreign key (extensions_id) references Extension;
542 alter table TaxonBase_Extension add constraint FKF961257B9C9D39 foreign key (TaxonBase_id) references TaxonBase;
543 alter table TaxonBase_Marker add constraint FK5CDB747E9C9D39 foreign key (TaxonBase_id) references TaxonBase;
544 alter table TaxonBase_Marker add constraint FK5CDB747E777265A1 foreign key (markers_id) references Marker;
545 alter table TaxonBase_OriginalSource add constraint FK10EFD9903BAB2414 foreign key (sources_id) references OriginalSource;
546 alter table TaxonBase_OriginalSource add constraint FK10EFD9909C9D39 foreign key (TaxonBase_id) references TaxonBase;
547 alter table TaxonBase_Rights add constraint FK65CF621BC13F7B21 foreign key (rights_id) references Rights;
548 alter table TaxonBase_Rights add constraint FK65CF621B9C9D39 foreign key (TaxonBase_id) references TaxonBase;
549 create index taxonNameBaseTitleCacheIndex on TaxonNameBase (titleCache);
550 alter table TaxonNameBase add constraint FKB4870C6EF7921F6 foreign key (createdby_id) references Agent;
551 alter table TaxonNameBase add constraint FKB4870C62B4FEDD6 foreign key (basionymauthorteam_id) references Agent;
552 alter table TaxonNameBase add constraint FKB4870C64AC9C024 foreign key (nomenclaturalreference_id) references ReferenceBase;
553 alter table TaxonNameBase add constraint FKB4870C6B14B73EF foreign key (combinationauthorteam_id) references Agent;
554 alter table TaxonNameBase add constraint FKB4870C6BFEAE500 foreign key (homotypicalgroup_id) references HomotypicalGroup;
555 alter table TaxonNameBase add constraint FKB4870C662AD57A2 foreign key (excombinationauthorteam_id) references Agent;
556 alter table TaxonNameBase add constraint FKB4870C67F90DF03 foreign key (exbasionymauthorteam_id) references Agent;
557 alter table TaxonNameBase add constraint FKB4870C65BE3EC03 foreign key (updatedby_id) references Agent;
558 alter table TaxonNameBase add constraint FKB4870C6D7BE55A0 foreign key (rank_id) references DefinedTermBase;
559 alter table TaxonNameBase_Annotation add constraint FK9E7794688C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
560 alter table TaxonNameBase_Annotation add constraint FK9E7794681E403E0B foreign key (annotations_id) references Annotation;
561 alter table TaxonNameBase_Extension add constraint FKC28EE7E6927DE9DF foreign key (extensions_id) references Extension;
562 alter table TaxonNameBase_Extension add constraint FKC28EE7E68C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
563 alter table TaxonNameBase_HybridRelationship add constraint FK371B728D2D57C7D5 foreign key (hybridrelationships_id) references HybridRelationship;
564 alter table TaxonNameBase_HybridRelationship add constraint FK371B728DCDE98DD2 foreign key (TaxonNameBase_id) references TaxonNameBase;
565 alter table TaxonNameBase_Marker add constraint FK39E3C1F38C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
566 alter table TaxonNameBase_Marker add constraint FK39E3C1F3777265A1 foreign key (markers_id) references Marker;
567 alter table TaxonNameBase_NomenclaturalStatus add constraint FK560BA7926615E90D foreign key (status_id) references NomenclaturalStatus;
568 alter table TaxonNameBase_NomenclaturalStatus add constraint FK560BA7928C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
569 alter table TaxonNameBase_OriginalSource add constraint FKBEA1E2053BAB2414 foreign key (sources_id) references OriginalSource;
570 alter table TaxonNameBase_OriginalSource add constraint FKBEA1E2058C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
571 alter table TaxonNameBase_Rights add constraint FK42D7AF90C13F7B21 foreign key (rights_id) references Rights;
572 alter table TaxonNameBase_Rights add constraint FK42D7AF908C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
573 alter table TaxonNameBase_TypeDesignationBase add constraint FKC0D6BBB5C7DF530C foreign key (typedesignations_id) references TypeDesignationBase;
574 alter table TaxonNameBase_TypeDesignationBase add constraint FKC0D6BBB58C85CF94 foreign key (TaxonNameBase_id) references TaxonNameBase;
575 alter table TaxonRelationship add constraint FK7482BA02E71EF6CE foreign key (relatedfrom_id) references TaxonBase;
576 alter table TaxonRelationship add constraint FK7482BA02F8991B9D foreign key (relatedto_id) references TaxonBase;
577 alter table TaxonRelationship add constraint FK7482BA02EF7921F6 foreign key (createdby_id) references Agent;
578 alter table TaxonRelationship add constraint FK7482BA02F11BD77B foreign key (type_id) references DefinedTermBase;
579 alter table TaxonRelationship add constraint FK7482BA029803512F foreign key (citation_id) references ReferenceBase;
580 alter table TaxonRelationship add constraint FK7482BA025BE3EC03 foreign key (updatedby_id) references Agent;
581 alter table TaxonRelationship_Annotation add constraint FK82C86DAC1E403E0B foreign key (annotations_id) references Annotation;
582 alter table TaxonRelationship_Annotation add constraint FK82C86DAC2BD180D9 foreign key (TaxonRelationship_id) references TaxonRelationship;
583 alter table TaxonRelationship_Marker add constraint FK69FBDD37777265A1 foreign key (markers_id) references Marker;
584 alter table TaxonRelationship_Marker add constraint FK69FBDD372BD180D9 foreign key (TaxonRelationship_id) references TaxonRelationship;
585 alter table TermVocabulary add constraint FK487AA692EF7921F6 foreign key (createdby_id) references Agent;
586 alter table TermVocabulary add constraint FK487AA6925BE3EC03 foreign key (updatedby_id) references Agent;
587 alter table TermVocabulary_Representation add constraint FKA408B63A258E060 foreign key (TermVocabulary_id) references TermVocabulary;
588 alter table TermVocabulary_Representation add constraint FKA408B63AB31C4747 foreign key (representations_id) references Representation;
589 alter table TypeDesignationBase add constraint FK8AC9DCAE2FB99E97 foreign key (typestatus_id) references DefinedTermBase;
590 alter table TypeDesignationBase add constraint FK8AC9DCAEEF7921F6 foreign key (createdby_id) references Agent;
591 alter table TypeDesignationBase add constraint FK8AC9DCAE94DB044A foreign key (typespecimen_id) references SpecimenOrObservationBase;
592 alter table TypeDesignationBase add constraint FK8AC9DCAEBFEAE500 foreign key (homotypicalgroup_id) references HomotypicalGroup;
593 alter table TypeDesignationBase add constraint FK8AC9DCAE9803512F foreign key (citation_id) references ReferenceBase;
594 alter table TypeDesignationBase add constraint FK8AC9DCAE4CB0F315 foreign key (typename_id) references TaxonNameBase;
595 alter table TypeDesignationBase add constraint FK8AC9DCAE5BE3EC03 foreign key (updatedby_id) references Agent;
596 alter table TypeDesignationBase_Annotation add constraint FK4D73278044E9E6D4 foreign key (TypeDesignationBase_id) references TypeDesignationBase;
597 alter table TypeDesignationBase_Annotation add constraint FK4D7327801E403E0B foreign key (annotations_id) references Annotation;
598 alter table TypeDesignationBase_Marker add constraint FKB914A10B44E9E6D4 foreign key (TypeDesignationBase_id) references TypeDesignationBase;
599 alter table TypeDesignationBase_Marker add constraint FKB914A10B777265A1 foreign key (markers_id) references Marker;
600 alter table TypeDesignationBase_TaxonNameBase add constraint FKF61156F54D901A92 foreign key (typifiednames_id) references TaxonNameBase;
601 alter table TypeDesignationBase_TaxonNameBase add constraint FKF61156F544E9E6D4 foreign key (TypeDesignationBase_id) references TypeDesignationBase;
602 alter table User add constraint FK285FEBEF7921F6 foreign key (createdby_id) references Agent;
603 alter table User_GrantedAuthorityImpl add constraint FKA2FB64FCCF9BC520 foreign key (User_id) references User;
604 alter table User_GrantedAuthorityImpl add constraint FKA2FB64FC1857F6C2 foreign key (grantedauthorities_id) references GrantedAuthorityImpl;
605 alter table User_PermissionGroup add constraint FKDD33C17CDA9DCB5F foreign key (groups_id) references PermissionGroup;
606 alter table User_PermissionGroup add constraint FKDD33C17C887E3D12 foreign key (members_id) references User;