Changes related to refactoring of Auditing info, including auto-population of created...
authorben.clark <ben.clark@localhost>
Thu, 5 Mar 2009 11:38:56 +0000 (11:38 +0000)
committerben.clark <ben.clark@localhost>
Thu, 5 Mar 2009 11:38:56 +0000 (11:38 +0000)
cdmlib-services/src/test/java/eu/etaxonomy/cdm/test/function/TestDatabase.java
cdmlib-services/src/test/java/eu/etaxonomy/cdm/test/integration/CreateDataTest.java
cdmlib-services/src/test/resources/dbscripts/001_cdm.ddl
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/PUBLIC.xsd
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/dataset.xsd

index 90addc44988088610d42c9712163a4d7e28c8835..ad98164f71d7254d51a554708c7e498149fcc41c 100644 (file)
@@ -276,7 +276,7 @@ public class TestDatabase {
                        botName.setGenusOrUninomial("Genus");\r
                        botName.setSpecificEpithet("species");\r
                        appCtr.getNameService().save(botName);\r
-                       botName.testPrepersist();\r
+//                     botName.testPrepersist();\r
                        java.util.List<?> names = appCtr.getNameService().findNamesByTitle("Genus species");\r
                        names.size();\r
 //                     AgentBase person = Person.NewTitledInstance("TestPerson");\r
index 69a4ea18446dad9b57b1811c5a6afb31601e379b..c2cb3ce23b33b70f9a4b71b9f45636a549d8cfad 100644 (file)
@@ -9,6 +9,8 @@ import java.util.UUID;
 import org.apache.log4j.Logger;\r
 import static org.junit.Assert.*;\r
 \r
+import org.joda.time.DateTime;\r
+\r
 import org.junit.Ignore;\r
 import org.junit.Test;\r
 import org.junit.After;\r
@@ -206,7 +208,7 @@ public class CreateDataTest {
                Taxon genusTaxon = (Taxon)taxonService.getTaxonByUuid(UUID.fromString(genusUuid));\r
                BotanicalName genusName = (BotanicalName)genusTaxon.getName();\r
                genusName.setGenusOrUninomial("newGenusUninomial");\r
-               genusName.setUpdated(Calendar.getInstance());\r
+               genusName.setUpdated(new DateTime());\r
                BotanicalName newName = BotanicalName.NewInstance(Rank.SPECIES());\r
                Taxon newTaxon = Taxon.NewInstance(newName, genusTaxon.getSec());\r
                genusTaxon.addTaxonomicChild(newTaxon, null, "5677");\r
index e4d7aa44689f60746d99087df6cdc85dc8300cfc..4e4fdb0dd5101af684f4537ea5eb97ecc3943f99 100644 (file)
         titleCache varchar(255),
         createdby_id integer,
         updatedby_id integer,
+        code varchar(255),
+        name varchar(255),
+        ispartof_id integer,
         nomenclaturaltitle varchar(255),
-        protectednomenclaturaltitlecache bit,
         firstname varchar(255),
         lastname varchar(255),
         lifespan_end varchar(255),
         lifespan_start varchar(255),
         prefix varchar(255),
         suffix varchar(255),
-        code varchar(255),
-        name varchar(255),
-        ispartof_id integer,
+        protectednomenclaturaltitlecache bit,
         primary key (id, REV)
     );
 
         kindof_id integer,
         partof_id integer,
         vocabulary_id integer,
-        iso639_1 varchar(2),
-        iso639_2 varchar(3),
         orderindex integer,
         pointapproximation_errorradius integer,
         pointapproximation_latitude double,
         supportsquantitativedata bit,
         supportstaxoninteraction bit,
         supportstextdata bit,
-        iso3166_a2 varchar(2),
-        defaultcolor varchar(255),
+        iso639_1 varchar(2),
+        iso639_2 varchar(3),
         symmetric bit,
         transitive bit,
+        defaultcolor varchar(255),
+        iso3166_a2 varchar(2),
         primary key (id, REV)
     );
 
         citation_id integer,
         feature_id integer,
         indescription_id integer,
+        area_id integer,
+        status_id integer,
+        unit_id integer,
         name varchar(255),
         language_id integer,
-        unit_id integer,
-        orderrelevant bit,
-        associatedspecimenorobservation_id integer,
         taxon2_id integer,
-        area_id integer,
-        status_id integer,
+        associatedspecimenorobservation_id integer,
         format_id integer,
+        orderrelevant bit,
         primary key (id, REV)
     );
 
         createdby_id integer,
         updatedby_id integer,
         representation_id integer,
-        duration integer,
         height integer,
         width integer,
+        duration integer,
         primary key (id, REV)
     );
 
         createdby_id integer,
         updatedby_id integer,
         authorteam_id integer,
-        datepublished_end varchar(255),
-        datepublished_start varchar(255),
-        title varchar(255),
         address varchar(255),
         annote varchar(255),
         booktitle varchar(255),
         reporttype varchar(255),
         school varchar(255),
         series varchar(255),
+        title varchar(255),
         volume varchar(255),
         year varchar(255),
         crossref_id integer,
         type_id integer,
+        datepublished_end varchar(255),
+        datepublished_start varchar(255),
+        inbook_id integer,
+        inproceedings_id integer,
         placepublished varchar(255),
         institution_id integer,
-        school_id integer,
-        issn varchar(255),
-        injournal_id integer,
-        inproceedings_id integer,
-        inbook_id integer,
         seriespart varchar(255),
         inseries_id integer,
         isbn varchar(255),
+        school_id integer,
+        issn varchar(255),
+        injournal_id integer,
         primary key (id, REV)
     );
 
         password varchar(255),
         username varchar(255),
         createdby_id integer,
+        person_id integer,
         primary key (id),
         unique (username)
     );
 
+    create table User_AUD (
+        id integer not null,
+        REV integer not null,
+        revtype tinyint,
+        created timestamp,
+        uuid varchar(255),
+        accountnonexpired bit,
+        accountnonlocked bit,
+        credentialsnonexpired bit,
+        emailaddress varchar(255),
+        enabled bit,
+        username varchar(255),
+        createdby_id integer,
+        person_id integer,
+        primary key (id, REV)
+    );
+
     create table User_GrantedAuthorityImpl (
         User_id integer not null,
         grantedauthorities_id integer not null,
         references DefinedTermBase;
 
     alter table Address 
-        add constraint FK1ED033D4EF7921F6 
+        add constraint FK1ED033D44FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Address 
         add constraint FK1ED033D42687715A 
         references DefinedTermBase;
 
     alter table Address 
-        add constraint FK1ED033D45BE3EC03 
+        add constraint FK1ED033D4BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Address_AUD 
         add constraint FK115657A534869AAE 
     create index agentTitleCacheIndex on AgentBase (titleCache);
 
     alter table AgentBase 
-        add constraint FK1205D356EF7921F6 
+        add constraint FK1205D3564FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table AgentBase 
         add constraint FK1205D356A830578 
         references AgentBase;
 
     alter table AgentBase 
-        add constraint FK1205D3565BE3EC03 
+        add constraint FK1205D356BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table AgentBase_AUD 
         add constraint FK29CC662734869AAE 
         references DefinedTermBase;
 
     alter table Annotation 
-        add constraint FK1A21C74FEF7921F6 
+        add constraint FK1A21C74F4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Annotation 
         add constraint FK1A21C74FE7692740 
         references AgentBase;
 
     alter table Annotation 
-        add constraint FK1A21C74F5BE3EC03 
+        add constraint FK1A21C74FBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Annotation 
         add constraint FK1A21C74FE8D36B00 
         references ReferenceBase;
 
     alter table CDM_VIEW 
-        add constraint FKC5DE8EF8EF7921F6 
+        add constraint FKC5DE8EF84FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table CDM_VIEW_CDM_VIEW 
         add constraint FK230A885F7208BB38 
         references Collection;
 
     alter table Collection 
-        add constraint FKF078ABEEF7921F6 
+        add constraint FKF078ABE4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Collection 
         add constraint FKF078ABE16B9CA77 
         references AgentBase;
 
     alter table Collection 
-        add constraint FKF078ABE5BE3EC03 
+        add constraint FKF078ABEBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Collection_AUD 
         add constraint FKD6D4298F34869AAE 
         references DefinedTermBase;
 
     alter table DefinedTermBase 
-        add constraint FK2E340A66EF7921F6 
+        add constraint FK2E340A664FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table DefinedTermBase 
         add constraint FK2E340A6688206484 
         references DefinedTermBase;
 
     alter table DefinedTermBase 
-        add constraint FK2E340A665BE3EC03 
+        add constraint FK2E340A66BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table DefinedTermBase 
         add constraint FK2E340A66CC0240B6 
         references AuditEvent;
 
     alter table DerivationEvent 
-        add constraint FK426BC03EF7921F6 
+        add constraint FK426BC034FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table DerivationEvent 
         add constraint FK426BC038524B89D 
         references DefinedTermBase;
 
     alter table DerivationEvent 
-        add constraint FK426BC035BE3EC03 
+        add constraint FK426BC03BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table DerivationEvent 
         add constraint FK426BC033DA462D5 
         references AuditEvent;
 
     alter table DescriptionBase 
-        add constraint FKFF4D58CDEF7921F6 
+        add constraint FKFF4D58CD4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table DescriptionBase 
         add constraint FKFF4D58CDDA93512F 
         references TaxonNameBase;
 
     alter table DescriptionBase 
-        add constraint FKFF4D58CD5BE3EC03 
+        add constraint FKFF4D58CDBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table DescriptionBase 
         add constraint FKFF4D58CDDE9A3DE3 
         references SpecimenOrObservationBase;
 
     alter table DescriptionElementBase 
-        add constraint FK38FE7671EF7921F6 
+        add constraint FK38FE76714FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table DescriptionElementBase 
         add constraint FK38FE767110A80E07 
         references ReferenceBase;
 
     alter table DescriptionElementBase 
-        add constraint FK38FE76715BE3EC03 
+        add constraint FK38FE7671BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table DescriptionElementBase 
         add constraint FK38FE76719108D9B 
         references AuditEvent;
 
     alter table DeterminationEvent 
-        add constraint FK1DB2497EF7921F6 
+        add constraint FK1DB24974FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table DeterminationEvent 
         add constraint FK1DB2497378D1BD 
         references SpecimenOrObservationBase;
 
     alter table DeterminationEvent 
-        add constraint FK1DB24975BE3EC03 
+        add constraint FK1DB2497BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table DeterminationEvent 
         add constraint FK1DB24973DA462D5 
         references AuditEvent;
 
     alter table Extension 
-        add constraint FK52EF3C1FEF7921F6 
+        add constraint FK52EF3C1F4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Extension 
         add constraint FK52EF3C1FAD392BD3 
         references DefinedTermBase;
 
     alter table Extension 
-        add constraint FK52EF3C1F5BE3EC03 
+        add constraint FK52EF3C1FBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Extension_AUD 
         add constraint FK92D2427034869AAE 
         references FeatureNode;
 
     alter table FeatureNode 
-        add constraint FK4CEED9F8EF7921F6 
+        add constraint FK4CEED9F84FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table FeatureNode 
         add constraint FK4CEED9F84220AFEB 
         references DefinedTermBase;
 
     alter table FeatureNode 
-        add constraint FK4CEED9F85BE3EC03 
+        add constraint FK4CEED9F8BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table FeatureNode_AUD 
         add constraint FK25AD4BC934869AAE 
         references AuditEvent;
 
     alter table FeatureTree 
-        add constraint FK4CF19F94EF7921F6 
+        add constraint FK4CF19F944FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table FeatureTree 
         add constraint FK4CF19F94B7892921 
         references FeatureNode;
 
     alter table FeatureTree 
-        add constraint FK4CF19F945BE3EC03 
+        add constraint FK4CF19F94BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table FeatureTree_AUD 
         add constraint FK355BE36534869AAE 
         references LanguageString;
 
     alter table GatheringEvent 
-        add constraint FK6F1286F3EF7921F6 
+        add constraint FK6F1286F34FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table GatheringEvent 
-        add constraint FK6F1286F35BE3EC03 
+        add constraint FK6F1286F3BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table GatheringEvent 
         add constraint FK6F1286F33DA462D5 
         references AuditEvent;
 
     alter table GenBankAccession 
-        add constraint FK86C1DBF8EF7921F6 
+        add constraint FK86C1DBF84FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table GenBankAccession 
-        add constraint FK86C1DBF85BE3EC03 
+        add constraint FK86C1DBF8BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table GenBankAccession_AUD 
         add constraint FK5A2F4DC934869AAE 
         references AuditEvent;
 
     alter table GrantedAuthorityImpl 
-        add constraint FKB05CF928EF7921F6 
+        add constraint FKB05CF9284FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table HomotypicalGroup 
-        add constraint FK7DECCC18EF7921F6 
+        add constraint FK7DECCC184FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table HomotypicalGroup 
-        add constraint FK7DECCC185BE3EC03 
+        add constraint FK7DECCC18BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table HomotypicalGroup_AUD 
         add constraint FKE4252DE934869AAE 
         references TaxonNameBase;
 
     alter table HybridRelationship 
-        add constraint FK9033CE74EF7921F6 
+        add constraint FK9033CE744FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table HybridRelationship 
         add constraint FK9033CE7455F241D4 
         references ReferenceBase;
 
     alter table HybridRelationship 
-        add constraint FK9033CE745BE3EC03 
+        add constraint FK9033CE74BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table HybridRelationship_AUD 
         add constraint FK9C2BA24534869AAE 
         references AuditEvent;
 
     alter table InstitutionalMembership 
-        add constraint FK3C8E1FF9EF7921F6 
+        add constraint FK3C8E1FF94FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table InstitutionalMembership 
         add constraint FK3C8E1FF9AAC1B820 
         references AgentBase;
 
     alter table InstitutionalMembership 
-        add constraint FK3C8E1FF95BE3EC03 
+        add constraint FK3C8E1FF9BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table InstitutionalMembership_AUD 
         add constraint FK847A94A34869AAE 
         references AuditEvent;
 
     alter table LSIDAuthority 
-        add constraint FK759DB881EF7921F6 
+        add constraint FK759DB8814FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table LSIDAuthority_namespaces 
         add constraint FKB04948F64FFCFD94 
         references LSIDAuthority;
 
     alter table LanguageString 
-        add constraint FKB5FDC9A9EF7921F6 
+        add constraint FKB5FDC9A94FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table LanguageString 
-        add constraint FKB5FDC9A95BE3EC03 
+        add constraint FKB5FDC9A9BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table LanguageString 
         add constraint FKB5FDC9A9E8D36B00 
         references AuditEvent;
 
     alter table Locus 
-        add constraint FK462F1BEEF7921F6 
+        add constraint FK462F1BE4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Locus 
-        add constraint FK462F1BE5BE3EC03 
+        add constraint FK462F1BEBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Locus_AUD 
         add constraint FK5224108F34869AAE 
         references AuditEvent;
 
     alter table Marker 
-        add constraint FK88F1805AEF7921F6 
+        add constraint FK88F1805A4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Marker 
         add constraint FK88F1805AD64DC020 
         references DefinedTermBase;
 
     alter table Marker 
-        add constraint FK88F1805A5BE3EC03 
+        add constraint FK88F1805ABC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Marker_AUD 
         add constraint FKB951F12B34869AAE 
         references AuditEvent;
 
     alter table Media 
-        add constraint FK46C7FC4EF7921F6 
+        add constraint FK46C7FC44FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Media 
         add constraint FK46C7FC4C2445443 
         references ReferenceBase;
 
     alter table Media 
-        add constraint FK46C7FC45BE3EC03 
+        add constraint FK46C7FC4BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table MediaRepresentation 
-        add constraint FK1966BDB1EF7921F6 
+        add constraint FK1966BDB14FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table MediaRepresentation 
         add constraint FK1966BDB1C2C29593 
         references Media;
 
     alter table MediaRepresentation 
-        add constraint FK1966BDB15BE3EC03 
+        add constraint FK1966BDB1BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table MediaRepresentationPart 
         add constraint FK67A45544E3818E37 
         references MediaRepresentation;
 
     alter table MediaRepresentationPart 
-        add constraint FK67A45544EF7921F6 
+        add constraint FK67A455444FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table MediaRepresentationPart 
-        add constraint FK67A455445BE3EC03 
+        add constraint FK67A45544BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table MediaRepresentationPart_AUD 
         add constraint FKA75C411534869AAE 
         references TaxonNameBase;
 
     alter table NameRelationship 
-        add constraint FK5E51083EF7921F6 
+        add constraint FK5E510834FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table NameRelationship 
         add constraint FK5E51083AF619DE3 
         references ReferenceBase;
 
     alter table NameRelationship 
-        add constraint FK5E510835BE3EC03 
+        add constraint FK5E51083BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table NameRelationship_AUD 
         add constraint FK743F44D434869AAE 
         references AuditEvent;
 
     alter table NomenclaturalStatus 
-        add constraint FK1FFEC88BEF7921F6 
+        add constraint FK1FFEC88B4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table NomenclaturalStatus 
         add constraint FK1FFEC88B7029BD9F 
         references ReferenceBase;
 
     alter table NomenclaturalStatus 
-        add constraint FK1FFEC88B5BE3EC03 
+        add constraint FK1FFEC88BBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table NomenclaturalStatus_AUD 
         add constraint FKFB2DB8DC34869AAE 
         references AuditEvent;
 
     alter table OriginalSource 
-        add constraint FK229A496CEF7921F6 
+        add constraint FK229A496C4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table OriginalSource 
         add constraint FK229A496C9803512F 
         references ReferenceBase;
 
     alter table OriginalSource 
-        add constraint FK229A496C5BE3EC03 
+        add constraint FK229A496CBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table OriginalSource_AUD 
         add constraint FK506BE13D34869AAE 
         references AuditEvent;
 
     alter table PermissionGroup 
-        add constraint FK629941D0EF7921F6 
+        add constraint FK629941D04FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table PermissionGroup_GrantedAuthorityImpl 
         add constraint FK5311437CA0971A3 
         references ReferenceBase;
 
     alter table ReferenceBase 
-        add constraint FK8F034C9CEF7921F6 
+        add constraint FK8F034C9C4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table ReferenceBase 
         add constraint FK8F034C9C403E17F4 
         references AgentBase;
 
     alter table ReferenceBase 
-        add constraint FK8F034C9C5BE3EC03 
+        add constraint FK8F034C9CBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table ReferenceBase_AUD 
         add constraint FK8D3FCC6D34869AAE 
         references AuditEvent;
 
     alter table Representation 
-        add constraint FK9C4724EDEF7921F6 
+        add constraint FK9C4724ED4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Representation 
-        add constraint FK9C4724ED5BE3EC03 
+        add constraint FK9C4724EDBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Representation 
         add constraint FK9C4724EDE8D36B00 
         references AgentBase;
 
     alter table Rights 
-        add constraint FK91E56DF7EF7921F6 
+        add constraint FK91E56DF74FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Rights 
         add constraint FK91E56DF7E6D2886A 
         references DefinedTermBase;
 
     alter table Rights 
-        add constraint FK91E56DF75BE3EC03 
+        add constraint FK91E56DF7BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Rights 
         add constraint FK91E56DF7E8D36B00 
     create index sequenceTitleCacheIndex on Sequence (titleCache);
 
     alter table Sequence 
-        add constraint FK544ADBE1EF7921F6 
+        add constraint FK544ADBE14FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table Sequence 
         add constraint FK544ADBE1B982A103 
         references Locus;
 
     alter table Sequence 
-        add constraint FK544ADBE15BE3EC03 
+        add constraint FK544ADBE1BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table Sequence_AUD 
         add constraint FK39F4313234869AAE 
         references DefinedTermBase;
 
     alter table SpecimenOrObservationBase 
-        add constraint FK21CA3272EF7921F6 
+        add constraint FK21CA32724FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table SpecimenOrObservationBase 
         add constraint FK21CA32727CC340C5 
         references GatheringEvent;
 
     alter table SpecimenOrObservationBase 
-        add constraint FK21CA32725BE3EC03 
+        add constraint FK21CA3272BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table SpecimenOrObservationBase_AUD 
         add constraint FKF3D3D74334869AAE 
         references AuditEvent;
 
     alter table StateData 
-        add constraint FKFB1697BBEF7921F6 
+        add constraint FKFB1697BB4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table StateData 
         add constraint FKFB1697BB682A4E4B 
         references DefinedTermBase;
 
     alter table StateData 
-        add constraint FKFB1697BB5BE3EC03 
+        add constraint FKFB1697BBBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table StateData_AUD 
         add constraint FKDA6A700C34869AAE 
         references AuditEvent;
 
     alter table StatisticalMeasurementValue 
-        add constraint FK2DCE0290EF7921F6 
+        add constraint FK2DCE02904FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table StatisticalMeasurementValue 
         add constraint FK2DCE02904C428112 
         references DefinedTermBase;
 
     alter table StatisticalMeasurementValue 
-        add constraint FK2DCE02905BE3EC03 
+        add constraint FK2DCE0290BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table StatisticalMeasurementValue_AUD 
         add constraint FKBB16686134869AAE 
         references TaxonBase;
 
     alter table SynonymRelationship 
-        add constraint FKF483ADB3EF7921F6 
+        add constraint FKF483ADB34FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table SynonymRelationship 
         add constraint FKF483ADB380924EEC 
         references ReferenceBase;
 
     alter table SynonymRelationship 
-        add constraint FKF483ADB35BE3EC03 
+        add constraint FKF483ADB3BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table SynonymRelationship_AUD 
         add constraint FK8AEBCA0434869AAE 
     create index taxonBaseTitleCacheIndex on TaxonBase (titleCache);
 
     alter table TaxonBase 
-        add constraint FK9249B49BEF7921F6 
+        add constraint FK9249B49B4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table TaxonBase 
         add constraint FK9249B49BDA93512F 
         references ReferenceBase;
 
     alter table TaxonBase 
-        add constraint FK9249B49B5BE3EC03 
+        add constraint FK9249B49BBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table TaxonBase_AUD 
         add constraint FK37041CEC34869AAE 
     create index taxonNameBaseTitleCacheIndex on TaxonNameBase (titleCache);
 
     alter table TaxonNameBase 
-        add constraint FKB4870C6EF7921F6 
+        add constraint FKB4870C64FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table TaxonNameBase 
         add constraint FKB4870C62B4FEDD6 
         references AgentBase;
 
     alter table TaxonNameBase 
-        add constraint FKB4870C65BE3EC03 
+        add constraint FKB4870C6BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table TaxonNameBase 
         add constraint FKB4870C6D7BE55A0 
         references TaxonBase;
 
     alter table TaxonRelationship 
-        add constraint FK7482BA02EF7921F6 
+        add constraint FK7482BA024FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table TaxonRelationship 
         add constraint FK7482BA02F11BD77B 
         references ReferenceBase;
 
     alter table TaxonRelationship 
-        add constraint FK7482BA025BE3EC03 
+        add constraint FK7482BA02BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table TaxonRelationship_AUD 
         add constraint FKA0DE16D334869AAE 
         references AuditEvent;
 
     alter table TermVocabulary 
-        add constraint FK487AA692EF7921F6 
+        add constraint FK487AA6924FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table TermVocabulary 
-        add constraint FK487AA6925BE3EC03 
+        add constraint FK487AA692BC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table TermVocabulary_AUD 
         add constraint FKA6ED3B6334869AAE 
         references DefinedTermBase;
 
     alter table TypeDesignationBase 
-        add constraint FK8AC9DCAEEF7921F6 
+        add constraint FK8AC9DCAE4FF2DB2C 
         foreign key (createdby_id) 
-        references AgentBase;
+        references User;
 
     alter table TypeDesignationBase 
         add constraint FK8AC9DCAE94DB044A 
         references TaxonNameBase;
 
     alter table TypeDesignationBase 
-        add constraint FK8AC9DCAE5BE3EC03 
+        add constraint FK8AC9DCAEBC5DA539 
         foreign key (updatedby_id) 
-        references AgentBase;
+        references User;
 
     alter table TypeDesignationBase_AUD 
         add constraint FK243C037F34869AAE 
         references AuditEvent;
 
     alter table User 
-        add constraint FK285FEBEF7921F6 
+        add constraint FK285FEB4FF2DB2C 
         foreign key (createdby_id) 
+        references User;
+
+    alter table User 
+        add constraint FK285FEBAAC1B820 
+        foreign key (person_id) 
         references AgentBase;
 
+    alter table User_AUD 
+        add constraint FKF3FCA03C34869AAE 
+        foreign key (REV) 
+        references AuditEvent;
+
     alter table User_GrantedAuthorityImpl 
         add constraint FKA2FB64FCCF9BC520 
         foreign key (User_id) 
index a3ee9787ca75b9bd7ac07a01b769493e871737ab..ac2a3905d32621e2e438c5abcdb63a0fbf03e4a4 100644 (file)
@@ -93,6 +93,7 @@
        <xsd:element name="REFERENCEBASE_EXTENSION_AUD" type="REFERENCEBASE_EXTENSION_AUD__type" />
        <xsd:element name="HOMOTYPICALGROUP" type="HOMOTYPICALGROUP__type" />
        <xsd:element name="SEQUENCE_REFERENCEBASE" type="SEQUENCE_REFERENCEBASE__type" />
+       <xsd:element name="USER_AUD" type="USER_AUD__type" />
        <xsd:element name="TYPEDESIGNATIONBASE_ANNOTATION" type="TYPEDESIGNATIONBASE_ANNOTATION__type" />
        <xsd:element name="AGENTBASE_MEDIA" type="AGENTBASE_MEDIA__type" />
        <xsd:element name="DESCRIPTIONELEMENTBASE_MARKER_AUD" type="DESCRIPTIONELEMENTBASE_MARKER_AUD__type" />
                <xsd:attribute name="UPDATED" use="optional" />
                <xsd:attribute name="UPDATEDBY_ID" use="optional" />
                <xsd:attribute name="SUPPORTSINDIVIDUALASSOCIATION" use="optional" />
-               <xsd:attribute name="SUPPORTSCOMMONTAXONNAME" use="optional" />
                <xsd:attribute name="REVTYPE" use="optional" />
+               <xsd:attribute name="SUPPORTSCOMMONTAXONNAME" use="optional" />
                <xsd:attribute name="ORDERINDEX" use="optional" />
                <xsd:attribute name="SUPPORTSTAXONINTERACTION" use="optional" />
                <xsd:attribute name="REV" use="optional" />
                <xsd:attribute name="SEQUENCE_ID" use="optional" />
                <xsd:attribute name="CITATIONS_ID" use="optional" />
        </xsd:complexType>
+       <xsd:complexType name="USER_AUD__type">
+               <xsd:attribute name="ACCOUNTNONEXPIRED" use="optional" />
+               <xsd:attribute name="PERSON_ID" use="optional" />
+               <xsd:attribute name="USERNAME" use="optional" />
+               <xsd:attribute name="REVTYPE" use="optional" />
+               <xsd:attribute name="EMAILADDRESS" use="optional" />
+               <xsd:attribute name="CREDENTIALSNONEXPIRED" use="optional" />
+               <xsd:attribute name="CREATEDBY_ID" use="optional" />
+               <xsd:attribute name="ACCOUNTNONLOCKED" use="optional" />
+               <xsd:attribute name="REV" use="optional" />
+               <xsd:attribute name="UUID" use="optional" />
+               <xsd:attribute name="ENABLED" use="optional" />
+               <xsd:attribute name="ID" use="optional" />
+               <xsd:attribute name="CREATED" use="optional" />
+       </xsd:complexType>
        <xsd:complexType name="TYPEDESIGNATIONBASE_ANNOTATION__type">
                <xsd:attribute name="TYPEDESIGNATIONBASE_ID" use="optional" />
                <xsd:attribute name="ANNOTATIONS_ID" use="optional" />
                <xsd:attribute name="REV" use="optional" />
        </xsd:complexType>
        <xsd:complexType name="DESCRIPTIONELEMENTBASE_AUD__type">
-               <xsd:attribute name="TAXON2_ID" use="optional" />
                <xsd:attribute name="ASSOCIATEDSPECIMENOROBSERVATION_ID" use="optional" />
+               <xsd:attribute name="TAXON2_ID" use="optional" />
                <xsd:attribute name="UPDATED" use="optional" />
                <xsd:attribute name="UNIT_ID" use="optional" />
                <xsd:attribute name="INDESCRIPTION_ID" use="optional" />
                <xsd:attribute name="PUBLISHER" use="optional" />
                <xsd:attribute name="INJOURNAL_ID" use="optional" />
                <xsd:attribute name="CREATEDBY_ID" use="optional" />
-               <xsd:attribute name="INBOOK_ID" use="optional" />
                <xsd:attribute name="MONTH" use="optional" />
-               <xsd:attribute name="TITLE" use="optional" />
+               <xsd:attribute name="INBOOK_ID" use="optional" />
                <xsd:attribute name="ORGANIZATION" use="optional" />
+               <xsd:attribute name="TITLE" use="optional" />
                <xsd:attribute name="TYPE_ID" use="optional" />
                <xsd:attribute name="SCHOOL_ID" use="optional" />
                <xsd:attribute name="SERIES" use="optional" />
                <xsd:attribute name="ISPARTOF_ID" use="optional" />
                <xsd:attribute name="PROTECTEDTITLECACHE" use="optional" />
                <xsd:attribute name="CODE" use="optional" />
-               <xsd:attribute name="NAME" use="optional" />
                <xsd:attribute name="SUFFIX" use="optional" />
+               <xsd:attribute name="NAME" use="optional" />
                <xsd:attribute name="PROTECTEDNOMENCLATURALTITLECACHE" use="optional" />
                <xsd:attribute name="LIFESPAN_START" use="optional" />
                <xsd:attribute name="ID" use="optional" />
                <xsd:attribute name="REV" use="optional" />
        </xsd:complexType>
        <xsd:complexType name="USER__type">
+               <xsd:attribute name="PERSON_ID" use="optional" />
                <xsd:attribute name="ACCOUNTNONEXPIRED" use="optional" />
                <xsd:attribute name="UUID" use="optional" />
                <xsd:attribute name="USERNAME" use="optional" />
index 2e478db262a0d4559598cafee5a908d88e3a040f..8c408a6568b0de83a05d5ed2f2acd683b472f86f 100644 (file)
@@ -97,6 +97,7 @@
                                <xsd:element name="REFERENCEBASE_EXTENSION_AUD" type="dflt:REFERENCEBASE_EXTENSION_AUD__type" />
                                <xsd:element name="HOMOTYPICALGROUP" type="dflt:HOMOTYPICALGROUP__type" />
                                <xsd:element name="SEQUENCE_REFERENCEBASE" type="dflt:SEQUENCE_REFERENCEBASE__type" />
+                               <xsd:element name="USER_AUD" type="dflt:USER_AUD__type" />
                                <xsd:element name="TYPEDESIGNATIONBASE_ANNOTATION" type="dflt:TYPEDESIGNATIONBASE_ANNOTATION__type" />
                                <xsd:element name="AGENTBASE_MEDIA" type="dflt:AGENTBASE_MEDIA__type" />
                                <xsd:element name="DESCRIPTIONELEMENTBASE_MARKER_AUD" type="dflt:DESCRIPTIONELEMENTBASE_MARKER_AUD__type" />