SET CLUSTER '';
SET DEFAULT_TABLE_TYPE 0;
SET WRITE_DELAY 500;
SET DEFAULT_LOCK_TIMEOUT 2000;
SET CACHE_SIZE 16384;

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


CREATE CACHED TABLE PUBLIC.ADDRESS(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    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,
    COUNTRY_ID INTEGER,
    LOCATION_REFERENCESYSTEM_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ADDRESS;
CREATE CACHED TABLE PUBLIC.ADDRESS_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    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,
    COUNTRY_ID INTEGER,
    LOCATION_REFERENCESYSTEM_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ADDRESS_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
	PROTECTEDCOLLECTORTITLECACHE BOOLEAN NOT NULL,
	COLLECTORTITLE VARCHAR(255),
	PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
    NOMENCLATURALTITLE VARCHAR(255),
    CODE VARCHAR(255),
    NAME VARCHAR(255),
    FIRSTNAME VARCHAR(255),
    LASTNAME VARCHAR(255),
    LIFESPAN_END VARCHAR(255),
    LIFESPAN_FREETEXT VARCHAR(255),
    LIFESPAN_START VARCHAR(255),
    PREFIX VARCHAR(255),
    SUFFIX VARCHAR(255),
	HASMOREMEMBERS BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ISPARTOF_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE;
CREATE INDEX PUBLIC.AGENTTITLECACHEINDEX ON PUBLIC.AGENTBASE(TITLECACHE);
CREATE CACHED TABLE PUBLIC.AGENTBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    PROTECTEDCOLLECTORTITLECACHE BOOLEAN NOT NULL,
	COLLECTORTITLE VARCHAR(255),
    NOMENCLATURALTITLE VARCHAR(255),
    PROTECTEDNOMENCLATURALTITLECACHE BOOLEAN,
    FIRSTNAME VARCHAR(255),
    LASTNAME VARCHAR(255),
    LIFESPAN_END VARCHAR(255),
    LIFESPAN_FREETEXT VARCHAR(255),
    LIFESPAN_START VARCHAR(255),
    PREFIX VARCHAR(255),
    SUFFIX VARCHAR(255),
    CODE VARCHAR(255),
    NAME VARCHAR(255),	
	HASMOREMEMBERS BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
   	ISPARTOF_ID INTEGER,

);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_ADDRESS(
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_ADDRESSES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ADDRESS;
CREATE CACHED TABLE PUBLIC.AGENTBASE_ADDRESS_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_ADDRESSES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ADDRESS_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_AGENTBASE(
    TEAM_ID INTEGER NOT NULL,
    TEAMMEMBERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AGENTBASE;
CREATE CACHED TABLE PUBLIC.AGENTBASE_AGENTBASE_AUD(
    REV INTEGER NOT NULL,
    TEAM_ID INTEGER NOT NULL,
    TEAMMEMBERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_AGENTBASE_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_ANNOTATION(
    AGENTBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.AGENTBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CREDIT(
    AGENTBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CREDIT;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE(
    INSTITUTION_ID INTEGER NOT NULL,
    TYPES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_DEFINEDTERMBASE;
CREATE CACHED TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD(
    REV INTEGER NOT NULL,
    INSTITUTION_ID INTEGER NOT NULL,
    TYPES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_EXTENSION(
    AGENTBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_EXTENSION;
CREATE CACHED TABLE PUBLIC.AGENTBASE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_IDENTIFIER(
    AGENTBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.AGENTBASE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_MARKER(
    AGENTBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MARKER;
CREATE CACHED TABLE PUBLIC.AGENTBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_MEDIA(
    AGENTBASE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MEDIA;
CREATE CACHED TABLE PUBLIC.AGENTBASE_MEDIA_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_MEDIA_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE(
    AGENTBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_RIGHTSINFO(
    AGENTBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.AGENTBASE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES(
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_EMAILADDRESSES_ELEMENT VARCHAR(255)
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_EMAILADDRESSES_ELEMENT VARCHAR(255) NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS(
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_FAXNUMBERS_ELEMENT VARCHAR(255)
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_FAXNUMBERS_ELEMENT VARCHAR(255) NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS(
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_PHONENUMBERS_ELEMENT VARCHAR(255)
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_PHONENUMBERS_ELEMENT VARCHAR(255) NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_URLS(
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_URLS_ELEMENT VARCHAR(255)
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_URLS;
CREATE CACHED TABLE PUBLIC.AGENTBASE_CONTACT_URLS_AUD(
    REV INTEGER NOT NULL,
    AGENTBASE_ID INTEGER NOT NULL,
    CONTACT_URLS_ELEMENT VARCHAR(255) NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.AGENTBASE_CONTACT_URLS_AUD;

CREATE TABLE AMPLIFICATION (
     ID INTEGER NOT NULL,
     CREATED TIMESTAMP,
     UUID VARCHAR(36),
     UPDATED TIMESTAMP,
     DESCRIPTION VARCHAR(255),
     TIMEPERIOD_END VARCHAR(255),
     TIMEPERIOD_FREETEXT VARCHAR(255),
     TIMEPERIOD_START VARCHAR(255),
     ELECTROPHORESISVOLTAGE DOUBLE,
     GELCONCENTRATION DOUBLE,
     GELRUNNINGTIME DOUBLE,
     LADDERUSED VARCHAR(255),
	 LABELCACHE VARCHAR(255),
     CREATEDBY_ID INTEGER,
     UPDATEDBY_ID INTEGER,
     ACTOR_ID INTEGER,
     FORWARDPRIMER_ID INTEGER,
     DNAMARKER_ID INTEGER,
     PURIFICATION_ID INTEGER,
     INSTITUTION_ID INTEGER,
	 REVERSEPRIMER_ID INTEGER,
     PRIMARY KEY (ID)
);

CREATE TABLE AMPLIFICATION_AUD (
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    ELECTROPHORESISVOLTAGE DOUBLE,
    GELCONCENTRATION DOUBLE,
    GELRUNNINGTIME DOUBLE,
    LADDERUSED VARCHAR(255),
    LABELCACHE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    FORWARDPRIMER_ID INTEGER,
    DNAMARKER_ID INTEGER,
    PURIFICATION_ID INTEGER,
    INSTITUTION_ID INTEGER,
	REVERSEPRIMER_ID INTEGER,
    PRIMARY KEY (ID)
);

CREATE TABLE AMPLIFICATION_ANNOTATION (
    AMPLIFICATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    PRIMARY KEY (AMPLIFICATION_ID, ANNOTATIONS_ID)
);

CREATE TABLE AMPLIFICATION_ANNOTATION_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    AMPLIFICATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);

CREATE TABLE AMPLIFICATION_MARKER (
    AMPLIFICATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    PRIMARY KEY (AMPLIFICATION_ID, MARKERS_ID)
);

CREATE TABLE AMPLIFICATION_MARKER_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    AMPLIFICATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
);

CREATE TABLE AMPLIFICATIONRESULT (
     ID INTEGER NOT NULL,
     CREATED TIMESTAMP,
     UUID VARCHAR(36),
     UPDATED TIMESTAMP,
     SUCCESSTEXT VARCHAR(255),
     SUCCESSFUL BOOLEAN,
     CREATEDBY_ID INTEGER,
     UPDATEDBY_ID INTEGER,
     CLONING_ID INTEGER,
     DNASAMPLE_ID INTEGER,
	 AMPLIFICATION_ID INTEGER,
	 GELPHOTO_ID INTEGER,
     PRIMARY KEY (ID)
);

CREATE TABLE AMPLIFICATIONRESULT_AUD (
     ID INTEGER NOT NULL,
	 REV INTEGER NOT NULL,
     REVTYPE TINYINT,
     CREATED TIMESTAMP,
     UUID VARCHAR(36),
     UPDATED TIMESTAMP,
     SUCCESSTEXT VARCHAR(255),
     SUCCESSFUL BOOLEAN,
     CREATEDBY_ID INTEGER,
     UPDATEDBY_ID INTEGER,
     CLONING_ID INTEGER,
     DNASAMPLE_ID INTEGER,
     AMPLIFICATION_ID INTEGER,
	 GELPHOTO_ID INTEGER,
     PRIMARY KEY (ID)
);

CREATE TABLE AMPLIFICATIONRESULT_ANNOTATION (
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    PRIMARY KEY (AMPLIFICATIONRESULT_ID, ANNOTATIONS_ID)
);

CREATE TABLE AMPLIFICATIONRESULT_ANNOTATION_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);

CREATE TABLE AMPLIFICATIONRESULT_MARKER (
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    PRIMARY KEY (AMPLIFICATIONRESULT_ID, MARKERS_ID)
);

CREATE TABLE AMPLIFICATIONRESULT_MARKER_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    AMPLIFICATIONRESULT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
);


CREATE CACHED TABLE PUBLIC.ANNOTATION(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    LINKBACKURI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER,
    ANNOTATIONTYPE_ID INTEGER,
    COMMENTATOR_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION;
CREATE CACHED TABLE PUBLIC.ANNOTATION_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    LINKBACKURI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER,
    ANNOTATIONTYPE_ID INTEGER,
    COMMENTATOR_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.ANNOTATION_ANNOTATION(
    ANNOTATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_ANNOTATION;
CREATE CACHED TABLE PUBLIC.ANNOTATION_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    ANNOTATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.ANNOTATION_MARKER(
    ANNOTATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_MARKER;
CREATE CACHED TABLE PUBLIC.ANNOTATION_MARKER_AUD(
    REV INTEGER NOT NULL,
    ANNOTATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ANNOTATION_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.AUDITEVENT(
    REVISIONNUMBER INTEGER DEFAULT (NEXT VALUE FOR PUBLIC.SYSTEM_SEQUENCE_10A55F0A_EE57_42DB_8046_6240A60AD0EC) NOT NULL NULL_TO_DEFAULT SEQUENCE PUBLIC.SYSTEM_SEQUENCE_10A55F0A_EE57_42DB_8046_6240A60AD0EC,
    DATE TIMESTAMP,
    TIMESTAMP BIGINT,
    UUID VARCHAR(255)
);
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.AUDITEVENT;
CREATE CACHED TABLE PUBLIC.CDM_VIEW(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    DESCRIPTION VARCHAR(255),
    NAME VARCHAR(255),
    CREATEDBY_ID INTEGER,
    REFERENCE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CDM_VIEW;
CREATE CACHED TABLE PUBLIC.CDM_VIEW_CDM_VIEW(
    CDM_VIEW_ID INTEGER NOT NULL,
    SUPERVIEWS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CDM_VIEW_CDM_VIEW;
CREATE CACHED TABLE PUBLIC.CDMMETADATA(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    PROPERTYNAME INTEGER,
    VALUE VARCHAR(255),
    CREATEDBY_ID INTEGER
);
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMMETADATA;
CREATE CACHED TABLE PUBLIC.CDMPREFERENCE(
    KEY_SUBJECT VARCHAR(100),
    KEY_PREDICATE VARCHAR(100),
    VALUE VARCHAR(1023),
	ALLOWOVERRIDE BOOLEAN NOT NULL
);
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.CDMPREFERENCE;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    MICROREFERENCE VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    NAME_ID INTEGER,
    REFERENCE_ID INTEGER,
    ROOTNODE_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    MICROREFERENCE VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    NAME_ID INTEGER,
    REFERENCE_ID INTEGER,
    ROOTNODE_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_AUD;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION(
    CLASSIFICATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT(
    CLASSIFICATION_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_CREDIT_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_CREDIT_AUD;

CREATE CACHED TABLE PUBLIC.CLASSIFICATION_DESCRIPTION(
    CLASSIFICATION_ID INTEGER NOT NULL,
   	DESCRIPTION_ID INTEGER NOT NULL,
   	DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_DESCRIPTION;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_DESCRIPTION_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    DESCRIPTION_ID INTEGER NOT NULL,
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_DESCRIPTION_AUD;

CREATE CACHED TABLE PUBLIC.CLASSIFICATION_EXTENSION(
    CLASSIFICATION_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_EXTENSION;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_GEOSCOPE(
    CLASSIFICATION_ID INTEGER NOT NULL,
    GEOSCOPES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_GEOSCOPE;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_GEOSCOPE_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    GEOSCOPES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_GEOSCOPE_AUD;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_IDENTIFIER(
    CLASSIFICATION_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_MARKER(
    CLASSIFICATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_MARKER;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_MARKER_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE(
    CLASSIFICATION_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO(
    CLASSIFICATION_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    CLASSIFICATION_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD;

CREATE CACHED TABLE PUBLIC.COLLECTION(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    CODE VARCHAR(255),
    CODESTANDARD VARCHAR(255),
    NAME VARCHAR(255),
    TOWNORLOCATION VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    INSTITUTE_ID INTEGER,
    SUPERCOLLECTION_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION;
CREATE INDEX PUBLIC.COLLECTIONTITLECACHEINDEX ON PUBLIC.COLLECTION(TITLECACHE);
CREATE CACHED TABLE PUBLIC.COLLECTION_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    CODE VARCHAR(255),
    CODESTANDARD VARCHAR(255),
    NAME VARCHAR(255),
    TOWNORLOCATION VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    INSTITUTE_ID INTEGER,
    SUPERCOLLECTION_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_ANNOTATION(
    COLLECTION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ANNOTATION;
CREATE CACHED TABLE PUBLIC.COLLECTION_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_CREDIT(
    COLLECTION_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_CREDIT;
CREATE CACHED TABLE PUBLIC.COLLECTION_CREDIT_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_EXTENSION(
    COLLECTION_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_EXTENSION;
CREATE CACHED TABLE PUBLIC.COLLECTION_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_IDENTIFIER(
    COLLECTION_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.COLLECTION_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_MARKER(
    COLLECTION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MARKER;
CREATE CACHED TABLE PUBLIC.COLLECTION_MARKER_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_MEDIA(
    COLLECTION_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MEDIA;
CREATE CACHED TABLE PUBLIC.COLLECTION_MEDIA_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_MEDIA_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE(
    COLLECTION_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.COLLECTION_RIGHTSINFO(
    COLLECTION_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.COLLECTION_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    COLLECTION_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.COLLECTION_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.CREDIT(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    ABBREVIATEDTEXT VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER,
    AGENT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT;
CREATE CACHED TABLE PUBLIC.CREDIT_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    ABBREVIATEDTEXT VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER,
    AGENT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.CREDIT_ANNOTATION(
    CREDIT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_ANNOTATION;
CREATE CACHED TABLE PUBLIC.CREDIT_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    CREDIT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.CREDIT_MARKER(
    CREDIT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_MARKER;
CREATE CACHED TABLE PUBLIC.CREDIT_MARKER_AUD(
    REV INTEGER NOT NULL,
    CREDIT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.CREDIT_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TERMTYPE VARCHAR(4),
    IDINVOCABULARY VARCHAR(255),
	SYMBOL VARCHAR(30),
	INVERSESYMBOL VARCHAR(30),
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    URI CLOB,
    ISO639_1 VARCHAR(2),
    RANKCLASS VARCHAR(4) NOT NULL,
    ISTECHNICAL BOOLEAN,
    ABSENCETERM BOOLEAN NOT NULL,
    ORDERINDEX INTEGER,
    SYMMETRICAL BOOLEAN,
    TRANSITIVE BOOLEAN,
    DEFAULTCOLOR VARCHAR(255),
    SUPPORTSCATEGORICALDATA BOOLEAN,
    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_FREETEXT 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
);
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TERMTYPE VARCHAR(4),
    IDINVOCABULARY VARCHAR(255),
	SYMBOL VARCHAR(30),
	INVERSESYMBOL VARCHAR(30),
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    URI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    KINDOF_ID INTEGER,
    PARTOF_ID INTEGER,
    VOCABULARY_ID INTEGER,
    ORDERINDEX INTEGER,
    ISO639_1 VARCHAR(2),
    RANKCLASS VARCHAR(4) NOT NULL,
    SUPPORTSCATEGORICALDATA BOOLEAN,
    SUPPORTSCOMMONTAXONNAME BOOLEAN,
    SUPPORTSDISTRIBUTION BOOLEAN,
    SUPPORTSINDIVIDUALASSOCIATION BOOLEAN,
    SUPPORTSQUANTITATIVEDATA BOOLEAN,
    SUPPORTSTAXONINTERACTION BOOLEAN,
    SUPPORTSTEXTDATA BOOLEAN,
    ISTECHNICAL BOOLEAN,
    ABSENCETERM BOOLEAN NOT NULL,
    DEFAULTCOLOR VARCHAR(255),
    POINTAPPROXIMATION_ERRORRADIUS INTEGER,
    POINTAPPROXIMATION_LATITUDE DOUBLE,
    POINTAPPROXIMATION_LONGITUDE DOUBLE,
    VALIDPERIOD_END VARCHAR(255),
    VALIDPERIOD_FREETEXT VARCHAR(255),
    VALIDPERIOD_START VARCHAR(255),
    LEVEL_ID INTEGER,
    POINTAPPROXIMATION_REFERENCESYSTEM_ID INTEGER,
    SHAPE_ID INTEGER,
    TYPE_ID INTEGER,
    ISO3166_A2 VARCHAR(2),
    SYMMETRICAL BOOLEAN,
    TRANSITIVE BOOLEAN
);
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT(
    COUNTRY_ID INTEGER NOT NULL,
    CONTINENTS_ID INTEGER NOT NULL
);
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD(
    REV INTEGER NOT NULL,
    COUNTRY_ID INTEGER NOT NULL,
    CONTINENTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 242 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD;
                                                                                                     
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_IDENTIFIER(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_IDENTIFIER_AUD;

CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MARKER(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MARKER;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT(
    FEATURE_ID INTEGER NOT NULL,
    RECOMMENDEDMEASUREMENTUNITS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD(
    REV INTEGER NOT NULL,
    FEATURE_ID INTEGER NOT NULL,
    RECOMMENDEDMEASUREMENTUNITS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEDIA(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEDIA;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_MEDIA_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_MEDIA_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION(
    FEATURE_ID INTEGER NOT NULL,
    RECOMMENDEDMODIFIERENUMERATION_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD(
    REV INTEGER NOT NULL,
    FEATURE_ID INTEGER NOT NULL,
    RECOMMENDEDMODIFIERENUMERATION_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL
);
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_REPRESENTATION;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 2084 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO(
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    DEFINEDTERMBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE(
    FEATURE_ID INTEGER NOT NULL,
    RECOMMENDEDSTATISTICALMEASURES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD(
    REV INTEGER NOT NULL,
    FEATURE_ID INTEGER NOT NULL,
    RECOMMENDEDSTATISTICALMEASURES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION(
    FEATURE_ID INTEGER NOT NULL,
    SUPPORTEDCATEGORICALENUMERATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD(
    REV INTEGER NOT NULL,
    FEATURE_ID INTEGER NOT NULL,
    SUPPORTEDCATEGORICALENUMERATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY(
    NAMEDAREA_ID INTEGER NOT NULL,
    COUNTRIES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_COUNTRY;
CREATE CACHED TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD(
    REV INTEGER NOT NULL,
    NAMEDAREA_ID INTEGER NOT NULL,
    COUNTRIES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD;
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    INSTITUTION_ID INTEGER,
	TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT;
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    INSTITUTION_ID INTEGER,
	TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_AUD;
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION(
    DERIVATIONEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_ANNOTATION;
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    DERIVATIONEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_MARKER(
    DERIVATIONEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_MARKER;
CREATE CACHED TABLE PUBLIC.DERIVATIONEVENT_MARKER_AUD(
    REV INTEGER NOT NULL,
    DERIVATIONEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DERIVATIONEVENT_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    IMAGEGALLERY BOOLEAN NOT NULL,
	ISDEFAULT BOOLEAN NOT NULL,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    SPECIMEN_ID INTEGER,
    TAXON_ID INTEGER,
    TAXONNAME_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    IMAGEGALLERY BOOLEAN,
	ISDEFAULT BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    SPECIMEN_ID INTEGER,
    TAXON_ID INTEGER,
    TAXONNAME_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD;

CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_IDENTIFIER_AUD;

CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    DESCRIPTIVESYSTEM_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_FEATURE_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE(
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
    GEOSCOPES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD(
    REV INTEGER NOT NULL,
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
    GEOSCOPES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    DESCRIPTIONSOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO(
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE(
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
    SCOPES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD(
    REV INTEGER NOT NULL,
    TAXONDESCRIPTION_ID INTEGER NOT NULL,
    SCOPES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONBASE_SCOPE_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    NAME VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    ORDERRELEVANT BOOLEAN,
--  MINIMUM DOUBLE,
--	MAXIMUM DOUBLE,
--	AVERAGE DOUBLE,
--	TYPCALLOWERBOUNDARY DOUBLE,
--	TYPCALHIGHERBOUNDARY DOUBLE,
--	VARIANCE DOUBLE,
--	STANDARDDEVIATION DOUBLE,
--	SINGLEVALUE DOUBLE,
--	SAMPLESIZE INTEGER,
	UNKNOWNDATA BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    FEATURE_ID INTEGER,
    INDESCRIPTION_ID INTEGER,
    AREA_ID INTEGER,
    LANGUAGE_ID INTEGER,
    STATUS_ID INTEGER,
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
    UNIT_ID INTEGER,
    TAXON2_ID INTEGER,
    FORMAT_ID INTEGER,
	
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    NAME VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
--  MINIMUM DOUBLE,
--	MAXIMUM DOUBLE,
--	AVERAGE DOUBLE,
--	TYPCALLOWERBOUNDARY DOUBLE,
--	TYPCALHIGHERBOUNDARY DOUBLE,
--	VARIANCE DOUBLE,
--	STANDARDDEVIATION DOUBLE,
--	SINGLEVALUE DOUBLE,
--	SAMPLESIZE INTEGER,
    ORDERRELEVANT BOOLEAN,
    UNKNOWNDATA BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    FEATURE_ID INTEGER,
    INDESCRIPTION_ID INTEGER,
    AREA_ID INTEGER,
    STATUS_ID INTEGER,
    TAXON2_ID INTEGER,
    UNIT_ID INTEGER,
    FORMAT_ID INTEGER,
    ASSOCIATEDSPECIMENOROBSERVATION_ID INTEGER,
    LANGUAGE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION(
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING(
    TEXTDATA_ID INTEGER NOT NULL,
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    TEXTDATA_ID INTEGER NOT NULL,
    MULTILANGUAGETEXT_ID INTEGER NOT NULL,
    MULTILANGUAGETEXT_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER(
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA(
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER(
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MODIFIERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MODIFIERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT(
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MODIFYINGTEXT_ID INTEGER NOT NULL,
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    MODIFYINGTEXT_ID INTEGER NOT NULL,
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE(
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    DESCRIPTIONELEMENTBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT 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,
	TAXONNAME_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    PREFERREDFLAG BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    IDENTIFIEDUNIT_ID INTEGER,
    MODIFIER_ID INTEGER,
    TAXON_ID INTEGER,
	TAXONNAME_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_AUD;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION(
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER(
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD(
    REV INTEGER NOT NULL,
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE(
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
    SETOFREFERENCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE;
CREATE CACHED TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD(
    REV INTEGER NOT NULL,
    DETERMINATIONEVENT_ID INTEGER NOT NULL,
    SETOFREFERENCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);

-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD;
CREATE CACHED TABLE PUBLIC.DNAQUALITY(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36) NOT NULL,
    UPDATED TIMESTAMP,
    PURIFICATIONMETHOD VARCHAR(255),
    RATIOOFABSORBANCE260_230 DOUBLE,
    RATIOOFABSORBANCE260_280 DOUBLE,
    QUALITYCHECKDATE TIMESTAMP,
    CONCENTRATION DOUBLE,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CONCENTRATIONUNIT_ID INTEGER,
    QUALITYTERM_ID INTEGER,
    TYPEDPURIFICATIONMETHOD_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY;
CREATE CACHED TABLE PUBLIC.DNAQUALITY_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36) NOT NULL,
    UPDATED TIMESTAMP,
    PURIFICATIONMETHOD VARCHAR(255),
    RATIOOFABSORBANCE260_230 DOUBLE,
    RATIOOFABSORBANCE260_280 DOUBLE,
    QUALITYCHECKDATE TIMESTAMP,
    CONCENTRATION DOUBLE,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CONCENTRATIONUNIT_ID INTEGER,
    QUALITYTERM_ID INTEGER,
    TYPEDPURIFICATIONMETHOD_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.DNAQUALITY_AUD;

CREATE CACHED TABLE PUBLIC.ENTITYVALIDATION(
    ID INTEGER NOT NULL,
    UUID VARCHAR(36),
    CREATED TIMESTAMP,
    VALIDATEDENTITYID INTEGER,
    VALIDATEDENTITYUUID VARCHAR(36),
    VALIDATEDENTITYCLASS VARCHAR(255),
    VALIDATIONCOUNT INTEGER,
    UPDATED TIMESTAMP,
    USERFRIENDLYDESCRIPTION VARCHAR(255),
    USERFRIENDLYTYPENAME VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CRUDEVENTTYPE VARCHAR(24),
    STATUS VARCHAR(16)
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYVALIDATION;

CREATE CACHED TABLE PUBLIC.ENTITYCONSTRAINTVIOLATION(
    ID INTEGER NOT NULL,
    UUID VARCHAR(36),
    CREATED TIMESTAMP,
    PROPERTYPATH VARCHAR(255),
    USERFRIENDLYFIELDNAME VARCHAR(255),
    INVALIDVALUE VARCHAR(255),
    SEVERITY VARCHAR(24),
    MESSAGE VARCHAR(255),
    VALIDATOR VARCHAR(255),
    VALIDATIONGROUP VARCHAR(63),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ENTITYVALIDATION_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ENTITYCONSTRAINTVIOLATION;

CREATE CACHED TABLE PUBLIC.EXTENSION(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    VALUE CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION;
CREATE CACHED TABLE PUBLIC.EXTENSION_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    VALUE CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.FEATURENODE(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    SORTINDEX INTEGER,
    TREEINDEX VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    FEATURE_ID INTEGER,
    FEATURETREE_ID INTEGER,
    PARENT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE;
CREATE CACHED TABLE PUBLIC.FEATURENODE_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    SORTINDEX INTEGER,
    TREEINDEX VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    FEATURE_ID INTEGER,
    FEATURETREE_ID INTEGER,
    PARENT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_AUD;
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF(
    FEATURENODE_ID INTEGER NOT NULL,
    INAPPLICABLEIF_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF;
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD(
    REV INTEGER NOT NULL,
    FEATURENODE_ID INTEGER NOT NULL,
    INAPPLICABLEIF_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD;
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE(
    FEATURENODE_ID INTEGER NOT NULL,
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE;
CREATE CACHED TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD(
    REV INTEGER NOT NULL,
    FEATURENODE_ID INTEGER NOT NULL,
    ONLYAPPLICABLEIF_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ROOT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE;
CREATE CACHED TABLE PUBLIC.FEATURETREE_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ROOT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION(
    FEATURETREE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT(
    FEATURETREE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT;
CREATE CACHED TABLE PUBLIC.FEATURETREE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION(
    FEATURETREE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION;
CREATE CACHED TABLE PUBLIC.FEATURETREE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER(
    FEATURETREE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.FEATURETREE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER(
    FEATURETREE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER;
CREATE CACHED TABLE PUBLIC.FEATURETREE_MARKER_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE(
    FEATURETREE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION(
    FEATURETREE_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION;
CREATE CACHED TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_REPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO(
    FEATURETREE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.FEATURETREE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    FEATURETREE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.FEATURETREE_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    ABSOLUTEELEVATION INTEGER,
    ABSOLUTEELEVATIONMAX INTEGER,
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
    COLLECTINGMETHOD VARCHAR(255),
    DISTANCETOGROUND DOUBLE,
    DISTANCETOGROUNDMAX DOUBLE,
    DISTANCETOGROUNDTEXT VARCHAR(30),
    DISTANCETOWATERSURFACE DOUBLE,
    DISTANCETOWATERSURFACEMAX DOUBLE,
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
    EXACTLOCATION_ERRORRADIUS INTEGER,
    EXACTLOCATION_LATITUDE DOUBLE,
    EXACTLOCATION_LONGITUDE DOUBLE,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    COUNTRY_ID INTEGER,
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
    LOCALITY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    ABSOLUTEELEVATION INTEGER,
    ABSOLUTEELEVATIONMAX INTEGER,
    ABSOLUTEELEVATIONTEXT VARCHAR(30),
    COLLECTINGMETHOD VARCHAR(255),
    DISTANCETOGROUND DOUBLE,
    DISTANCETOGROUNDMAX DOUBLE,
    DISTANCETOGROUNDTEXT VARCHAR(30),
    DISTANCETOWATERSURFACE DOUBLE,
    DISTANCETOWATERSURFACEMAX DOUBLE,
    DISTANCETOWATERSURFACETEXT VARCHAR(30),
    EXACTLOCATION_ERRORRADIUS INTEGER,
    EXACTLOCATION_LATITUDE DOUBLE,
    EXACTLOCATION_LONGITUDE DOUBLE,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    COUNTRY_ID INTEGER,
    EXACTLOCATION_REFERENCESYSTEM_ID INTEGER,
    LOCALITY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_AUD;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION(
    GATHERINGEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    GATHERINGEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE(
    GATHERINGEVENT_ID INTEGER NOT NULL,
    COLLECTINGAREAS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD(
    REV INTEGER NOT NULL,
    GATHERINGEVENT_ID INTEGER NOT NULL,
    COLLECTINGAREAS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER(
    GATHERINGEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER;
CREATE CACHED TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD(
    REV INTEGER NOT NULL,
    GATHERINGEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GATHERINGEVENT_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.GRANTEDAUTHORITYIMPL(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    AUTHORITY VARCHAR(255) NOT NULL,
    CREATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.GRANTEDAUTHORITYIMPL;
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP;
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_AUD;
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION(
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION;
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER(
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER;
CREATE CACHED TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD(
    REV INTEGER NOT NULL,
    HOMOTYPICALGROUP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HOMOTYPICALGROUP_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    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
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP;
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    DOUBTFUL BOOLEAN,
    RULECONSIDERED VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    RELATEDFROM_ID INTEGER,
    RELATEDTO_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_AUD;
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION(
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION;
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER(
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER;
CREATE CACHED TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD(
    REV INTEGER NOT NULL,
    HYBRIDRELATIONSHIP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING(
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
    DESCRIPTION_ID INTEGER NOT NULL,
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.IDENTIFIER(
    ID INTEGER NOT NULL,
    UUID VARCHAR(36),
    CREATED TIMESTAMP,
    UPDATED TIMESTAMP,
    IDENTIFIER VARCHAR(800),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
  	TYPE_ID INTEGER  
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER;
CREATE CACHED TABLE PUBLIC.IDENTIFIER_AUD(
	ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    UUID VARCHAR(36),
    CREATED TIMESTAMP,
    UPDATED TIMESTAMP,
    IDENTIFIER VARCHAR(800),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
  	TYPE_ID INTEGER  
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION(
    IDENTIFIER_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION;
CREATE CACHED TABLE PUBLIC.IDENTIFIER_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    IDENTIFIER_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER(
    IDENTIFIER_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER;
CREATE CACHED TABLE PUBLIC.IDENTIFIER_MARKER_AUD(
    REV INTEGER NOT NULL,
    IDENTIFIER_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.IDENTIFIER_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE(
    ID INTEGER NOT NULL,
    UUID VARCHAR(36),
    CREATED TIMESTAMP,
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
  	STARTPOS INT,
  	ENDPOS INT,
  	AGENT_ID INT,
  	ANNOTATION_ID INT,
  	LANGUAGESTRING_ID INT,
  	MEDIA_ID INT,
  	OCCURRENCE_ID INT,
  	REFERENCE_ID INT,
  	TAXON_ID INT,
  	TAXONNAME_ID INT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE;
CREATE CACHED TABLE PUBLIC.INTEXTREFERENCE_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    UUID VARCHAR(36),
    CREATED TIMESTAMP,
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
  	STARTPOS INT,
  	ENDPOS INT,
  	AGENT_ID INT,
  	ANNOTATION_ID INT,
  	LANGUAGESTRING_ID INT,
  	MEDIA_ID INT,
  	OCCURRENCE_ID INT,
  	REFERENCE_ID INT,
  	TAXON_ID INT,
  	TAXONNAME_ID INT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INTEXTREFERENCE_AUD;

CREATE CACHED TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    INDIVIDUALSASSOCIATION_ID INTEGER NOT NULL,
    DESCRIPTION_ID INTEGER NOT NULL,
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DEPARTMENT VARCHAR(255),
    PERIOD_END VARCHAR(255),
    PERIOD_FREETEXT VARCHAR(255),
    PERIOD_START VARCHAR(255),
    ROLE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    INSTITUTE_ID INTEGER,
    PERSON_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP;
CREATE CACHED TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DEPARTMENT VARCHAR(255),
    PERIOD_END VARCHAR(255),
    PERIOD_FREETEXT VARCHAR(255),
    PERIOD_START VARCHAR(255),
    ROLE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    INSTITUTE_ID INTEGER,
    PERSON_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.INSTITUTIONALMEMBERSHIP_AUD;
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT;
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_AUD;
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING(
    KEYSTATEMENT_ID INTEGER NOT NULL,
    LABEL_ID INTEGER NOT NULL,
    LABEL_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    KEYSTATEMENT_ID INTEGER NOT NULL,
    LABEL_ID INTEGER NOT NULL,
    LABEL_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    AUTHORITY VARCHAR(255),
    AUTHORITYWSDL CLOB,
    PORT INTEGER NOT NULL,
    SERVER VARCHAR(255),
    URL VARCHAR(255),
    CREATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY;
CREATE CACHED TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES(
    LSIDAUTHORITY_ID INTEGER NOT NULL,
    NAMESPACES_ELEMENT VARCHAR(255),
    NAMESPACES_MAPKEY VARCHAR(255) NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LSIDAUTHORITY_NAMESPACES;
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION(
    LANGUAGESTRING_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION;
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    LANGUAGESTRING_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER(
    LANGUAGESTRING_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER;
CREATE CACHED TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD(
    REV INTEGER NOT NULL,
    LANGUAGESTRING_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LANGUAGESTRING_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.LOCUS(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    NAME VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS;
CREATE CACHED TABLE PUBLIC.LOCUS_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    NAME VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.LOCUS_AUD;
CREATE CACHED TABLE PUBLIC.MARKER(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    FLAG BOOLEAN NOT NULL,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    MARKERTYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER;
CREATE CACHED TABLE PUBLIC.MARKER_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    FLAG BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    MARKERTYPE_ID INTEGER
);

CREATE TABLE MATERIALORMETHODEVENT (
    ID INTEGER NOT NULL,
    DTYPE VARCHAR(255),
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    MATERIALMETHODTEXT VARCHAR(255),
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
	STRAIN VARCHAR(255),
    TEMPERATURE DOUBLE,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    DEFINEDMATERIALORMETHOD_ID INTEGER,
    ACTOR_ID INTEGER,
    FORWARDPRIMER_ID INTEGER,
    REVERSEPRIMER_ID INTEGER,
    MEDIUM_ID INTEGER,
    PRIMARY KEY (ID)
);

CREATE TABLE MATERIALORMETHODEVENT_AUD (
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
	DTYPE VARCHAR(255),
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    MATERIALMETHODTEXT VARCHAR(255),
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
	STRAIN VARCHAR(255),
    TEMPERATURE DOUBLE,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    DEFINEDMATERIALORMETHOD_ID INTEGER,
    ACTOR_ID INTEGER,
    FORWARDPRIMER_ID INTEGER,
    REVERSEPRIMER_ID INTEGER,
    MEDIUM_ID INTEGER
);

CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION (
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, ANNOTATIONS_ID)
);

CREATE TABLE MATERIALORMETHODEVENT_ANNOTATION_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
);

CREATE TABLE MATERIALORMETHODEVENT_MARKER (
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    PRIMARY KEY (MATERIALORMETHODEVENT_ID, MARKERS_ID)
);

CREATE TABLE MATERIALORMETHODEVENT_MARKER_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    MATERIALORMETHODEVENT_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
);

-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MARKER_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    MEDIACREATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ARTIST_ID INTEGER,
    CITATION_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_COVEREDTAXON(
    MEDIAKEY_ID INTEGER NOT NULL,
    COVEREDTAXA_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_COVEREDTAXON;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_COVEREDTAXON_AUD(
    REV INTEGER NOT NULL,
    MEDIAKEY_ID INTEGER NOT NULL,
    COVEREDTAXA_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_COVEREDTAXON_AUD;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA(
    MEDIAKEY_ID INTEGER NOT NULL,
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_NAMEDAREA_AUD(
    REV INTEGER NOT NULL,
    MEDIAKEY_ID INTEGER NOT NULL,
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_NAMEDAREA_AUD;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE(
    MEDIAKEY_ID INTEGER NOT NULL,
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_SCOPE_AUD(
    REV INTEGER NOT NULL,
    MEDIAKEY_ID INTEGER NOT NULL,
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_SCOPE_AUD;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXONSCOPE(
    MEDIAKEY_ID INTEGER NOT NULL,
    TAXONOMICSCOPE_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXONSCOPE;
CREATE CACHED TABLE PUBLIC.MEDIAKEY_TAXONSCOPE_AUD(
    REV INTEGER NOT NULL,
    MEDIAKEY_ID INTEGER NOT NULL,
    TAXONOMICSCOPE_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAKEY_TAXONSCOPE_AUD;
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    MIMETYPE VARCHAR(255),
    SUFFIX VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    MEDIA_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION;
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    SIZE INTEGER,
    URI CLOB,
    DURATION INTEGER,
    HEIGHT INTEGER,
    WIDTH INTEGER,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    REPRESENTATION_ID INTEGER NOT NULL,
    SORTINDEX INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART;
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATIONPART_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    SIZE INTEGER,
    URI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    REPRESENTATION_ID INTEGER,
    DURATION INTEGER,
    HEIGHT INTEGER,
    WIDTH INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATIONPART_AUD;
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    MIMETYPE VARCHAR(255),
    SUFFIX VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    MEDIA_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD(
    REV INTEGER NOT NULL,
    REPRESENTATION_ID INTEGER NOT NULL,
    ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    MEDIACREATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ARTIST_ID INTEGER,
    CITATIONMICROREFERENCE VARCHAR(255),
    CITATION_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION(
    MEDIA_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION;
CREATE CACHED TABLE PUBLIC.MEDIA_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT(
    MEDIA_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT;
CREATE CACHED TABLE PUBLIC.MEDIA_CREDIT_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION(
    MEDIA_ID INTEGER NOT NULL,
    DESCRIPTION_ID INTEGER NOT NULL,
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION;
CREATE CACHED TABLE PUBLIC.MEDIA_DESCRIPTION_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    DESCRIPTION_ID INTEGER NOT NULL,
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_DESCRIPTION_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION(
    MEDIA_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION;
CREATE CACHED TABLE PUBLIC.MEDIA_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_IDENTIFIER(
    MEDIA_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.MEDIA_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING(
    MEDIA_ID INTEGER NOT NULL,
    TITLE_ID INTEGER NOT NULL,
    TITLE_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.MEDIA_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    TITLE_ID INTEGER NOT NULL,
    TITLE_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER(
    MEDIA_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER;
CREATE CACHED TABLE PUBLIC.MEDIA_MARKER_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE(
    MEDIA_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION(
    MEDIAKEY_ID INTEGER NOT NULL,
    KEYREPRESENTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION;
CREATE CACHED TABLE PUBLIC.MEDIA_REPRESENTATION_AUD(
    REV INTEGER NOT NULL,
    MEDIAKEY_ID INTEGER NOT NULL,
    KEYREPRESENTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_REPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTSINFO(
    MEDIA_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.MEDIA_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE(
    PHYLOGENETICTREE_ID INTEGER NOT NULL,
    USEDSEQUENCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE;
CREATE CACHED TABLE PUBLIC.MEDIA_SEQUENCE_AUD(
    REV INTEGER NOT NULL,
    PHYLOGENETICTREE_ID INTEGER NOT NULL,
    USEDSEQUENCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MEDIA_SEQUENCE_AUD;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON(
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    COVEREDTAXA_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_COVEREDTAXON;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD(
    REV INTEGER NOT NULL,
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    COVEREDTAXA_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA(
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD(
    REV INTEGER NOT NULL,
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE(
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_SCOPE_AUD(
    REV INTEGER NOT NULL,
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_SCOPE_AUD;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE(
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    TAXONOMICSCOPE_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXON;
CREATE CACHED TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD(
    REV INTEGER NOT NULL,
    MULTIACCESSKEY_ID INTEGER NOT NULL,
    TAXONOMICSCOPE_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD;
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    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
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP;
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    DOUBTFUL BOOLEAN,
    RULECONSIDERED VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    RELATEDFROM_ID INTEGER,
    RELATEDTO_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_AUD;
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION(
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION;
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER(
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER;
CREATE CACHED TABLE PUBLIC.NAMERELATIONSHIP_MARKER_AUD(
    REV INTEGER NOT NULL,
    NAMERELATIONSHIP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NAMERELATIONSHIP_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    RULECONSIDERED VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS;
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    RULECONSIDERED VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_AUD;
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION(
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION;
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER(
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER;
CREATE CACHED TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD(
    REV INTEGER NOT NULL,
    NOMENCLATURALSTATUS_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    SOURCETYPE VARCHAR(4) NOT NULL,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    IDINSOURCE VARCHAR(255),
    IDNAMESPACE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    NAMEUSEDINSOURCE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
   	SOURCETYPE VARCHAR(4) NOT NULL,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    IDINSOURCE VARCHAR(255),
    IDNAMESPACE VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    NAMEUSEDINSOURCE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION(
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER(
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER;
CREATE CACHED TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    ORIGINALSOURCEBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    NAME VARCHAR(255) NOT NULL,
    CREATEDBY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP;
CREATE CACHED TABLE PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL(
    GROUP_ID INTEGER NOT NULL,
    GRANTEDAUTHORITIES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    STARTNUMBER INTEGER,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ROOT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    NODENUMBER INTEGER,
    SORTINDEX INTEGER,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    FEATURE_ID INTEGER,
    KEY_ID INTEGER,
    OTHERNODE_ID INTEGER,
    PARENT_ID INTEGER,
    QUESTION_ID INTEGER,
    STATEMENT_ID INTEGER,
    SUBKEY_ID INTEGER,
    TAXON_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    NODENUMBER INTEGER,
    SORTINDEX INTEGER,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    FEATURE_ID INTEGER,
    KEY_ID INTEGER,
    OTHERNODE_ID INTEGER,
    PARENT_ID INTEGER,
    QUESTION_ID INTEGER,
    STATEMENT_ID INTEGER,
    SUBKEY_ID INTEGER,
    TAXON_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING(
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
    MODIFYINGTEXT_ID INTEGER NOT NULL,
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEYNODE_ID INTEGER NOT NULL,
    MODIFYINGTEXT_ID INTEGER NOT NULL,
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    STARTNUMBER INTEGER,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ROOT_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_CREDIT_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_IDENTIFIER(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_MARKER_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    GEOGRAPHICALSCOPE_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    SCOPERESTRICTIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_SCOPE_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    SCOPERESTRICTIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_SCOPE_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    TAXON_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE(
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    COVEREDTAXA_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    COVEREDTAXA_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD;
CREATE CACHED TABLE PUBLIC.POLYTOMOUSKEY_TAXON_AUD(
    REV INTEGER NOT NULL,
    POLYTOMOUSKEY_ID INTEGER NOT NULL,
    TAXON_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.POLYTOMOUSKEY_TAXON_AUD;

CREATE TABLE PRIMER (
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LABEL VARCHAR(255),
	SEQUENCE_LENGTH INTEGER,
	SEQUENCE_STRING CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    DNAMARKER_ID INTEGER,
	PUBLISHEDIN_ID INTEGER,
	PRIMARY KEY (ID)
);
CREATE TABLE PRIMER_AUD (
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LABEL VARCHAR(255),
    SEQUENCE_LENGTH INTEGER,
    SEQUENCE_STRING CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
	DNAMARKER_ID INTEGER,
	PUBLISHEDIN_ID INTEGER,
);

CREATE TABLE PRIMER_ANNOTATION (
    PRIMER_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    PRIMARY KEY (PRIMER_ID, ANNOTATIONS_ID)
);
CREATE TABLE PRIMER_ANNOTATION_AUD (
    PRIMER_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);

CREATE TABLE PRIMER_MARKER (
    PRIMER_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    PRIMARY KEY (PRIMER_ID, MARKERS_ID)
);
CREATE TABLE PRIMER_MARKER_AUD (
    PRIMER_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);


CREATE CACHED TABLE PUBLIC.REFERENCE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(800),
    DATEPUBLISHED_END VARCHAR(255),
    DATEPUBLISHED_FREETEXT VARCHAR(255),
    DATEPUBLISHED_START VARCHAR(255),
    EDITION VARCHAR(255),
    EDITOR VARCHAR(255),
    ISBN VARCHAR(255),
    ISSN VARCHAR(255),
    DOI VARCHAR(255),
    NOMENCLATURALLYRELEVANT BOOLEAN NOT NULL,
    ORGANIZATION VARCHAR(255),
    PAGES VARCHAR(255),
    PARSINGPROBLEM INTEGER NOT NULL,
    PLACEPUBLISHED VARCHAR(255),
    PROBLEMENDS INTEGER NOT NULL,
    PROBLEMSTARTS INTEGER NOT NULL,
    PUBLISHER VARCHAR(255),
    REFERENCEABSTRACT CLOB,
    SERIESPART VARCHAR(255),
    TITLE CLOB,
    ABBREVTITLE VARCHAR(255),
    ABBREVTITLECACHE CLOB,
    PROTECTEDABBREVTITLECACHE BOOLEAN,
    REFTYPE VARCHAR(4),
    URI CLOB,
    VOLUME VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    AUTHORSHIP_ID INTEGER,
    INREFERENCE_ID INTEGER,
    INSTITUTION_ID INTEGER,
    SCHOOL_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE;
CREATE INDEX PUBLIC.REFERENCETITLECACHEINDEX ON PUBLIC.REFERENCE(TITLECACHE);
CREATE CACHED TABLE PUBLIC.REFERENCE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(800),
    DATEPUBLISHED_END VARCHAR(255),
    DATEPUBLISHED_FREETEXT VARCHAR(255),
    DATEPUBLISHED_START VARCHAR(255),
    EDITION VARCHAR(255),
    EDITOR VARCHAR(255),
    ISBN VARCHAR(255),
    ISSN VARCHAR(255),
    DOI VARCHAR(255),
    NOMENCLATURALLYRELEVANT BOOLEAN,
    ORGANIZATION VARCHAR(255),
    PAGES VARCHAR(255),
    PARSINGPROBLEM INTEGER,
    PLACEPUBLISHED VARCHAR(255),
    PROBLEMENDS INTEGER,
    PROBLEMSTARTS INTEGER,
    PUBLISHER VARCHAR(255),
    REFERENCEABSTRACT CLOB,
    SERIESPART VARCHAR(255),
    TITLE CLOB,
    ABBREVTITLE VARCHAR(255),
    ABBREVTITLECACHE CLOB,
    PROTECTEDABBREVTITLECACHE BOOLEAN,
    REFTYPE  VARCHAR(4),
    URI CLOB,
    VOLUME VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    AUTHORSHIP_ID INTEGER,
    INREFERENCE_ID INTEGER,
    INSTITUTION_ID INTEGER,
    SCHOOL_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION(
    REFERENCE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.REFERENCE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT(
    REFERENCE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT;
CREATE CACHED TABLE PUBLIC.REFERENCE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION(
    REFERENCE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION;
CREATE CACHED TABLE PUBLIC.REFERENCE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER(
    REFERENCE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.REFERENCE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER(
    REFERENCE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER;
CREATE CACHED TABLE PUBLIC.REFERENCE_MARKER_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA(
    REFERENCE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA;
CREATE CACHED TABLE PUBLIC.REFERENCE_MEDIA_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    MEDIA_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_MEDIA_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE(
    REFERENCE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO(
    REFERENCE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.REFERENCE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    REFERENCE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REFERENCE_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION(
    RELATIONSHIPTERMBASE_ID INTEGER NOT NULL,
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL
);
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION;
CREATE CACHED TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD(
    REV INTEGER NOT NULL,
    RELATIONSHIPTERMBASE_ID INTEGER NOT NULL,
    INVERSEREPRESENTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 54 +/- SELECT COUNT(*) FROM PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.REPRESENTATION(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    ABBREVIATEDLABEL VARCHAR(255),
    LABEL VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER
);
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION;
CREATE CACHED TABLE PUBLIC.REPRESENTATION_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    ABBREVIATEDLABEL VARCHAR(255),
    LABEL VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER
);
-- 2175 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION(
    REPRESENTATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION;
CREATE CACHED TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    REPRESENTATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER(
    REPRESENTATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER;
CREATE CACHED TABLE PUBLIC.REPRESENTATION_MARKER_AUD(
    REV INTEGER NOT NULL,
    REPRESENTATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.REPRESENTATION_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.RIGHTSINFO(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    ABBREVIATEDTEXT VARCHAR(255),
    URI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER,
    AGENT_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TEXT CLOB,
    ABBREVIATEDTEXT VARCHAR(255),
    URI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LANGUAGE_ID INTEGER,
    AGENT_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION(
    RIGHTS_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION;
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER(
    RIGHTS_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.RIGHTSINFO_MARKER;
CREATE CACHED TABLE PUBLIC.RIGHTSINFO_MARKER_AUD(
    REV INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);

CREATE TABLE SEQUENCE (
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    BARCODESEQUENCEPART_LENGTH INTEGER,
    BARCODESEQUENCEPART_STRING CLOB,
    BOLDPROCESSID VARCHAR(255),
    CONSENSUSSEQUENCE_LENGTH INTEGER,
    CONSENSUSSEQUENCE_STRING CLOB,
    GENETICACCESSIONNUMBER VARCHAR(255),
    HAPLOTYPE VARCHAR(255),
    ISBARCODE BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CONTIGFILE_ID INTEGER,
    DNASAMPLE_ID INTEGER,
    DNAMARKER_ID INTEGER,
    PRIMARY KEY (ID)
);
CREATE TABLE SEQUENCE_AUD (
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    BARCODESEQUENCEPART_LENGTH INTEGER,
    BARCODESEQUENCEPART_STRING CLOB,
    BOLDPROCESSID VARCHAR(255),
    CONSENSUSSEQUENCE_LENGTH INTEGER,
    CONSENSUSSEQUENCE_STRING CLOB,
    GENETICACCESSIONNUMBER VARCHAR(255),
    HAPLOTYPE VARCHAR(255),
    ISBARCODE BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CONTIGFILE_ID INTEGER,
    DNASAMPLE_ID INTEGER,
    DNAMARKER_ID INTEGER
);

CREATE TABLE SEQUENCE_ANNOTATION (
    SEQUENCE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    PRIMARY KEY (SEQUENCE_ID, ANNOTATIONS_ID)
);
CREATE TABLE SEQUENCE_ANNOTATION_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    SEQUENCE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);

CREATE TABLE SEQUENCE_MARKER (
    SEQUENCE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    PRIMARY KEY (SEQUENCE_ID, MARKERS_ID)
);
CREATE TABLE SEQUENCE_MARKER_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    SEQUENCE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
CREATE TABLE SEQUENCE_REFERENCE (
    SEQUENCE_ID INTEGER NOT NULL,
    CITATIONS_ID INTEGER NOT NULL,
    PRIMARY KEY (SEQUENCE_ID, CITATIONS_ID)
);
CREATE TABLE SEQUENCE_REFERENCE_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    SEQUENCE_ID INTEGER NOT NULL,
    CITATIONS_ID INTEGER NOT NULL
);

CREATE TABLE SINGLEREADALIGNMENT (
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
	EDITEDSEQUENCE CLOB,
	SHIFTS CLOB,
    REVERSECOMPLEMENT BIT,
	FIRSTSEQPOSITION INTEGER,
	LEFTCUTPOSITION INTEGER,
	RIGHTCUTPOSITION INTEGER,
	CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CONSENSUSALIGNMENT_ID INTEGER NULL,
    SINGLEREAD_ID INTEGER NOT NULL,
    PRIMARY KEY (ID)
);

CREATE TABLE SINGLEREADALIGNMENT_AUD (
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
	EDITEDSEQUENCE CLOB,
	SHIFTS CLOB,
    REVERSECOMPLEMENT BIT,
	FIRSTSEQPOSITION INTEGER,
	LEFTCUTPOSITION INTEGER,
	RIGHTCUTPOSITION INTEGER,
	CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CONSENSUSALIGNMENT_ID INTEGER NULL,
    SINGLEREAD_ID INTEGER NOT NULL
);

CREATE TABLE SINGLEREAD (
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    DIRECTION VARCHAR(3),
    SEQUENCE_LENGTH INTEGER,
    SEQUENCE_STRING CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    AMPLIFICATIONRESULT_ID INTEGER,
    MATERIALORMETHOD_ID INTEGER,
    PHEROGRAM_ID INTEGER,
    PRIMER_ID INTEGER,
    PRIMARY KEY (ID)
);
CREATE TABLE SINGLEREAD_AUD (
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    DESCRIPTION VARCHAR(255),
    TIMEPERIOD_END VARCHAR(255),
    TIMEPERIOD_FREETEXT VARCHAR(255),
    TIMEPERIOD_START VARCHAR(255),
    DIRECTION VARCHAR(3),
    SEQUENCE_LENGTH INTEGER,
    SEQUENCE_STRING CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    ACTOR_ID INTEGER,
    AMPLIFICATIONRESULT_ID INTEGER,
    MATERIALORMETHOD_ID INTEGER,
    PHEROGRAM_ID INTEGER,
    PRIMER_ID INTEGER
);

CREATE TABLE SINGLEREAD_ANNOTATION (
    SINGLEREAD_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    PRIMARY KEY (SINGLEREAD_ID, ANNOTATIONS_ID)
);
CREATE TABLE SINGLEREAD_ANNOTATION_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    SINGLEREAD_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);

CREATE TABLE SINGLEREAD_MARKER (
    SINGLEREAD_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    PRIMARY KEY (SINGLEREAD_ID, MARKERS_ID)
);

CREATE TABLE SINGLEREAD_MARKER_AUD (
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    SINGLEREAD_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);


CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    RECORDBASIS  VARCHAR(4) NOT NULL,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    PUBLISH BOOLEAN,
    INDIVIDUALCOUNT INTEGER,
	PREFERREDSTABLEURI CLOB,
    ACCESSIONNUMBER VARCHAR(255),
    BARCODE VARCHAR(255),
    CATALOGNUMBER VARCHAR(255),
    COLLECTORSNUMBER VARCHAR(255),
    EXSICCATUM VARCHAR(255),
    ORIGINALLABELINFO CLOB,
    FIELDNOTES VARCHAR(255),
    FIELDNUMBER VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LIFESTAGE_ID INTEGER,
    SEX_ID INTEGER,
    KINDOFUNIT_ID INTEGER,
    COLLECTION_ID INTEGER,
    DERIVEDFROM_ID INTEGER,
    STOREDUNDER_ID INTEGER,
    PRESERVATION_ID INTEGER,
    GATHERINGEVENT_ID INTEGER,
    PRIMARYCOLLECTOR_ID INTEGER,
    MEDIASPECIMEN_ID INTEGER,
    DNAQUALITY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE;
CREATE INDEX PUBLIC.SPECIMENOROBSERVATIONBASETITLECACHEINDEX ON PUBLIC.SPECIMENOROBSERVATIONBASE(TITLECACHE);
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    RECORDBASIS  VARCHAR(4) NOT NULL,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    PUBLISH BOOLEAN,
    INDIVIDUALCOUNT INTEGER,
    PREFERREDSTABLEURI CLOB,
    ACCESSIONNUMBER VARCHAR(255),
    BARCODE VARCHAR(255),
    CATALOGNUMBER VARCHAR(255),
    COLLECTORSNUMBER VARCHAR(255),
    EXSICCATUM VARCHAR(255),
    ORIGINALLABELINFO CLOB,
    FIELDNOTES VARCHAR(255),
    FIELDNUMBER VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    LIFESTAGE_ID INTEGER,
    SEX_ID INTEGER,
    KINDOFUNIT_ID INTEGER,
    COLLECTION_ID INTEGER,
    DERIVEDFROM_ID INTEGER,
    STOREDUNDER_ID INTEGER,
    PRESERVATION_ID INTEGER,
    GATHERINGEVENT_ID INTEGER,
    PRIMARYCOLLECTOR_ID INTEGER,
    MEDIASPECIMEN_ID INTEGER,
    DNAQUALITY_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_AUD;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT(
    ORIGINALS_ID INTEGER NOT NULL,
    DERIVATIONEVENTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD(
    REV INTEGER NOT NULL,
    ORIGINALS_ID INTEGER NOT NULL,
    DERIVATIONEVENTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD;

CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_IDENTIFIER_AUD;

CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    DEFINITION_ID INTEGER NOT NULL,
    DEFINITION_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    DEFINITION_ID INTEGER NOT NULL,
    DEFINITION_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO(
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    SPECIMENOROBSERVATIONBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD;

CREATE CACHED TABLE PUBLIC.STATEDATA(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
	CATEGORICALDATA_ID INTEGER,
    STATE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA;
CREATE CACHED TABLE PUBLIC.STATEDATA_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
	CATEGORICALDATA_ID INTEGER,
    STATE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_AUD;
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE(
    STATEDATA_ID INTEGER NOT NULL,
    MODIFIERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE;
CREATE CACHED TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD(
    REV INTEGER NOT NULL,
    STATEDATA_ID INTEGER NOT NULL,
    MODIFIERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD;
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING(
    STATEDATA_ID INTEGER NOT NULL,
    MODIFYINGTEXT_ID INTEGER NOT NULL,
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    STATEDATA_ID INTEGER NOT NULL,
    MODIFYINGTEXT_ID INTEGER NOT NULL,
    MODIFYINGTEXT_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATEDATA_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    VALUE DOUBLE NOT NULL,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
	QUANTITATIVEDATA_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE;
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    VALUE DOUBLE,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
	QUANTITATIVEDATA_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_AUD;
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE(
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
    MODIFIERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE;
CREATE CACHED TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD(
    REV INTEGER NOT NULL,
    STATISTICALMEASUREMENTVALUE_ID INTEGER NOT NULL,
    MODIFIERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
	SECMICROREFERENCE VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    APPENDEDPHRASE VARCHAR(255),
    DOUBTFUL BOOLEAN NOT NULL,
    PUBLISH BOOLEAN,
    USENAMECACHE BOOLEAN NOT NULL,
    EXCLUDED BOOLEAN,
    TAXONSTATUSUNKNOWN BOOLEAN,
    UNPLACED BOOLEAN,
	PARTIAL BOOLEAN NOT NULL,
    PROPARTE BOOLEAN NOT NULL,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    NAME_ID INTEGER,
    SEC_ID INTEGER,
	ACCEPTEDTAXON_ID INTEGER,
	TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE;
CREATE INDEX PUBLIC.TAXONBASETITLECACHEINDEX ON PUBLIC.TAXONBASE(TITLECACHE);
CREATE CACHED TABLE PUBLIC.TAXONBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    APPENDEDPHRASE VARCHAR(255),
	SECMICROREFERENCE VARCHAR(255),
    DOUBTFUL BOOLEAN,
    PUBLISH BOOLEAN,
	PARTIAL BOOLEAN NOT NULL,
    PROPARTE BOOLEAN NOT NULL,
    USENAMECACHE BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    NAME_ID INTEGER,
    SEC_ID INTEGER,
    EXCLUDED BOOLEAN,
    TAXONSTATUSUNKNOWN BOOLEAN,
    UNPLACED BOOLEAN,
	ACCEPTEDTAXON_ID INTEGER,
	TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION(
    TAXONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.TAXONBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    TAXONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT(
    TAXONBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT;
CREATE CACHED TABLE PUBLIC.TAXONBASE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    TAXONBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION(
    TAXONBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION;
CREATE CACHED TABLE PUBLIC.TAXONBASE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    TAXONBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER(
    TAXONBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.TAXONBASE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    TAXONBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER(
    TAXONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER;
CREATE CACHED TABLE PUBLIC.TAXONBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    TAXONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE(
    TAXONBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    TAXONBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTSINFO(
    TAXONBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.TAXONBASE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    TAXONBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONBASE_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING(
    TAXONINTERACTION_ID INTEGER NOT NULL,
    DESCRIPTION_ID INTEGER NOT NULL,
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONINTERACTION_LANGUAGESTRING;
CREATE CACHED TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD(
    REV INTEGER NOT NULL,
    TAXONINTERACTION_ID INTEGER NOT NULL,
    DESCRIPTION_ID INTEGER NOT NULL,
    DESCRIPTION_MAPKEY_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    APPENDEDPHRASE VARCHAR(255),
    FULLTITLECACHE VARCHAR(330),
    NOMENCLATURALMICROREFERENCE VARCHAR(255),
    PARSINGPROBLEM INTEGER NOT NULL,
    PROBLEMENDS INTEGER NOT NULL,
    PROBLEMSTARTS INTEGER NOT NULL,
    PROTECTEDFULLTITLECACHE BOOLEAN NOT NULL,
    AUTHORSHIPCACHE VARCHAR(255),
    BINOMHYBRID BOOLEAN,
    GENUSORUNINOMIAL VARCHAR(255),
    HYBRIDFORMULA BOOLEAN,
    INFRAGENERICEPITHET VARCHAR(255),
    INFRASPECIFICEPITHET VARCHAR(255),
    MONOMHYBRID BOOLEAN,
    NAMECACHE VARCHAR(255),
    PROTECTEDAUTHORSHIPCACHE BOOLEAN,
    PROTECTEDNAMECACHE BOOLEAN,
    SPECIFICEPITHET VARCHAR(255),
    TRINOMHYBRID BOOLEAN,
    NAMEAPPROBATION VARCHAR(255),
    SUBGENUSAUTHORSHIP VARCHAR(255),
    ANAMORPHIC 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,
    BASIONYMAUTHORSHIP_ID INTEGER,
    COMBINATIONAUTHORSHIP_ID INTEGER,
    EXBASIONYMAUTHORSHIP_ID INTEGER,
    EXCOMBINATIONAUTHORSHIP_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE;
CREATE INDEX PUBLIC.TAXONNAMEBASETITLECACHEINDEX ON PUBLIC.TAXONNAMEBASE(TITLECACHE);
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    APPENDEDPHRASE VARCHAR(255),
    FULLTITLECACHE VARCHAR(330),
    NOMENCLATURALMICROREFERENCE VARCHAR(255),
    PARSINGPROBLEM INTEGER,
    PROBLEMENDS INTEGER,
    PROBLEMSTARTS INTEGER,
    PROTECTEDFULLTITLECACHE BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    HOMOTYPICALGROUP_ID INTEGER,
    NOMENCLATURALREFERENCE_ID INTEGER,
    RANK_ID INTEGER,
    ACRONYM VARCHAR(255),
    AUTHORSHIPCACHE VARCHAR(255),
    BINOMHYBRID BOOLEAN,
    GENUSORUNINOMIAL VARCHAR(255),
    HYBRIDFORMULA BOOLEAN,
    INFRAGENERICEPITHET VARCHAR(255),
    INFRASPECIFICEPITHET VARCHAR(255),
    MONOMHYBRID BOOLEAN,
    NAMECACHE VARCHAR(255),
    PROTECTEDAUTHORSHIPCACHE BOOLEAN,
    PROTECTEDNAMECACHE BOOLEAN,
    SPECIFICEPITHET VARCHAR(255),
    TRINOMHYBRID BOOLEAN,
    BASIONYMAUTHORSHIP_ID INTEGER,
    COMBINATIONAUTHORSHIP_ID INTEGER,
    EXBASIONYMAUTHORSHIP_ID INTEGER,
    EXCOMBINATIONAUTHORSHIP_ID INTEGER,
    ANAMORPHIC BOOLEAN,
    CULTIVARNAME VARCHAR(255),
    BREED VARCHAR(255),
    ORIGINALPUBLICATIONYEAR INTEGER,
    PUBLICATIONYEAR INTEGER,
    NAMEAPPROBATION VARCHAR(255),
    SUBGENUSAUTHORSHIP VARCHAR(255)
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_CREDIT(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_CREDIT;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_CREDIT_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_EXTENSION(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_EXTENSION;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_IDENTIFIER(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_MARKER(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_MARKER;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    STATUS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    STATUS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE(
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    TYPEDESIGNATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE;
CREATE CACHED TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE_AUD(
    REV INTEGER NOT NULL,
    TAXONNAMEBASE_ID INTEGER NOT NULL,
    TYPEDESIGNATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNODE(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    SORTINDEX INTEGER,
    TREEINDEX VARCHAR(255),
    COUNTCHILDREN INTEGER NOT NULL,
    MICROREFERENCEFORPARENTCHILDRELATION VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CLASSIFICATION_ID INTEGER,
    PARENT_ID INTEGER,
    REFERENCEFORPARENTCHILDRELATION_ID INTEGER,
    SYNONYMTOBEUSED_ID INTEGER,
    TAXON_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE;
CREATE CACHED TABLE PUBLIC.TAXONNODEAGENTRELATION(
	ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
	CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    AGENT_ID INTEGER,
	TAXONNODE_ID INTEGER,
	TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODEAGENTRELATION;
CREATE CACHED TABLE PUBLIC.TAXONNODEAGENTRELATION_AUD(
	ID INTEGER NOT NULL,
	REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
	CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    AGENT_ID INTEGER,
	TAXONNODE_ID INTEGER,
	TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODEAGENTRELATION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNODEAGENTRELATION_ANNOTATION(
    TAXONNODEAGENTRELATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODEAGENTRELATION_ANNOTATION;
CREATE CACHED TABLE PUBLIC.TAXONNODEAGENTRELATION_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    TAXONNODEAGENTRELATION_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODEAGENTRELATION_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNODEAGENTRELATION_MARKER(
    TAXONNODEAGENTRELATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODEAGENTRELATION_MARKER;
CREATE CACHED TABLE PUBLIC.TAXONNODEAGENTRELATION_MARKER_AUD(
    REV INTEGER NOT NULL,
    TAXONNODEAGENTRELATION_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODEAGENTRELATION_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNODE_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    SORTINDEX INTEGER,
    TREEINDEX VARCHAR(255),
    COUNTCHILDREN INTEGER,
    MICROREFERENCEFORPARENTCHILDRELATION VARCHAR(255),
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CLASSIFICATION_ID INTEGER,
    PARENT_ID INTEGER,
    REFERENCEFORPARENTCHILDRELATION_ID INTEGER,
    SYNONYMTOBEUSED_ID INTEGER,
    TAXON_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNODE_ANNOTATION(
    TAXONNODE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.TAXONNODE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    TAXONNODE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONNODE_MARKER(
    TAXONNODE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_MARKER;
CREATE CACHED TABLE PUBLIC.TAXONNODE_MARKER_AUD(
    REV INTEGER NOT NULL,
    TAXONNODE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNODE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    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
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP;
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    DOUBTFUL BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    RELATEDFROM_ID INTEGER,
    RELATEDTO_ID INTEGER,
    TYPE_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_AUD;
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION(
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_ANNOTATION;
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_MARKER(
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_MARKER;
CREATE CACHED TABLE PUBLIC.TAXONRELATIONSHIP_MARKER_AUD(
    REV INTEGER NOT NULL,
    TAXONRELATIONSHIP_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONRELATIONSHIP_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TERMTYPE VARCHAR(4),
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN NOT NULL,
    TITLECACHE VARCHAR(255),
    URI CLOB,
    TERMSOURCEURI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 37 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    TERMTYPE VARCHAR(4),
    LSID_AUTHORITY VARCHAR(255),
    LSID_LSID VARCHAR(255),
    LSID_NAMESPACE VARCHAR(255),
    LSID_OBJECT VARCHAR(255),
    LSID_REVISION VARCHAR(255),
    PROTECTEDTITLECACHE BOOLEAN,
    TITLECACHE VARCHAR(255),
    URI CLOB,
    TERMSOURCEURI CLOB,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER
);
-- 37 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_ANNOTATION(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_ANNOTATION;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_CREDIT(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_CREDIT;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_CREDIT_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    CREDITS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_CREDIT_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_EXTENSION(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_EXTENSION;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_EXTENSION_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    EXTENSIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_EXTENSION_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_IDENTIFIER(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_IDENTIFIER;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_IDENTIFIER_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    IDENTIFIERS_ID INTEGER NOT NULL,
    SORTINDEX INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_IDENTIFIER_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_MARKER(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_MARKER;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_MARKER_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    SOURCES_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL
);
-- 37 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_REPRESENTATION;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 37 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_REPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO(
    TERMVOCABULARY_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_RIGHTSINFO;
CREATE CACHED TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO_AUD(
    REV INTEGER NOT NULL,
    TERMVOCABULARY_ID INTEGER NOT NULL,
    RIGHTS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TERMVOCABULARY_RIGHTSINFO_AUD;
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    NOTDESIGNATED BOOLEAN NOT NULL,
    CONSERVEDTYPE BOOLEAN,
    REJECTEDTYPE BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    TYPESTATUS_ID INTEGER,
    TYPENAME_ID INTEGER,
    TYPESPECIMEN_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TYPEDESIGNATIONBASE;
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CITATIONMICROREFERENCE VARCHAR(255),
    ORIGINALNAMESTRING VARCHAR(255),
    NOTDESIGNATED BOOLEAN,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    CITATION_ID INTEGER,
    TYPESTATUS_ID INTEGER,
    CONSERVEDTYPE BOOLEAN,
    REJECTEDTYPE BOOLEAN,
    TYPENAME_ID INTEGER,
    TYPESPECIMEN_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TYPEDESIGNATIONBASE_AUD;
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION(
    TYPEDESIGNATIONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION;
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    TYPEDESIGNATIONBASE_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER(
    TYPEDESIGNATIONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TYPEDESIGNATIONBASE_MARKER;
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER_AUD(
    REV INTEGER NOT NULL,
    TYPEDESIGNATIONBASE_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TYPEDESIGNATIONBASE_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.USERACCOUNT(
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    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) NOT NULL,
    CREATEDBY_ID INTEGER,
    PERSON_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.USERACCOUNT;
CREATE CACHED TABLE PUBLIC.USERACCOUNT_AUD(
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    ACCOUNTNONEXPIRED BOOLEAN,
    ACCOUNTNONLOCKED BOOLEAN,
    CREDENTIALSNONEXPIRED BOOLEAN,
    EMAILADDRESS VARCHAR(255),
    ENABLED BOOLEAN,
    USERNAME VARCHAR(255),
    CREATEDBY_ID INTEGER,
    PERSON_ID INTEGER
);
-- 1 +/- SELECT COUNT(*) FROM PUBLIC.USERACCOUNT_AUD;
CREATE CACHED TABLE PUBLIC.USERACCOUNT_GRANTEDAUTHORITYIMPL(
    USER_ID INTEGER NOT NULL,
    GRANTEDAUTHORITIES_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.USERACCOUNT_GRANTEDAUTHORITYIMPL;
CREATE CACHED TABLE PUBLIC.USERACCOUNT_PERMISSIONGROUP(
    MEMBERS_ID INTEGER NOT NULL,
    GROUPS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.USERACCOUNT_PERMISSIONGROUP;
CREATE CACHED TABLE PUBLIC.WORKINGSET(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    DESCRIPTIVESYSTEM_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET;
CREATE CACHED TABLE PUBLIC.WORKINGSET_AUD(
    DTYPE VARCHAR(31) NOT NULL,
    ID INTEGER NOT NULL,
    REV INTEGER NOT NULL,
    REVTYPE TINYINT,
    CREATED TIMESTAMP,
    UUID VARCHAR(36),
    UPDATED TIMESTAMP,
    CREATEDBY_ID INTEGER,
    UPDATEDBY_ID INTEGER,
    DESCRIPTIVESYSTEM_ID INTEGER
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_AUD;
CREATE CACHED TABLE PUBLIC.WORKINGSET_ANNOTATION(
    WORKINGSET_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_ANNOTATION;
CREATE CACHED TABLE PUBLIC.WORKINGSET_ANNOTATION_AUD(
    REV INTEGER NOT NULL,
    WORKINGSET_ID INTEGER NOT NULL,
    ANNOTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_ANNOTATION_AUD;
CREATE CACHED TABLE PUBLIC.WORKINGSET_DESCRIPTIONBASE(
    WORKINGSETS_ID INTEGER NOT NULL,
    DESCRIPTIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_DESCRIPTIONBASE;
CREATE CACHED TABLE PUBLIC.WORKINGSET_DESCRIPTIONBASE_AUD(
    REV INTEGER NOT NULL,
    WORKINGSETS_ID INTEGER NOT NULL,
    DESCRIPTIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_DESCRIPTIONBASE_AUD;
CREATE CACHED TABLE PUBLIC.WORKINGSET_MARKER(
    WORKINGSET_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_MARKER;
CREATE CACHED TABLE PUBLIC.WORKINGSET_MARKER_AUD(
    REV INTEGER NOT NULL,
    WORKINGSET_ID INTEGER NOT NULL,
    MARKERS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_MARKER_AUD;
CREATE CACHED TABLE PUBLIC.WORKINGSET_REPRESENTATION(
    WORKINGSET_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_REPRESENTATION;
CREATE CACHED TABLE PUBLIC.WORKINGSET_REPRESENTATION_AUD(
    REV INTEGER NOT NULL,
    WORKINGSET_ID INTEGER NOT NULL,
    REPRESENTATIONS_ID INTEGER NOT NULL,
    REVTYPE TINYINT
);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.WORKINGSET_REPRESENTATION_AUD;
CREATE CACHED TABLE PUBLIC.HIBERNATE_SEQUENCES(
    SEQUENCE_NAME VARCHAR(255) NOT NULL,
    NEXT_VAL BIGINT
);
-- 8 +/- SELECT COUNT(*) FROM PUBLIC.HIBERNATE_SEQUENCES;
ALTER TABLE PUBLIC.TAXONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF6B PRIMARY KEY(TAXONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7E7 PRIMARY KEY(REV, DESCRIPTIONELEMENTBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFD6F PRIMARY KEY(REV, HOMOTYPICALGROUP_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBCD PRIMARY KEY(REV, TYPEDESIGNATIONBASE_ID, ANNOTATIONS_ID);
----ALTER TABLE PUBLIC.SEQUENCE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7E6 PRIMARY KEY(SEQUENCE_ID, SORTINDEX);
ALTER TABLE PUBLIC.POLYTOMOUSKEY ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX340 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX346 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX341 PRIMARY KEY(POLYTOMOUSKEY_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.WORKINGSET_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBCB PRIMARY KEY(REV, WORKINGSET_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBC2 PRIMARY KEY(TAXONBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX33F PRIMARY KEY(REV, GATHERINGEVENT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7D7 PRIMARY KEY(TAXONNAMEBASE_ID, STATUS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBAC PRIMARY KEY(COUNTRY_ID, CONTINENTS_ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBB0 PRIMARY KEY(DETERMINATIONEVENT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX33C PRIMARY KEY(REV, TAXONNAMEBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFD PRIMARY KEY(DEFINEDTERMBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.TAXONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX185 PRIMARY KEY(TAXONBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX36E PRIMARY KEY(TERMVOCABULARY_ID, SOURCES_ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFE PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIA_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX15A PRIMARY KEY(MEDIA_ID, SORTINDEX);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC76 PRIMARY KEY(REV, HYBRIDRELATIONSHIP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC81 PRIMARY KEY(NAMERELATIONSHIP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD97 PRIMARY KEY(REV, POLYTOMOUSKEY_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.MEDIA_DESCRIPTION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD9A PRIMARY KEY(MEDIA_ID, DESCRIPTION_MAPKEY_ID);
----ALTER TABLE PUBLIC.SEQUENCE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD9D PRIMARY KEY(REV, SEQUENCE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX371 PRIMARY KEY(TERMVOCABULARY_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.SEQUENCE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBA5 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.CREDIT_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBE3 PRIMARY KEY(REV, CREDIT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7FE PRIMARY KEY(TAXONRELATIONSHIP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5A4 PRIMARY KEY(REV, MULTIACCESSKEY_ID, GEOGRAPHICALSCOPE_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5A2 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.ANNOTATION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBE6 PRIMARY KEY(REV, ANNOTATION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX909E PRIMARY KEY(TAXONINTERACTION_ID, DESCRIPTION_MAPKEY_ID);
--ALTER TABLE PUBLIC.SEQUENCE_MEDIA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2CE PRIMARY KEY(REV, SEQUENCE_ID, CHROMATOGRAMS_ID);
ALTER TABLE PUBLIC.MEDIAREPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBE0 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBA2 PRIMARY KEY(REV, FEATURE_ID, RECOMMENDEDMEASUREMENTUNITS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF36 PRIMARY KEY(REV, LANGUAGESTRING_ID, MARKERS_ID);
ALTER TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX301 PRIMARY KEY(REV, RIGHTS_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.REFERENCE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF43 PRIMARY KEY(REV, REFERENCE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7A3 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.TAXONNODE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF49 PRIMARY KEY(REV, TAXONNODE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.REPRESENTATION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF1F PRIMARY KEY(REPRESENTATION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.HIBERNATE_SEQUENCES ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX59A PRIMARY KEY(SEQUENCE_NAME);
ALTER TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX30E PRIMARY KEY(TERMVOCABULARY_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9D7 PRIMARY KEY(REV, TERMVOCABULARY_ID, SOURCES_ID);
ALTER TABLE PUBLIC.MEDIAREPRESENTATIONPART ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX557 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX550 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.FEATURETREE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9E6 PRIMARY KEY(REV, FEATURETREE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9E5 PRIMARY KEY(POLYTOMOUSKEY_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX314 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX599 PRIMARY KEY(INSTITUTION_ID, TYPES_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXECE PRIMARY KEY(REV, TAXONNAMEBASE_ID, STATUS_ID);
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX32A PRIMARY KEY(STATISTICALMEASUREMENTVALUE_ID, MODIFIERS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEEB PRIMARY KEY(REV, TYPEDESIGNATIONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.SEQUENCE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9E0 PRIMARY KEY(REV, SEQUENCE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7C6 PRIMARY KEY(MULTIACCESSKEY_ID, TAXONOMICSCOPE_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2C1 PRIMARY KEY(REV, SPECIMENOROBSERVATIONBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2BE PRIMARY KEY(SPECIMENOROBSERVATIONBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2B2 PRIMARY KEY(POLYTOMOUSKEY_ID, MARKERS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2B4 PRIMARY KEY(POLYTOMOUSKEY_ID, COVEREDTAXA_ID);
ALTER TABLE PUBLIC.TAXONNODE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXED7 PRIMARY KEY(TAXONNODE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MEDIAKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF33 PRIMARY KEY(MEDIAKEY_ID, GEOGRAPHICALSCOPE_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7B1 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXED2 PRIMARY KEY(TAXONNAMEBASE_ID, TYPEDESIGNATIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2CD PRIMARY KEY(REV, FEATURE_ID, RECOMMENDEDSTATISTICALMEASURES_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXECC PRIMARY KEY(HYBRIDRELATIONSHIP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2E2 PRIMARY KEY(TERMVOCABULARY_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF5F5 PRIMARY KEY(REV, TAXONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2F2 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX360 PRIMARY KEY(REV, DESCRIPTIONELEMENTBASE_ID, MODIFYINGTEXT_ID, MODIFYINGTEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2C5 PRIMARY KEY(SPECIMENOROBSERVATIONBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX154 PRIMARY KEY(REV, POLYTOMOUSKEY_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.COLLECTION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD48 PRIMARY KEY(COLLECTION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB599 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC24 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.REFERENCE_MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC22 PRIMARY KEY(REFERENCE_ID, MEDIA_ID);
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC10 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX718 PRIMARY KEY(REV, REPRESENTATION_ID, ID, SORTINDEX);
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC29 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCA PRIMARY KEY(REV, DEFINEDTERMBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCB PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DERIVATIONEVENT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCC PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.FEATURETREE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCE PRIMARY KEY(REV, FEATURETREE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.COLLECTION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCF PRIMARY KEY(COLLECTION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.COLLECTION_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDA PRIMARY KEY(REV, COLLECTION_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD3 PRIMARY KEY(REV, DESCRIPTIONELEMENTBASE_ID, MODIFIERS_ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD4B PRIMARY KEY(ID);
--ALTER TABLE PUBLIC.SEQUENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX726 PRIMARY KEY(SEQUENCE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD63 PRIMARY KEY(REV, STATEDATA_ID, MODIFYINGTEXT_ID, MODIFYINGTEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC4D PRIMARY KEY(TERMVOCABULARY_ID, ANNOTATIONS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX550F PRIMARY KEY(REV, SEQUENCE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.FEATURETREE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX69EA PRIMARY KEY(ID);
ALTER TABLE PUBLIC.TAXONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC0F PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIA_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC47 PRIMARY KEY(REV, MEDIA_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD56 PRIMARY KEY(REV, TAXONNAMEBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX818 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD80 PRIMARY KEY(POLYTOMOUSKEY_ID, SOURCES_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD2A PRIMARY KEY(REV, TAXONNAMEBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.REFERENCE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX71C PRIMARY KEY(REFERENCE_ID, SORTINDEX);
ALTER TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD2F PRIMARY KEY(REV, TAXONNAMEBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX729 PRIMARY KEY(KEYSTATEMENT_ID, LABEL_MAPKEY_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD96 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD2 PRIMARY KEY(REV, TAXONINTERACTION_ID, DESCRIPTION_ID, DESCRIPTION_MAPKEY_ID);
ALTER TABLE PUBLIC.FEATURETREE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF0 PRIMARY KEY(FEATURETREE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD4 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF2 PRIMARY KEY(SPECIMENOROBSERVATIONBASE_ID, SORTINDEX);
ALTER TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF3 PRIMARY KEY(REV, COLLECTION_ID, SOURCES_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEC PRIMARY KEY(CLASSIFICATION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXED PRIMARY KEY(DESCRIPTIONBASE_ID, SORTINDEX);
ALTER TABLE PUBLIC.COLLECTION_MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEE PRIMARY KEY(COLLECTION_ID, MEDIA_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFA PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFB PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.RIGHTSINFO_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX14B PRIMARY KEY(RIGHTS_ID, MARKERS_ID);
ALTER TABLE PUBLIC.FEATURETREE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF9 PRIMARY KEY(FEATURETREE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX368 PRIMARY KEY(REV, SPECIMENOROBSERVATIONBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF5 PRIMARY KEY(CLASSIFICATION_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF4 PRIMARY KEY(REV, COUNTRY_ID, CONTINENTS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF7 PRIMARY KEY(CLASSIFICATION_ID, SOURCES_ID);
ALTER TABLE PUBLIC.MEDIAKEY_COVEREDTAXON_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF6 PRIMARY KEY(REV, MEDIAKEY_ID, COVEREDTAXA_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD5 PRIMARY KEY(REV, NAMERELATIONSHIP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFF PRIMARY KEY(REV, ORIGINALSOURCEBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF1 PRIMARY KEY(AGENTBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.AGENTBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE8 PRIMARY KEY(AGENTBASE_ID, MARKERS_ID);
--ALTER TABLE PUBLIC.CLASSIFICATION_TAXONNODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD7 PRIMARY KEY(CLASSIFICATION_ID, ROOTNODES_ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD6 PRIMARY KEY(REV, DETERMINATIONEVENT_ID, SETOFREFERENCES_ID);
ALTER TABLE PUBLIC.DERIVATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD9 PRIMARY KEY(DERIVATIONEVENT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFDC7 PRIMARY KEY(TAXONNAMEBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE2 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.FEATURETREE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE0 PRIMARY KEY(FEATURETREE_ID, SORTINDEX);
ALTER TABLE PUBLIC.COLLECTION_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDD PRIMARY KEY(COLLECTION_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE5 PRIMARY KEY(DESCRIPTIONBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDB PRIMARY KEY(FEATURE_ID, SUPPORTEDCATEGORICALENUMERATIONS_ID);
ALTER TABLE PUBLIC.MEDIA_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX65C7 PRIMARY KEY(REV, MEDIAKEY_ID, KEYREPRESENTATIONS_ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDF PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEB PRIMARY KEY(POLYTOMOUSKEY_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE7 PRIMARY KEY(REV, AGENTBASE_ID, CONTACT_FAXNUMBERS_ELEMENT);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE3 PRIMARY KEY(REV, POLYTOMOUSKEY_ID, SOURCES_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE9 PRIMARY KEY(DESCRIPTIONELEMENTBASE_ID, MODIFYINGTEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDE PRIMARY KEY(REV, CLASSIFICATION_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX542 PRIMARY KEY(LANGUAGESTRING_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDC PRIMARY KEY(CLASSIFICATION_ID, SORTINDEX);
ALTER TABLE PUBLIC.LANGUAGESTRING_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF0C PRIMARY KEY(LANGUAGESTRING_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAE9 PRIMARY KEY(DESCRIPTIONELEMENTBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8DC PRIMARY KEY(TYPEDESIGNATIONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.USERACCOUNT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC4F0 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAE5 PRIMARY KEY(DEFINEDTERMBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.GATHERINGEVENT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX43D PRIMARY KEY(GATHERINGEVENT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.LOCUS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX453 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.TAXONBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX91D PRIMARY KEY(REV, TAXONBASE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.COLLECTION_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAD9 PRIMARY KEY(REV, COLLECTION_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.FEATURETREE_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX444 PRIMARY KEY(FEATURETREE_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8B0 PRIMARY KEY(REV, MULTIACCESSKEY_ID, COVEREDTAXA_ID);
ALTER TABLE PUBLIC.GATHERINGEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX63FF PRIMARY KEY(GATHERINGEVENT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.WORKINGSET_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8BD PRIMARY KEY(REV, WORKINGSET_ID, MARKERS_ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX43B PRIMARY KEY(REV, ORIGINALSOURCEBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX509 PRIMARY KEY(TEXTDATA_ID, MULTILANGUAGETEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.MEDIA_SEQUENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX448 PRIMARY KEY(PHYLOGENETICTREE_ID, USEDSEQUENCES_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6887 PRIMARY KEY(REV, ORIGINALS_ID, DERIVATIONEVENTS_ID);
ALTER TABLE PUBLIC.TAXONBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFF4 PRIMARY KEY(TAXONBASE_ID, SORTINDEX);
ALTER TABLE PUBLIC.MEDIA_DESCRIPTION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX952 PRIMARY KEY(REV, MEDIA_ID, DESCRIPTION_ID, DESCRIPTION_MAPKEY_ID);
ALTER TABLE PUBLIC.TAXONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX56B6 PRIMARY KEY(TAXONBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFFF PRIMARY KEY(REV, TERMVOCABULARY_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA47 PRIMARY KEY(ORIGINALSOURCEBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MEDIA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX969 PRIMARY KEY(MEDIA_ID, TITLE_MAPKEY_ID);
ALTER TABLE PUBLIC.WORKINGSET_DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA53 PRIMARY KEY(WORKINGSETS_ID, DESCRIPTIONS_ID);
ALTER TABLE PUBLIC.SEQUENCE_REFERENCE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX514 PRIMARY KEY(REV, SEQUENCE_ID, CITATIONS_ID);
ALTER TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX906 PRIMARY KEY(FEATURETREE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX901 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX909 PRIMARY KEY(REV, MEDIA_ID, SOURCES_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA1D PRIMARY KEY(TAXONNAMEBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX919 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.LSIDAUTHORITY ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA44 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_FEATURE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX435 PRIMARY KEY(DESCRIPTIONBASE_ID, DESCRIPTIVESYSTEM_ID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA5F PRIMARY KEY(HOMOTYPICALGROUP_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8B6 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIA_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2E PRIMARY KEY(MEDIA_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX17 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.REFERENCE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX19 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX11 PRIMARY KEY(INDIVIDUALSASSOCIATION_ID, DESCRIPTION_MAPKEY_ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2F PRIMARY KEY(REV, NOMENCLATURALSTATUS_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MEDIA_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX439 PRIMARY KEY(REV, MEDIA_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX15 PRIMARY KEY(REV, DEFINEDTERMBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX45D PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX16 PRIMARY KEY(MEDIA_ID, SOURCES_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1B PRIMARY KEY(POLYTOMOUSKEY_ID, SORTINDEX);
ALTER TABLE PUBLIC.EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1D PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1C PRIMARY KEY(FEATURE_ID, RECOMMENDEDMEASUREMENTUNITS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX14 PRIMARY KEY(FEATURE_ID, RECOMMENDEDMODIFIERENUMERATION_ID);
ALTER TABLE PUBLIC.DERIVATIONEVENT_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF5F PRIMARY KEY(REV, DERIVATIONEVENT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.MEDIA_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX13 PRIMARY KEY(REV, MEDIA_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2B PRIMARY KEY(DEFINEDTERMBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONNODE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8CB PRIMARY KEY(REV, TAXONNODE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAFB PRIMARY KEY(TAXONBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXON_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2B4E PRIMARY KEY(REV, POLYTOMOUSKEY_ID, TAXON_ID);
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2A PRIMARY KEY(ID);
ALTER TABLE PUBLIC.AGENTBASE_MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX28 PRIMARY KEY(AGENTBASE_ID, MEDIA_ID);
ALTER TABLE PUBLIC.STATEDATA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX29 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAF1 PRIMARY KEY(REV, TERMVOCABULARY_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX20 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX21 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX26 PRIMARY KEY(REV, NOMENCLATURALSTATUS_ID, MARKERS_ID);
ALTER TABLE PUBLIC.FEATURETREE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX24 PRIMARY KEY(REV, FEATURETREE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.MEDIA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX25 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX30 PRIMARY KEY(REV, GATHERINGEVENT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2C PRIMARY KEY(DEFINEDTERMBASE_ID, MEDIA_ID);
ALTER TABLE PUBLIC.CDM_VIEW_CDM_VIEW ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX23 PRIMARY KEY(CDM_VIEW_ID, SUPERVIEWS_ID);
ALTER TABLE PUBLIC.ANNOTATION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX953 PRIMARY KEY(ANNOTATION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX282 PRIMARY KEY(HYBRIDRELATIONSHIP_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA65 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.CLASSIFICATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE64 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE65 PRIMARY KEY(REV, FEATURETREE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX23A PRIMARY KEY(ORIGINALS_ID, DERIVATIONEVENTS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX239 PRIMARY KEY(REV, CLASSIFICATION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFF0 PRIMARY KEY(REV, SPECIMENOROBSERVATIONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.REFERENCE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX244 PRIMARY KEY(REV, REFERENCE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX247 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE5B PRIMARY KEY(REV, POLYTOMOUSKEY_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX242 PRIMARY KEY(SPECIMENOROBSERVATIONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX988 PRIMARY KEY(TAXONRELATIONSHIP_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFD0 PRIMARY KEY(REV, DESCRIPTIONELEMENTBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.MEDIA_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX25D PRIMARY KEY(MEDIA_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFD6 PRIMARY KEY(DESCRIPTIONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX984 PRIMARY KEY(COLLECTION_ID, SOURCES_ID);
ALTER TABLE PUBLIC.RIGHTSINFO_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFD2 PRIMARY KEY(REV, RIGHTS_ID, MARKERS_ID);
ALTER TABLE PUBLIC.USERACCOUNT_GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX225 PRIMARY KEY(USER_ID, GRANTEDAUTHORITIES_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC3CB PRIMARY KEY(TERMVOCABULARY_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.FEATURENODE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9FE PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX56B PRIMARY KEY(DERIVATIONEVENT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX56A PRIMARY KEY(REV, TAXONNAMEBASE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.MEDIA_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX564 PRIMARY KEY(REV, MEDIA_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX560 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBF7 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.REFERENCE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX599C PRIMARY KEY(REFERENCE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.REFERENCE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE92 PRIMARY KEY(REFERENCE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB49 PRIMARY KEY(REV, TERMVOCABULARY_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE70 PRIMARY KEY(REV, STATISTICALMEASUREMENTVALUE_ID, MODIFIERS_ID);
ALTER TABLE PUBLIC.AGENTBASE_MEDIA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE8A PRIMARY KEY(REV, AGENTBASE_ID, MEDIA_ID);
ALTER TABLE PUBLIC.REPRESENTATION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE8B PRIMARY KEY(REPRESENTATION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE8C PRIMARY KEY(REV, DESCRIPTIONELEMENTBASE_ID, MEDIA_ID, SORTINDEX);
ALTER TABLE PUBLIC.STATEDATA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX60B PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX656 PRIMARY KEY(REV, SPECIMENOROBSERVATIONBASE_ID, DEFINITION_ID, DEFINITION_MAPKEY_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB36 PRIMARY KEY(SPECIMENOROBSERVATIONBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE3C PRIMARY KEY(REV, TAXONBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC81E PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.TAXONNAMEBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX98E PRIMARY KEY(TAXONNAMEBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA85 PRIMARY KEY(FEATURENODE_ID, ONLYAPPLICABLEIF_ID);
ALTER TABLE PUBLIC.WORKINGSET_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB92 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB5D PRIMARY KEY(NOMENCLATURALSTATUS_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA82 PRIMARY KEY(REV, DESCRIPTIONBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA70 PRIMARY KEY(TAXONDESCRIPTION_ID, GEOSCOPES_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB59 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5FC PRIMARY KEY(SPECIMENOROBSERVATIONBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB5A PRIMARY KEY(REV, POLYTOMOUSKEY_ID, COVEREDTAXA_ID);
ALTER TABLE PUBLIC.TAXONNODE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB62 PRIMARY KEY(TAXONNODE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5F7 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.TAXONNAMEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5F6 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA5E PRIMARY KEY(REV, POLYTOMOUSKEYNODE_ID, MODIFYINGTEXT_ID, MODIFYINGTEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.CLASSIFICATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX94C PRIMARY KEY(ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFA8 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA5C PRIMARY KEY(DESCRIPTIONBASE_ID, DESCRIPTIONSOURCES_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB86 PRIMARY KEY(DESCRIPTIONBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.MULTIACCESSKEY_SCOPE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFDE PRIMARY KEY(REV, MULTIACCESSKEY_ID, SCOPERESTRICTIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXON ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB77 PRIMARY KEY(POLYTOMOUSKEY_ID, TAXON_ID);
ALTER TABLE PUBLIC.REFERENCE_MEDIA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFDC PRIMARY KEY(REV, REFERENCE_ID, MEDIA_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX60C PRIMARY KEY(DEFINEDTERMBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2864 PRIMARY KEY(REV, STATEDATA_ID, MODIFIERS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA9D PRIMARY KEY(REV, SEQUENCE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.MEDIA_SEQUENCE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFE4 PRIMARY KEY(REV, PHYLOGENETICTREE_ID, USEDSEQUENCES_ID);
ALTER TABLE PUBLIC.WORKINGSET_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEC9 PRIMARY KEY(WORKINGSET_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX4F7 PRIMARY KEY(TYPEDESIGNATIONBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFB3 PRIMARY KEY(REV, HYBRIDRELATIONSHIP_ID, ANNOTATIONS_ID);
--ALTER TABLE PUBLIC.CLASSIFICATION_TAXONNODE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX286 PRIMARY KEY(REV, CLASSIFICATION_ID, ROOTNODES_ID);
ALTER TABLE PUBLIC.FEATURETREE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB9F PRIMARY KEY(FEATURETREE_ID, EXTENSIONS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9EB PRIMARY KEY(SEQUENCE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.RIGHTSINFO_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5DE PRIMARY KEY(RIGHTS_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA96 PRIMARY KEY(RELATIONSHIPTERMBASE_ID, INVERSEREPRESENTATIONS_ID);
ALTER TABLE PUBLIC.MEDIA_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA7B PRIMARY KEY(REV, MEDIA_ID, MARKERS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA7D PRIMARY KEY(REV, SPECIMENOROBSERVATIONBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEB6 PRIMARY KEY(TAXONNAMEBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC34 PRIMARY KEY(REV, NAMERELATIONSHIP_ID, ANNOTATIONS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX88C PRIMARY KEY(SEQUENCE_ID, EXTENSIONS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX807 PRIMARY KEY(SEQUENCE_ID, CHROMATOGRAMS_ID);
ALTER TABLE PUBLIC.ADDRESS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE PRIMARY KEY(ID);
ALTER TABLE PUBLIC.WORKINGSET_DESCRIPTIONBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDAF PRIMARY KEY(REV, WORKINGSETS_ID, DESCRIPTIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA9 PRIMARY KEY(REV, POLYTOMOUSKEY_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5A PRIMARY KEY(REV, DEFINEDTERMBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6D PRIMARY KEY(REV, LANGUAGESTRING_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA8 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX53 PRIMARY KEY(REV, INSTITUTION_ID, TYPES_ID);
ALTER TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1D0 PRIMARY KEY(REV, KEYSTATEMENT_ID, LABEL_ID, LABEL_MAPKEY_ID);
ALTER TABLE PUBLIC.CREDIT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5488765 PRIMARY KEY(REV, CREDIT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX58 PRIMARY KEY(REV, TAXONDESCRIPTION_ID, SCOPES_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX56 PRIMARY KEY(REV, FEATURE_ID, SUPPORTEDCATEGORICALENUMERATIONS_ID);
ALTER TABLE PUBLIC.TAXONBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBD PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA2 PRIMARY KEY(DESCRIPTIONELEMENTBASE_ID, SORTINDEX);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA7 PRIMARY KEY(REV, DESCRIPTIONBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.COLLECTION_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6E PRIMARY KEY(REV, COLLECTION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX55 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX71 PRIMARY KEY(REV, TAXONDESCRIPTION_ID, GEOSCOPES_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3D PRIMARY KEY(REV, DESCRIPTIONBASE_ID, DESCRIPTIVESYSTEM_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5A24 PRIMARY KEY(POLYTOMOUSKEY_ID, GEOGRAPHICALSCOPE_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3C PRIMARY KEY(POLYTOMOUSKEYNODE_ID, MODIFYINGTEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.MEDIA_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6B PRIMARY KEY(MEDIA_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6A PRIMARY KEY(REV, SPECIMENOROBSERVATIONBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6634534 PRIMARY KEY(REV, DEFINEDTERMBASE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX68 PRIMARY KEY(DESCRIPTIONELEMENTBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX65 PRIMARY KEY(DESCRIPTIONBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6F PRIMARY KEY(REV, DESCRIPTIONBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX69 PRIMARY KEY(DEFINEDTERMBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX72 PRIMARY KEY(REV, DERIVATIONEVENT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDC8 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.TAXONNAMEBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX88B PRIMARY KEY(TAXONNAMEBASE_ID, SORTINDEX);
ALTER TABLE PUBLIC.TERMVOCABULARY_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX64 PRIMARY KEY(REV, TERMVOCABULARY_ID, MARKERS_ID);
ALTER TABLE PUBLIC.WORKINGSET ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCA5 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1E1 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIAREPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX557C PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.MEDIAKEY_SCOPE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3AA PRIMARY KEY(MEDIAKEY_ID, SCOPERESTRICTIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA4 PRIMARY KEY(REV, DESCRIPTIONBASE_ID, DESCRIPTIONSOURCES_ID);
ALTER TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3AC PRIMARY KEY(STATEDATA_ID, MODIFIERS_ID);
ALTER TABLE PUBLIC.AGENTBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD PRIMARY KEY(AGENTBASE_ID, SORTINDEX);
ALTER TABLE PUBLIC.CDMMETADATA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX87 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX86 PRIMARY KEY(DETERMINATIONEVENT_ID, SETOFREFERENCES_ID);
--ALTER TABLE PUBLIC.SEQUENCE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8E PRIMARY KEY(SEQUENCE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.REFERENCE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX88 PRIMARY KEY(REV, REFERENCE_ID, MARKERS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8C PRIMARY KEY(REV, SEQUENCE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_SCOPE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8B PRIMARY KEY(REV, POLYTOMOUSKEY_ID, SCOPERESTRICTIONS_ID);
ALTER TABLE PUBLIC.REFERENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8A PRIMARY KEY(REFERENCE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.MEDIA_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX87CF PRIMARY KEY(MEDIA_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8F PRIMARY KEY(REV, CLASSIFICATION_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX95 PRIMARY KEY(REV, AGENTBASE_ID, CONTACT_PHONENUMBERS_ELEMENT);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA5 PRIMARY KEY(REV, FEATURE_ID, RECOMMENDEDMODIFIERENUMERATION_ID);
ALTER TABLE PUBLIC.KEYSTATEMENT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA6 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.TAXONNAMEBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX698 PRIMARY KEY(REV, TAXONNAMEBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3A PRIMARY KEY(REV, DEFINEDTERMBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.COLLECTION_MEDIA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX60 PRIMARY KEY(REV, COLLECTION_ID, MEDIA_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA1 PRIMARY KEY(REV, TEXTDATA_ID, MULTILANGUAGETEXT_ID, MULTILANGUAGETEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX63 PRIMARY KEY(DESCRIPTIONBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5D PRIMARY KEY(DESCRIPTIONELEMENTBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCA4 PRIMARY KEY(TAXONNAMEBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_URLS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5C PRIMARY KEY(REV, AGENTBASE_ID, CONTACT_URLS_ELEMENT);
ALTER TABLE PUBLIC.TAXONBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6B24 PRIMARY KEY(REV, TAXONBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5F PRIMARY KEY(REV, DEFINEDTERMBASE_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.TAXONBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX61 PRIMARY KEY(REV, TAXONBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1DF PRIMARY KEY(TERMVOCABULARY_ID, SORTINDEX);
ALTER TABLE PUBLIC.FEATURENODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX69E PRIMARY KEY(ID);
ALTER TABLE PUBLIC.USERACCOUNT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX850 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.MEDIAKEY_TAXONSCOPE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3AB PRIMARY KEY(MEDIAKEY_ID, TAXONOMICSCOPE_ID);
ALTER TABLE PUBLIC.DERIVATIONEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX83E PRIMARY KEY(ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDDD PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3F PRIMARY KEY(REV, FEATURENODE_ID, ONLYAPPLICABLEIF_ID);
ALTER TABLE PUBLIC.MEDIAKEY_COVEREDTAXON ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAA PRIMARY KEY(MEDIAKEY_ID, COVEREDTAXA_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX96 PRIMARY KEY(REV, NAMEDAREA_ID, COUNTRIES_ID);
ALTER TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCAA PRIMARY KEY(MULTIACCESSKEY_ID, COVEREDTAXA_ID);
ALTER TABLE PUBLIC.WORKINGSET_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC9 PRIMARY KEY(REV, WORKINGSET_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.FEATURETREE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAF PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.COLLECTION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAD PRIMARY KEY(REV, COLLECTION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC8 PRIMARY KEY(REV, DETERMINATIONEVENT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.SEQUENCE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3DF PRIMARY KEY(REV, SEQUENCE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.USERACCOUNT_PERMISSIONGROUP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAB PRIMARY KEY(MEMBERS_ID, GROUPS_ID);
ALTER TABLE PUBLIC.TAXONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX4A PRIMARY KEY(REV, TAXONBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCC2 PRIMARY KEY(MULTIACCESSKEY_ID, GEOGRAPHICALSCOPE_ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX879 PRIMARY KEY(NOMENCLATURALSTATUS_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC7 PRIMARY KEY(REV, GATHERINGEVENT_ID, COLLECTINGAREAS_ID);
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAC PRIMARY KEY(FEATURENODE_ID, INAPPLICABLEIF_ID);
ALTER TABLE PUBLIC.AGENTBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB9 PRIMARY KEY(REV, AGENTBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC0 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.COLLECTION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB5 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.CLASSIFICATION_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBF PRIMARY KEY(REV, CLASSIFICATION_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX86A PRIMARY KEY(REV, TERMVOCABULARY_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3DC PRIMARY KEY(REV, REPRESENTATION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_ADDRESS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBE PRIMARY KEY(AGENTBASE_ID, CONTACT_ADDRESSES_ID);
ALTER TABLE PUBLIC.AGENTBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB8 PRIMARY KEY(REV, AGENTBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBC PRIMARY KEY(HOMOTYPICALGROUP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.MEDIAREPRESENTATIONPART_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX48 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.COLLECTION_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBB PRIMARY KEY(COLLECTION_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB3 PRIMARY KEY(REV, FEATURENODE_ID, INAPPLICABLEIF_ID);
ALTER TABLE PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB1 PRIMARY KEY(GROUP_ID, GRANTEDAUTHORITIES_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB6 PRIMARY KEY(FEATURE_ID, RECOMMENDEDSTATISTICALMEASURES_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_SCOPE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB7 PRIMARY KEY(POLYTOMOUSKEY_ID, SCOPERESTRICTIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB4 PRIMARY KEY(REV, AGENTBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBA PRIMARY KEY(REV, AGENTBASE_ID, CONTACT_EMAILADDRESSES_ELEMENT);
ALTER TABLE PUBLIC.STATEDATA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC6A35D PRIMARY KEY(STATEDATA_ID, MODIFYINGTEXT_MAPKEY_ID);
ALTER TABLE PUBLIC.MEDIA_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX4F PRIMARY KEY(REV, MEDIA_ID, TITLE_ID, TITLE_MAPKEY_ID);
ALTER TABLE PUBLIC.CDM_VIEW ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC5 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIAKEY_NAMEDAREA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDBEE PRIMARY KEY(REV, MEDIAKEY_ID, GEOGRAPHICALSCOPE_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3EB PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MEDIAKEY_TAXONSCOPE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE05 PRIMARY KEY(REV, MEDIAKEY_ID, TAXONOMICSCOPE_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3CC PRIMARY KEY(REV, TAXONRELATIONSHIP_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.ANNOTATION_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX4D PRIMARY KEY(REV, ANNOTATION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX36 PRIMARY KEY(REV, DEFINEDTERMBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX35 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE02 PRIMARY KEY(REV, FEATURETREE_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDBE PRIMARY KEY(NAMEDAREA_ID, COUNTRIES_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX31 PRIMARY KEY(DESCRIPTIONELEMENTBASE_ID, MODIFIERS_ID);
ALTER TABLE PUBLIC.FEATURETREE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX32 PRIMARY KEY(REV, FEATURETREE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX33 PRIMARY KEY(REV, DESCRIPTIONBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.COLLECTION_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX34 PRIMARY KEY(REV, COLLECTION_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX37 PRIMARY KEY(REV, TAXONRELATIONSHIP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX4E PRIMARY KEY(REFERENCE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX43 PRIMARY KEY(REV, CLASSIFICATION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.WORKINGSET_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3E8 PRIMARY KEY(WORKINGSET_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3D9 PRIMARY KEY(REV, POLYTOMOUSKEY_ID, MARKERS_ID);
ALTER TABLE PUBLIC.COLLECTION_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC4 PRIMARY KEY(COLLECTION_ID, SORTINDEX);
ALTER TABLE PUBLIC.MEDIA_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX46 PRIMARY KEY(MEDIAKEY_ID, KEYREPRESENTATIONS_ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3E PRIMARY KEY(REV, DETERMINATIONEVENT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX45 PRIMARY KEY(REV, HOMOTYPICALGROUP_ID, MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3E3 PRIMARY KEY(REV, TAXONNAMEBASE_ID, TYPEDESIGNATIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEDIA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX52 PRIMARY KEY(REV, DEFINEDTERMBASE_ID, MEDIA_ID);
ALTER TABLE PUBLIC.AGENTBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX44 PRIMARY KEY(AGENTBASE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX50 PRIMARY KEY(DEFINEDTERMBASE_ID, SORTINDEX);
ALTER TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC3 PRIMARY KEY(REV, INDIVIDUALSASSOCIATION_ID, DESCRIPTION_ID, DESCRIPTION_MAPKEY_ID);
ALTER TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC2 PRIMARY KEY(REV, FEATURETREE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX871 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCC8 PRIMARY KEY(GATHERINGEVENT_ID, COLLECTINGAREAS_ID);
ALTER TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC1 PRIMARY KEY(REV, REFERENCE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX51 PRIMARY KEY(REV, RELATIONSHIPTERMBASE_ID, INVERSEREPRESENTATIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_ADDRESS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCE45 PRIMARY KEY(REV, AGENTBASE_ID, CONTACT_ADDRESSES_ID);
ALTER TABLE PUBLIC.PERMISSIONGROUP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE26 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.FEATURETREE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX93 PRIMARY KEY(FEATURETREE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.AUDITEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8A37655 PRIMARY KEY(REVISIONNUMBER);
ALTER TABLE PUBLIC.TAXONNODE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX66E PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9E PRIMARY KEY(DETERMINATIONEVENT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX82 PRIMARY KEY(REV, CLASSIFICATION_ID, SOURCES_ID);
ALTER TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7A125 PRIMARY KEY(AGENTBASE_ID, SOURCES_ID);
--ALTER TABLE PUBLIC.SEQUENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7F PRIMARY KEY(ID);
ALTER TABLE PUBLIC.AGENTBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX63456AE PRIMARY KEY(REV, AGENTBASE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX83 PRIMARY KEY(DEFINEDTERMBASE_ID, REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX98 PRIMARY KEY(CLASSIFICATION_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX53456AE PRIMARY KEY(AGENTBASE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCE5 PRIMARY KEY(ORIGINALSOURCEBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX880 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.AGENTBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX43456AE PRIMARY KEY(ID);
ALTER TABLE PUBLIC.AGENTBASE_AGENTBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX33456AE PRIMARY KEY(TEAM_ID, SORTINDEX);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7E PRIMARY KEY(REV, DESCRIPTIONBASE_ID, SOURCES_ID);
ALTER TABLE PUBLIC.AGENTBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB3456AE PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9F PRIMARY KEY(REV, DESCRIPTIONBASE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.CLASSIFICATION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX84 PRIMARY KEY(CLASSIFICATION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.GATHERINGEVENT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX87A PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.AGENTBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF PRIMARY KEY(REV, AGENTBASE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6E1 PRIMARY KEY(NAMERELATIONSHIP_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.CREDIT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1 PRIMARY KEY(CREDIT_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_SCOPE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3A0 PRIMARY KEY(TAXONDESCRIPTION_ID, SCOPES_ID);
ALTER TABLE PUBLIC.WORKINGSET_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX99 PRIMARY KEY(WORKINGSET_ID, MARKERS_ID);
ALTER TABLE PUBLIC.ANNOTATION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA3456AE PRIMARY KEY(ANNOTATION_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6EF PRIMARY KEY(ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9A PRIMARY KEY(REV, SPECIMENOROBSERVATIONBASE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.LOCUS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX80 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.AGENTBASE_AGENTBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX93456AE PRIMARY KEY(REV, TEAM_ID, TEAMMEMBERS_ID, SORTINDEX);
ALTER TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9D PRIMARY KEY(REV, MULTIACCESSKEY_ID, TAXONOMICSCOPE_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCFF PRIMARY KEY(REV, TERMVOCABULARY_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.REFERENCE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX85 PRIMARY KEY(REV, REFERENCE_ID, EXTENSIONS_ID);
ALTER TABLE PUBLIC.EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX81 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.MULTIACCESSKEY_SCOPE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7C PRIMARY KEY(MULTIACCESSKEY_ID, SCOPERESTRICTIONS_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX92 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.COLLECTION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX90 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX77 PRIMARY KEY(LSIDAUTHORITY_ID, NAMESPACES_MAPKEY);
ALTER TABLE PUBLIC.REFERENCE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX81E PRIMARY KEY(REFERENCE_ID, MARKERS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7B PRIMARY KEY(REV, DESCRIPTIONELEMENTBASE_ID, SOURCES_ID);
--ALTER TABLE PUBLIC.SEQUENCE_REFERENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX762 PRIMARY KEY(SEQUENCE_ID, CITATIONS_ID);
ALTER TABLE PUBLIC.KEYSTATEMENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7A PRIMARY KEY(ID);
ALTER TABLE PUBLIC.REPRESENTATION_MARKER_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX91 PRIMARY KEY(REV, REPRESENTATION_ID, MARKERS_ID);
ALTER TABLE PUBLIC.MEDIAKEY_SCOPE_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX40F PRIMARY KEY(REV, MEDIAKEY_ID, SCOPERESTRICTIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7D PRIMARY KEY(ID);
--ALTER TABLE PUBLIC.SEQUENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX97 PRIMARY KEY(SEQUENCE_ID, RIGHTS_ID);
ALTER TABLE PUBLIC.ADDRESS_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2 PRIMARY KEY(ID, REV);
ALTER TABLE PUBLIC.REFERENCE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX804 PRIMARY KEY(REV, REFERENCE_ID, ANNOTATIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX668 PRIMARY KEY(REV, POLYTOMOUSKEY_ID, GEOGRAPHICALSCOPE_ID);
ALTER TABLE PUBLIC.CREDIT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6E4 PRIMARY KEY(CREDIT_ID, MARKERS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX79 PRIMARY KEY(SPECIMENOROBSERVATIONBASE_ID, DEFINITION_MAPKEY_ID);
ALTER TABLE PUBLIC.AGENTBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX94 PRIMARY KEY(REV, AGENTBASE_ID, CREDITS_ID, SORTINDEX);
ALTER TABLE PUBLIC.CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX76 PRIMARY KEY(ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7A39 UNIQUE(UUID);
ALTER TABLE PUBLIC.MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX45D7 UNIQUE(UUID);
ALTER TABLE PUBLIC.MEDIA_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX87CF2 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3406 UNIQUE(UUID);
ALTER TABLE PUBLIC.AGENTBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF1E UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.MEDIA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9696 UNIQUE(TITLE_ID);
ALTER TABLE PUBLIC.SEQUENCE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9EB9 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCE56 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.REFERENCE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX71C0 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.REPRESENTATION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF1F6 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.COLLECTION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB51 UNIQUE(UUID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6E1E UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.REFERENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8AD UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX56B9 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE98 UNIQUE(MODIFYINGTEXT_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF0C6 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA1D5 UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.FEATURETREE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXE04 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXC03 UNIQUE(UUID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXF21 UNIQUE(CREDITS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXX977 UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.TAXONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXC0FE UNIQUE(UUID);
ALTER TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXBC2C UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.FEATURETREE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXF07 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TAXONBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXAFBA UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXX2F29 UNIQUE(UUID);
ALTER TABLE PUBLIC.RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXX9013 UNIQUE(UUID);
ALTER TABLE PUBLIC.MEDIA_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXX15AD UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXXDC0 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXXXX3EB1 UNIQUE(UUID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9EF UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7B13 UNIQUE(UUID);
ALTER TABLE PUBLIC.LOCUS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX453E UNIQUE(UUID);
ALTER TABLE PUBLIC.CLASSIFICATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX94CF UNIQUE(UUID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2BE4 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDBF UNIQUE(SUPPORTEDCATEGORICALENUMERATIONS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5422 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB36B UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.COLLECTION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD488 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX98E1 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX4E7 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX50A UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFEB UNIQUE(UUID);
ALTER TABLE PUBLIC.REPRESENTATION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE8BF UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.AGENTBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE8E UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEBD UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFDB UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1B0 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA86 UNIQUE(UUID);
ALTER TABLE PUBLIC.MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX871F UNIQUE(UUID);
ALTER TABLE PUBLIC.COLLECTION_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC46 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX831 UNIQUE(REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.MEDIAREPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBE03 UNIQUE(UUID);
--ALTER TABLE PUBLIC.SEQUENCE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7E63 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX65C UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.MEDIA_DESCRIPTION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD9A9 UNIQUE(DESCRIPTION_ID);
ALTER TABLE PUBLIC.CDM_VIEW ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC5D UNIQUE(UUID);
ALTER TABLE PUBLIC.STATEDATA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC61 UNIQUE(MODIFYINGTEXT_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEC3 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.PERMISSIONGROUP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE261 UNIQUE(UUID, NAME);
ALTER TABLE PUBLIC.CREDIT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1E UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.STATEDATA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX29C UNIQUE(UUID);
ALTER TABLE PUBLIC.CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX76F UNIQUE(UUID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7FE3 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TAXONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX56B67 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.WORKINGSET_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX99E UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX986 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5DC UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB869 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF70 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.TAXONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX185F UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1E18 UNIQUE(UUID);
ALTER TABLE PUBLIC.REFERENCE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX599CB UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.FEATURENODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX69E7 UNIQUE(UUID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8DCF UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2C5B UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB5D0 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX4F7D UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6EF3 UNIQUE(UUID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX79F UNIQUE(DEFINITION_ID);
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX214 UNIQUE(UUID);
ALTER TABLE PUBLIC.CDMMETADATA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX87C UNIQUE(UUID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9E5E UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8797 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8188 UNIQUE(UUID);
ALTER TABLE PUBLIC.TAXONNODE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXED73 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX341F UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX63F UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAE96 UNIQUE(MARKERS_ID);
--ALTER TABLE PUBLIC.CLASSIFICATION_TAXONNODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD7D UNIQUE(ROOTNODES_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2820 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.ANNOTATION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAE UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF52 UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEB60 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE56 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX819 UNIQUE(UUID);
ALTER TABLE PUBLIC.CDM_VIEW_CDM_VIEW ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX230 UNIQUE(SUPERVIEWS_ID);
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX988B UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.NAMERELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC819 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXAE52 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX60CA UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.COLLECTION_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXDD7 UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBF7D UNIQUE(UUID);
ALTER TABLE PUBLIC.TERMVOCABULARY_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2E26 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.AGENTBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX40 UNIQUE(UUID);
ALTER TABLE PUBLIC.CREDIT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6E4D UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX36E6 UNIQUE(SOURCES_ID);
--ALTER TABLE PUBLIC.SEQUENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7263 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.MEDIA_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX6B2 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBCF UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX909ED UNIQUE(DESCRIPTION_ID);
ALTER TABLE PUBLIC.FEATURETREE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX934 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.AGENTBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX447 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.SEQUENCE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8E8 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX1DFF UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.AGENTBASE_ADDRESS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBE5 UNIQUE(CONTACT_ADDRESSES_ID);
ALTER TABLE PUBLIC.REFERENCE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX81E7 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX242C UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.AGENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX59 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX160 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.FEATURETREE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX69EA1 UNIQUE(UUID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2B1 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7D6 UNIQUE(UUID);
ALTER TABLE PUBLIC.FEATURETREE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF96 UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC3CBC UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX35B UNIQUE(UUID);
ALTER TABLE PUBLIC.TAXONBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFF44 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.COLLECTION_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBBE UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX919B UNIQUE(UUID);
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2A9 UNIQUE(UUID);
ALTER TABLE PUBLIC.TAXONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXF6BE UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8B66 UNIQUE(UUID);
ALTER TABLE PUBLIC.ANNOTATION_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX953D UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCA49 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFD69 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.GATHERINGEVENT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX43DC UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXECC2 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC247 UNIQUE(UUID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX688 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX75 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA961 UNIQUE(INVERSEREPRESENTATIONS_ID);
ALTER TABLE PUBLIC.USERACCOUNT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC4F06 UNIQUE(UUID, USERNAME);
ALTER TABLE PUBLIC.ADDRESS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE6 UNIQUE(UUID);
ALTER TABLE PUBLIC.REFERENCE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXE924 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX145 UNIQUE(RECOMMENDEDMODIFIERENUMERATION_ID);
ALTER TABLE PUBLIC.DETERMINATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXBB00 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX88BA UNIQUE(CREDITS_ID);
--ALTER TABLE PUBLIC.SEQUENCE_MEDIA ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX8079 UNIQUE(CHROMATOGRAMS_ID);
ALTER TABLE PUBLIC.LSIDAUTHORITY ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA443 UNIQUE(UUID, AUTHORITY);
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX69B UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC103 UNIQUE(UUID);
ALTER TABLE PUBLIC.GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3463 UNIQUE(UUID, AUTHORITY);
--ALTER TABLE PUBLIC.SEQUENCE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX88C2 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2B2B UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.DERIVATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD9E UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA656 UNIQUE(UUID);
ALTER TABLE PUBLIC.MEDIA_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX25D4 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.WORKINGSET_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXEC95 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX729C UNIQUE(LABEL_ID);
ALTER TABLE PUBLIC.SEQUENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7F1 UNIQUE(UUID);
ALTER TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX371A UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.TAXONNODE_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB625 UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.FEATURETREE_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX444F UNIQUE(REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXFDC73 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.DERIVATIONEVENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX83EE UNIQUE(UUID);
ALTER TABLE PUBLIC.MEDIAREPRESENTATIONPART ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5575 UNIQUE(UUID);
ALTER TABLE PUBLIC.GATHERINGEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX63FFD UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5605 UNIQUE(UUID);
ALTER TABLE PUBLIC.AGENTBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD8 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.RIGHTSINFO_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5DEB UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX30E3 UNIQUE(REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX984E UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA47C UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.CLASSIFICATION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX845 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3C3 UNIQUE(MODIFYINGTEXT_ID);
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5FCB UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB592 UNIQUE(UUID);
ALTER TABLE PUBLIC.WORKINGSET_REPRESENTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX3E88 UNIQUE(REPRESENTATIONS_ID);
ALTER TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX9063 UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.KEYSTATEMENT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7A0 UNIQUE(UUID);
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXA5F1 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX11A UNIQUE(DESCRIPTION_ID);
ALTER TABLE PUBLIC.MEDIA_SEQUENCE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX448E UNIQUE(USEDSEQUENCES_ID);
ALTER TABLE PUBLIC.WORKINGSET ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCA5E UNIQUE(UUID);
ALTER TABLE PUBLIC.TERMVOCABULARY_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXC4D7 UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.FEATURETREE_EXTENSION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXB9F0 UNIQUE(EXTENSIONS_ID);
ALTER TABLE PUBLIC.COLLECTION_ANNOTATION ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXCFB UNIQUE(ANNOTATIONS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONBASE_CREDIT ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXED4 UNIQUE(CREDITS_ID);
ALTER TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX7D78 UNIQUE(STATUS_ID);
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX5094 UNIQUE(MULTILANGUAGETEXT_ID);
ALTER TABLE PUBLIC.RIGHTSINFO_MARKER ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX14BB UNIQUE(MARKERS_ID);
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD4BB UNIQUE(UUID);
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.CONSTRAINT_XXXD80E UNIQUE(SOURCES_ID);
ALTER TABLE PUBLIC.MEDIA_RIGHTSINFO ADD CONSTRAINT PUBLIC.CONSTRAINT_XXX2EC UNIQUE(RIGHTS_ID);
ALTER TABLE PUBLIC.LANGUAGESTRING_ANNOTATION ADD CONSTRAINT PUBLIC.FK8400DFA537998500 FOREIGN KEY(LANGUAGESTRING_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT ADD CONSTRAINT PUBLIC.FKE9D17767D0BDAE9B FOREIGN KEY(FEATURE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_SEQUENCE_AUD ADD CONSTRAINT PUBLIC.FK3C7BD9CD34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_CREDIT ADD CONSTRAINT PUBLIC.FK4CB48B3D9C9D39 FOREIGN KEY(TAXONBASE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.FKFF4D58CDBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE ADD CONSTRAINT PUBLIC.FK6AE876AB52FCC4B FOREIGN KEY(FEATURENODE_ID) REFERENCES PUBLIC.FEATURENODE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FKF810044F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK36EEE73234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FKAB2ADBA334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS_AUD ADD CONSTRAINT PUBLIC.FKDDD347F534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK886D90B734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKCFAA93163B8A5ABA FOREIGN KEY(SPECIMENOROBSERVATIONBASE_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE767134AF0E81 FOREIGN KEY(INDESCRIPTION_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK365E4F3C3B8A5ABA FOREIGN KEY(SPECIMENOROBSERVATIONBASE_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_CREDIT ADD CONSTRAINT PUBLIC.FK29BCD8B28C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_MARKER ADD CONSTRAINT PUBLIC.FK862BAEA7258E060 FOREIGN KEY(TERMVOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKF98828E834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK41ED09731E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_CREDIT ADD CONSTRAINT PUBLIC.FKC1F78FF4C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A664FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.FKB05CF9284FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA32728C750E27 FOREIGN KEY(LIFESTAGE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_EXTENSION ADD CONSTRAINT PUBLIC.FK8E1E5676927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MARKER ADD CONSTRAINT PUBLIC.FK89261453C0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FK8AC9DCAE4CB0F315 FOREIGN KEY(TYPENAME_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK65CF621B9C9D39 FOREIGN KEY(TAXONBASE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_MARKER ADD CONSTRAINT PUBLIC.FKD21E7935C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK4B22838834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C67F90DF03 FOREIGN KEY(EXBASIONYMAUTHORSHIP_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER ADD CONSTRAINT PUBLIC.FKB3FFDC7C777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_EXTENSION ADD CONSTRAINT PUBLIC.FK7BE66D41927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK99ABA37B34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK6A2601A9C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_EXTENSION ADD CONSTRAINT PUBLIC.FKA8814EB2258E060 FOREIGN KEY(TERMVOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.FK9033CE7455F241D4 FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.FK1F5A74893FF8E7B2 FOREIGN KEY(GEOGRAPHICALSCOPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_CREDIT ADD CONSTRAINT PUBLIC.FKC1F78FF432D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEDIA_AUD ADD CONSTRAINT PUBLIC.FKDD9AE8FC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_AUD ADD CONSTRAINT PUBLIC.FKF3D3D74334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK4D73278044E9E6D4 FOREIGN KEY(TYPEDESIGNATIONBASE_ID) REFERENCES PUBLIC.TYPEDESIGNATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK9E7794688C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.FK7482BA02BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FKAE4A67A734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK8E50DD02C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.FK1FFEC88B7029BD9F FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK5574E12EF135C42B FOREIGN KEY(POLYTOMOUSKEYNODE_ID) REFERENCES PUBLIC.POLYTOMOUSKEYNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK351E786C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK92D2427034869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775A4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.EXTENSION ADD CONSTRAINT PUBLIC.FK52EF3C1FAD392BD3 FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775AC73A7584 FOREIGN KEY(KEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK839208C489D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK5574E12E9682414B FOREIGN KEY(MODIFYINGTEXT_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKE40621B434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE ADD CONSTRAINT PUBLIC.FK8FB1ED8355A53F64 FOREIGN KEY(SETOFREFERENCES_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK409B7FE334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CREDIT ADD CONSTRAINT PUBLIC.FK78CA97194FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.FK5E5108328482454 FOREIGN KEY(RELATEDTO_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.FK1FFEC88BBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP ADD CONSTRAINT PUBLIC.FK7DECCC184FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION_MARKER ADD CONSTRAINT PUBLIC.FK560063EC47E8AE60 FOREIGN KEY(REPRESENTATION_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA ADD CONSTRAINT PUBLIC.FK46C7FC44FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION ADD CONSTRAINT PUBLIC.FKDB1100068D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_EXTENSION ADD CONSTRAINT PUBLIC.FKAD1E6D3447C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKC753F137C6D55834 FOREIGN KEY(MULTILANGUAGETEXT_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE ADD CONSTRAINT PUBLIC.FK544ADBE1D0374392 FOREIGN KEY(PUBLISHEDIN_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKC753F137C086B46F FOREIGN KEY(TEXTDATA_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK8F39D56034869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_MARKER_AUD ADD CONSTRAINT PUBLIC.FK160230F834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKF41ADEEB53DD72E3 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE_AUD ADD CONSTRAINT PUBLIC.FKE090C39D34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_MARKER_AUD ADD CONSTRAINT PUBLIC.FK89C7394C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.FK86E8953734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.LSIDAUTHORITY_NAMESPACES ADD CONSTRAINT PUBLIC.FKB04948F64FFCFD94 FOREIGN KEY(LSIDAUTHORITY_ID) REFERENCES PUBLIC.LSIDAUTHORITY(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.FK9033CE744FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK69D9A11A7C34B6D6 FOREIGN KEY(COLLECTINGAREAS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_FEATURE ADD CONSTRAINT PUBLIC.FK58ACF564F1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK97F0C88934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKE86DE57D34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_CREDIT ADD CONSTRAINT PUBLIC.FK4950A17284A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CREDIT ADD CONSTRAINT PUBLIC.FK2636742286EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_MARKER_AUD ADD CONSTRAINT PUBLIC.FK3F51048634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION_ANNOTATION ADD CONSTRAINT PUBLIC.FK371091E147E8AE60 FOREIGN KEY(REPRESENTATION_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT_AUD ADD CONSTRAINT PUBLIC.FKDABF305434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK9754F464C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_MARKER ADD CONSTRAINT PUBLIC.FK97D36661777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FK38B45E734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.FK69FBDD37777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_CREDIT ADD CONSTRAINT PUBLIC.FKADC940089D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKDC75C70F3A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK1306FAAF34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO_MARKER_AUD ADD CONSTRAINT PUBLIC.FKC6FB487334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.FK6F1286F33DA462D5 FOREIGN KEY(ACTOR_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING_ANNOTATION ADD CONSTRAINT PUBLIC.FK8400DFA51E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION ADD CONSTRAINT PUBLIC.FKAAC8AFE6B31C4747 FOREIGN KEY(REPRESENTATIONS_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK70BB5FD8DA0C376A FOREIGN KEY(LABEL_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK4FDFF8D134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_SCOPE ADD CONSTRAINT PUBLIC.FKBFFEE8F0546985E4 FOREIGN KEY(SCOPERESTRICTIONS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION ADD CONSTRAINT PUBLIC.FKA408B63A258E060 FOREIGN KEY(TERMVOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF ADD CONSTRAINT PUBLIC.FK56833D0152FCC4B FOREIGN KEY(FEATURENODE_ID) REFERENCES PUBLIC.FEATURENODE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FKE644349534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_MEDIA_AUD ADD CONSTRAINT PUBLIC.FK9AABDB5434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.FKDE29CD8033B8A841 FOREIGN KEY(SPECIMEN_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_AUD ADD CONSTRAINT PUBLIC.FKDA6A700C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA3272C8505DB FOREIGN KEY(PRESERVATION_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_RIGHTSINFO ADD CONSTRAINT PUBLIC.FKDB1266D2C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.CREDIT ADD CONSTRAINT PUBLIC.FK78CA9719F7976FC5 FOREIGN KEY(AGENT_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_MARKER_AUD ADD CONSTRAINT PUBLIC.FK6AEAB69934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK579A1DC028459272 FOREIGN KEY(DESCRIPTION_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKB212F49034869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.FK6F1286F34FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKCA7F794A3B8A5ABA FOREIGN KEY(SPECIMENOROBSERVATIONBASE_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_CREDIT ADD CONSTRAINT PUBLIC.FK510B2ACBF1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_MARKER ADD CONSTRAINT PUBLIC.FKD21E7935777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.USERACCOUNT ADD CONSTRAINT PUBLIC.FKB3F13C2AAC1B820 FOREIGN KEY(PERSON_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.FK404D5F2B403E17F4 FOREIGN KEY(INSTITUTION_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FK68FA835534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_ANNOTATION ADD CONSTRAINT PUBLIC.FKA020DAAAC2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_ANNOTATION ADD CONSTRAINT PUBLIC.FK76D2071C258E060 FOREIGN KEY(TERMVOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE76715E9914B8 FOREIGN KEY(STATUS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.EXTENSION ADD CONSTRAINT PUBLIC.FK52EF3C1F4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FKECAB4AC934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_SEQUENCE ADD CONSTRAINT PUBLIC.FK61D09FCF29B4761 FOREIGN KEY(USEDSEQUENCES_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE ADD CONSTRAINT PUBLIC.FKED8F3A5489D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKF746D2768C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATIONPART ADD CONSTRAINT PUBLIC.FK67A455444FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.FK5E51083BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK839208C43A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
--ALTER TABLE PUBLIC.CLASSIFICATION_TAXONNODE ADD CONSTRAINT PUBLIC.FKB0BD86D318929176 FOREIGN KEY(ROOTNODES_ID) REFERENCES PUBLIC.TAXONNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKB5FDC9A94FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_CREDIT ADD CONSTRAINT PUBLIC.FK29BCD8B232D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY ADD CONSTRAINT PUBLIC.FKA9E6B1384FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK7B5CDEB934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKE03B82923B8A5ABA FOREIGN KEY(SPECIMENOROBSERVATIONBASE_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.FKEFA0D10B4AAB411A FOREIGN KEY(DERIVATIONEVENT_ID) REFERENCES PUBLIC.DERIVATIONEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKFB680C813A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_AUD ADD CONSTRAINT PUBLIC.FK6A6D682B34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER ADD CONSTRAINT PUBLIC.FK2F5128E8D2CB1D4 FOREIGN KEY(NOMENCLATURALSTATUS_ID) REFERENCES PUBLIC.NOMENCLATURALSTATUS(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK13BD64E847C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK44D5F7D886EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_ANNOTATION ADD CONSTRAINT PUBLIC.FKFC824E31E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT ADD CONSTRAINT PUBLIC.FK45F60AFBE8CE10AA FOREIGN KEY(COUNTRY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION_MARKER_AUD ADD CONSTRAINT PUBLIC.FKD640BBBD34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKD1D59CDC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.FK76DDD01BF95F225A FOREIGN KEY(GATHERINGEVENT_ID) REFERENCES PUBLIC.GATHERINGEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_REFERENCE ADD CONSTRAINT PUBLIC.FK6944904DD57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.PERMISSIONGROUP ADD CONSTRAINT PUBLIC.FK629941D04FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK7AE0176334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK65CF621BC13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO ADD CONSTRAINT PUBLIC.FK91E56DF7E8D36B00 FOREIGN KEY(LANGUAGE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.KEYSTATEMENT ADD CONSTRAINT PUBLIC.FK7125B9F04FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT ADD CONSTRAINT PUBLIC.FK426BC033DA462D5 FOREIGN KEY(ACTOR_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FKB5AE7AB734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ADDRESS ADD CONSTRAINT PUBLIC.FK1ED033D42687715A FOREIGN KEY(COUNTRY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.FK404D5F2BAEC3B8B8 FOREIGN KEY(SCHOOL_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK579A1DC086C86FE0 FOREIGN KEY(TAXONINTERACTION_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.FK1C727CFF89D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER ADD CONSTRAINT PUBLIC.FK97E0D105E0960EC4 FOREIGN KEY(MODIFIERS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE ADD CONSTRAINT PUBLIC.FK9249B49B4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE_ANNOTATION ADD CONSTRAINT PUBLIC.FKD8A9A9A21E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKC28EE7E68C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK4AD9EDFE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.FK404D5F2B4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO ADD CONSTRAINT PUBLIC.FK91E56DF7BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION ADD CONSTRAINT PUBLIC.FKF078ABEBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_COVEREDTAXON_AUD ADD CONSTRAINT PUBLIC.FK857187B134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK3296F9AF34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_MEDIA ADD CONSTRAINT PUBLIC.FKBBEF5B0C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_TAXONSCOPE ADD CONSTRAINT PUBLIC.FKC00C3966815C7E9 FOREIGN KEY(MEDIAKEY_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775A4382686A FOREIGN KEY(STATEMENT_ID) REFERENCES PUBLIC.KEYSTATEMENT(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATIONPART ADD CONSTRAINT PUBLIC.FK67A45544E3818E37 FOREIGN KEY(REPRESENTATION_ID) REFERENCES PUBLIC.MEDIAREPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.USERACCOUNT_PERMISSIONGROUP ADD CONSTRAINT PUBLIC.FK812DE753887E3D12 FOREIGN KEY(MEMBERS_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK771279A934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION ADD CONSTRAINT PUBLIC.FK1A21C74FE7692740 FOREIGN KEY(COMMENTATOR_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.FKE412C816777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_MEDIA ADD CONSTRAINT PUBLIC.FK7320E703EB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_ANNOTATION ADD CONSTRAINT PUBLIC.FKEA970F701E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_AGENTBASE ADD CONSTRAINT PUBLIC.FK4D34EDADE9E535F9 FOREIGN KEY(TEAMMEMBERS_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKD3BAB2F634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK34187F0D34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FKF3AD3201F1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CREDIT_ANNOTATION ADD CONSTRAINT PUBLIC.FKE8DA4C354CF694E0 FOREIGN KEY(CREDIT_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKD5D2B32D927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.FK1DB2497378D1BD FOREIGN KEY(MODIFIER_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKE03B8292927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.FK69FBDD372BD180D9 FOREIGN KEY(TAXONRELATIONSHIP_ID) REFERENCES PUBLIC.TAXONRELATIONSHIP(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO_MARKER ADD CONSTRAINT PUBLIC.FKB739BBA2C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK4CF70A6C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT ADD CONSTRAINT PUBLIC.FKE9D17767F3BB39BD FOREIGN KEY(RECOMMENDEDMEASUREMENTUNITS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKCA7F794A3A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK626B785084A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATION ADD CONSTRAINT PUBLIC.FK1966BDB1C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FKD9895D8334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION ADD CONSTRAINT PUBLIC.FK1A21C74FE8D36B00 FOREIGN KEY(LANGUAGE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.FKCEF24485777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK88BF955134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKCB4FE9BE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.FK560BA7926615E90D FOREIGN KEY(STATUS_ID) REFERENCES PUBLIC.NOMENCLATURALSTATUS(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKB2C4367334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_MARKER ADD CONSTRAINT PUBLIC.FKF0CA00FBEB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS_AUD ADD CONSTRAINT PUBLIC.FK88A308E634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK208142711E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.FK5E5108316CDFF85 FOREIGN KEY(RELATEDFROM_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_ANNOTATION ADD CONSTRAINT PUBLIC.FKCBBA8CBDBBD2C869 FOREIGN KEY(WORKINGSET_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_MARKER ADD CONSTRAINT PUBLIC.FK9CB22CC8777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_MEDIA_AUD ADD CONSTRAINT PUBLIC.FK20025CB734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C662AD57A2 FOREIGN KEY(EXCOMBINATIONAUTHORSHIP_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK921A01F0C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKB5C75EC02BEBA58D FOREIGN KEY(DESCRIPTION_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION ADD CONSTRAINT PUBLIC.FKDB110006BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CREDIT ADD CONSTRAINT PUBLIC.FK78FF2B1232D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_MARKER ADD CONSTRAINT PUBLIC.FK97D36661BFEAE500 FOREIGN KEY(HOMOTYPICALGROUP_ID) REFERENCES PUBLIC.HOMOTYPICALGROUP(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_TAXONSCOPE ADD CONSTRAINT PUBLIC.FKC00C3966DE9A3E39 FOREIGN KEY(TAXONOMICSCOPE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_AUD ADD CONSTRAINT PUBLIC.FKF3803C234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK921A01F0C0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION ADD CONSTRAINT PUBLIC.FKF078ABE16B9CA77 FOREIGN KEY(INSTITUTE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK70BB5FD89C782795 FOREIGN KEY(LABEL_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.FK7482BA024FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_EXTENSION ADD CONSTRAINT PUBLIC.FKDEFCDC0B8D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA_AUD ADD CONSTRAINT PUBLIC.FK5522034734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP ADD CONSTRAINT PUBLIC.FK3C8E1FF94FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES_AUD ADD CONSTRAINT PUBLIC.FKCAF7E75F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_PHONENUMBERS ADD CONSTRAINT PUBLIC.FKC171CC2486EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY ADD CONSTRAINT PUBLIC.FK487AA692BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE ADD CONSTRAINT PUBLIC.FK3ADD7CD5D86445CE FOREIGN KEY(TAXONDESCRIPTION_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.FKFF4D58CD4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_MARKER ADD CONSTRAINT PUBLIC.FK59778AB3777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.FK76DDD01B1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP ADD CONSTRAINT PUBLIC.FK3C8E1FF916B9CA77 FOREIGN KEY(INSTITUTE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING_MARKER_AUD ADD CONSTRAINT PUBLIC.FK2331098134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_MARKER ADD CONSTRAINT PUBLIC.FK6BEDC7EE8D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_AUD ADD CONSTRAINT PUBLIC.FKA6ED3B6334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.FK5C4751026BE0BFDA FOREIGN KEY(DETERMINATIONEVENT_ID) REFERENCES PUBLIC.DETERMINATIONEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE_AUD ADD CONSTRAINT PUBLIC.FK63A5382634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKBFB16C4D34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK107321E2E0960EC4 FOREIGN KEY(MODIFIERS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK8C145C434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE7671E8D36B00 FOREIGN KEY(LANGUAGE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA ADD CONSTRAINT PUBLIC.FK46C7FC4AEB7F3BE FOREIGN KEY(CITATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE ADD CONSTRAINT PUBLIC.FK6AE876AB57FA94D4 FOREIGN KEY(ONLYAPPLICABLEIF_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER ADD CONSTRAINT PUBLIC.FK97E0D1053B8BB609 FOREIGN KEY(DESCRIPTIONELEMENTBASE_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE ADD CONSTRAINT PUBLIC.FK4CEED9F84220AFEB FOREIGN KEY(FEATURE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE ADD CONSTRAINT PUBLIC.FK6FF15DFCD0BDAE9B FOREIGN KEY(FEATURE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKCDB0237B3A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP_AUD ADD CONSTRAINT PUBLIC.FK847A94A34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER ADD CONSTRAINT PUBLIC.FKB914A10B44E9E6D4 FOREIGN KEY(TYPEDESIGNATIONBASE_ID) REFERENCES PUBLIC.TYPEDESIGNATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FK1E160FB934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION_AUD ADD CONSTRAINT PUBLIC.FKBB04522D34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION_ANNOTATION ADD CONSTRAINT PUBLIC.FKC99DFE3F994CCE20 FOREIGN KEY(ANNOTATION_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK23F76ADE89D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKC753F137ACF5F60B FOREIGN KEY(MULTILANGUAGETEXT_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK20814271B029DDA0 FOREIGN KEY(ORIGINALSOURCEBASE_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A6624AF3F70 FOREIGN KEY(LEVEL_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_MARKER ADD CONSTRAINT PUBLIC.FKF0CA00FB777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_RIGHTSINFO ADD CONSTRAINT PUBLIC.FKF9BDEE98C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO ADD CONSTRAINT PUBLIC.FK91E56DF7F7976FC5 FOREIGN KEY(AGENT_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING_MARKER ADD CONSTRAINT PUBLIC.FK8DA633B037998500 FOREIGN KEY(LANGUAGESTRING_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_MARKER ADD CONSTRAINT PUBLIC.FK39E3C1F3777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_CREDIT ADD CONSTRAINT PUBLIC.FK5BC6DEAD32D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK2FEEB6B8C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_RIGHTSINFO ADD CONSTRAINT PUBLIC.FKDB1266D2C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FKD522D38334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE ADD CONSTRAINT PUBLIC.FK544ADBE12DBE1F1F FOREIGN KEY(LOCUS_ID) REFERENCES PUBLIC.LOCUS(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK2FEEB6B83A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_SCOPE ADD CONSTRAINT PUBLIC.FKB9257C42951A5D40 FOREIGN KEY(SCOPES_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK1B1ABB6634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK1DF60C5C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.FK9033CE749DD57A93 FOREIGN KEY(RELATEDFROM_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKB482C5E686EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A6647AF954C FOREIGN KEY(VOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKF961257B9C9D39 FOREIGN KEY(TAXONBASE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK8F1F9C44C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION ADD CONSTRAINT PUBLIC.FKA408B63AB31C4747 FOREIGN KEY(REPRESENTATIONS_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY ADD CONSTRAINT PUBLIC.FKA9E6B138BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKA074CFC234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.FK6F1286F3C15704E FOREIGN KEY(COUNTRY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_REPRESENTATION ADD CONSTRAINT PUBLIC.FK8C458F847C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.LOCUS ADD CONSTRAINT PUBLIC.FK462F1BE4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_MARKER ADD CONSTRAINT PUBLIC.FK6BEDC7EE777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.MARKER ADD CONSTRAINT PUBLIC.FK88F1805AD64DC020 FOREIGN KEY(MARKERTYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CREDIT ADD CONSTRAINT PUBLIC.FK78FF2B12C0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_SCOPE ADD CONSTRAINT PUBLIC.FKCC6CE4F7B4555A9A FOREIGN KEY(MULTIACCESSKEY_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION ADD CONSTRAINT PUBLIC.FK1A21C74FBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION ADD CONSTRAINT PUBLIC.FK7A0351D6BFEAE500 FOREIGN KEY(HOMOTYPICALGROUP_ID) REFERENCES PUBLIC.HOMOTYPICALGROUP(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK93FFD2AD8E7BF9AB FOREIGN KEY(STATEDATA_ID) REFERENCES PUBLIC.STATEDATA(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE_AUD ADD CONSTRAINT PUBLIC.FK3C062DCD34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK505F2E5DAEB7F3BE FOREIGN KEY(CITATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE ADD CONSTRAINT PUBLIC.FK544ADBE14FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_URLS ADD CONSTRAINT PUBLIC.FK9A9643EC86EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE ADD CONSTRAINT PUBLIC.FK4CF19F94BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.FK5311437CA0971A3 FOREIGN KEY(GROUP_ID) REFERENCES PUBLIC.PERMISSIONGROUP(ID) NOCHECK;
--ALTER TABLE PUBLIC.CLASSIFICATION_TAXONNODE ADD CONSTRAINT PUBLIC.FKB0BD86D384A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKF746D2763A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.FK7482BA02F8991B9D FOREIGN KEY(RELATEDTO_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK8E50DD0247C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_MARKER ADD CONSTRAINT PUBLIC.FK5CDB747E9C9D39 FOREIGN KEY(TAXONBASE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK71381DCC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK289591F734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE_AUD ADD CONSTRAINT PUBLIC.FKBB24070634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FK2D26AB8834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK1E28140E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_EXTENSION ADD CONSTRAINT PUBLIC.FKF68FEBDE927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_MEDIA ADD CONSTRAINT PUBLIC.FK8E5D91E6D57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK42D7AF908C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.FK924F5BCCCC05993E FOREIGN KEY(SYNONYMTOBEUSED_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_CREDIT ADD CONSTRAINT PUBLIC.FK4CB48B3D32D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.FK82C86DAC2BD180D9 FOREIGN KEY(TAXONRELATIONSHIP_ID) REFERENCES PUBLIC.TAXONRELATIONSHIP(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY ADD CONSTRAINT PUBLIC.FKCAF4393CE5C0F9E FOREIGN KEY(NAMEDAREA_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_ANNOTATION ADD CONSTRAINT PUBLIC.FKC978FD2884A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT ADD CONSTRAINT PUBLIC.FK522D90C73B8BB609 FOREIGN KEY(DESCRIPTIONELEMENTBASE_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION ADD CONSTRAINT PUBLIC.FKAE34C1D8927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK93FFD2ADF05D08D4 FOREIGN KEY(MODIFYINGTEXT_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKB6734E3934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION ADD CONSTRAINT PUBLIC.FK397EF986C0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK579A1DC02BEBA58D FOREIGN KEY(DESCRIPTION_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXON ADD CONSTRAINT PUBLIC.FK8DA4E8E3DE9A3E39 FOREIGN KEY(TAXON_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK1093B7C134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE_MARKER_AUD ADD CONSTRAINT PUBLIC.FK77D9D37E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT_AUD ADD CONSTRAINT PUBLIC.FKF5DE434C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_AUD ADD CONSTRAINT PUBLIC.FK5CA2CB9734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE ADD CONSTRAINT PUBLIC.FK4CEED9F847C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FK8AC9DCAEBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATION ADD CONSTRAINT PUBLIC.FK1966BDB14FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK6E6F45734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_STATISTICALMEASURE ADD CONSTRAINT PUBLIC.FK6FF15DFCC9CD5B57 FOREIGN KEY(RECOMMENDEDSTATISTICALMEASURES_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.USERACCOUNT_PERMISSIONGROUP ADD CONSTRAINT PUBLIC.FK812DE753DA9DCB5F FOREIGN KEY(GROUPS_ID) REFERENCES PUBLIC.PERMISSIONGROUP(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK4616A015D57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK353DB784C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK686C42B7E0960EC4 FOREIGN KEY(MODIFIERS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.FK924F5BCC4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKA4B9E0A434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION ADD CONSTRAINT PUBLIC.FKDB1100064FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FK5D248B8434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKD58E791834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_CONTINENT ADD CONSTRAINT PUBLIC.FK45F60AFB3927C853 FOREIGN KEY(CONTINENTS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_REPRESENTATION ADD CONSTRAINT PUBLIC.FK1B8712C8BE59D760 FOREIGN KEY(MEDIAKEY_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA3272DADF76EA FOREIGN KEY(PRIMARYCOLLECTOR_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK9E7794681E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE_AUD ADD CONSTRAINT PUBLIC.FK76253F8A34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE76714220AFEB FOREIGN KEY(FEATURE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.FK404D5F2BBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA_AUD ADD CONSTRAINT PUBLIC.FK750A135034869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.FK731CC81FBBD2C869 FOREIGN KEY(WORKINGSETS_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FK3DA7BE4434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_AUD ADD CONSTRAINT PUBLIC.FKBB16686134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.FK7482BA02F11BD77B FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CREDIT_AUD ADD CONSTRAINT PUBLIC.FK5533906A34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON_AUD ADD CONSTRAINT PUBLIC.FK582B38BE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT ADD CONSTRAINT PUBLIC.FK426BC038524B89D FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK2EBEFB1C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE ADD CONSTRAINT PUBLIC.FK9249B49B74FED214 FOREIGN KEY(SEC_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_MARKER ADD CONSTRAINT PUBLIC.FK3D22B278D57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.FK7482BA02AEB7F3BE FOREIGN KEY(CITATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION ADD CONSTRAINT PUBLIC.FK1A21C74FDF299D00 FOREIGN KEY(ANNOTATIONTYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_MARKER ADD CONSTRAINT PUBLIC.FK365D5D6386EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK41ED09739C9D39 FOREIGN KEY(TAXONBASE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK8F2D512A3A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKB5FDC9A9BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FKC0D6BBB5C7DF530C FOREIGN KEY(TYPEDESIGNATIONS_ID) REFERENCES PUBLIC.TYPEDESIGNATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775A808998FB FOREIGN KEY(PARENT_ID) REFERENCES PUBLIC.POLYTOMOUSKEYNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION ADD CONSTRAINT PUBLIC.FK1A21C74F4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C6B14B73EF FOREIGN KEY(COMBINATIONAUTHORSHIP_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP_MARKER_AUD ADD CONSTRAINT PUBLIC.FKCD68D66734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE7671BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP ADD CONSTRAINT PUBLIC.FK3C8E1FF9BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_MARKER_AUD ADD CONSTRAINT PUBLIC.FK567F2DD334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CREDIT ADD CONSTRAINT PUBLIC.FK78CA9719E8D36B00 FOREIGN KEY(LANGUAGE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA3272F95F225A FOREIGN KEY(GATHERINGEVENT_ID) REFERENCES PUBLIC.GATHERINGEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY_AUD ADD CONSTRAINT PUBLIC.FKD5996FE434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKDC75C70FF1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_MARKER ADD CONSTRAINT PUBLIC.FK7B49CF26777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_AUD ADD CONSTRAINT PUBLIC.FKE4252DE934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_COUNTRY ADD CONSTRAINT PUBLIC.FKCAF43931603B036 FOREIGN KEY(COUNTRIES_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.FK9033CE74AF4F9F62 FOREIGN KEY(RELATEDTO_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775A9D3C2E93 FOREIGN KEY(QUESTION_ID) REFERENCES PUBLIC.KEYSTATEMENT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_FEATURE_AUD ADD CONSTRAINT PUBLIC.FKA4D7D13534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION ADD CONSTRAINT PUBLIC.FK278CF8B689D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_EXTENSION ADD CONSTRAINT PUBLIC.FKDB62D164927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE76716D0D7A56 FOREIGN KEY(FORMAT_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CREDIT_MARKER_AUD ADD CONSTRAINT PUBLIC.FK880A761134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_CREDIT ADD CONSTRAINT PUBLIC.FK7604C566258E060 FOREIGN KEY(TERMVOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.FK9033CE74BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.FK1DB24974FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION_MARKER ADD CONSTRAINT PUBLIC.FKB17EAF4A994CCE20 FOREIGN KEY(ANNOTATION_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FKF5A1106934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_EXTENSION ADD CONSTRAINT PUBLIC.FK715D672684A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
--ALTER TABLE PUBLIC.CLASSIFICATION_TAXONNODE_AUD ADD CONSTRAINT PUBLIC.FK7654132434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MARKER ADD CONSTRAINT PUBLIC.FK88F1805ABC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_CREDIT ADD CONSTRAINT PUBLIC.FK7536062447C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_ANNOTATION ADD CONSTRAINT PUBLIC.FK5D8B8DA1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION ADD CONSTRAINT PUBLIC.FKE6E91F838D2CB1D4 FOREIGN KEY(NOMENCLATURALSTATUS_ID) REFERENCES PUBLIC.NOMENCLATURALSTATUS(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.FK31E7D4023FF8E7B2 FOREIGN KEY(GEOGRAPHICALSCOPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK40EA81F534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE ADD CONSTRAINT PUBLIC.FK2DCE0290BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.FKA737EECE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FKE13FAD3534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.FK5E51083AEB7F3BE FOREIGN KEY(CITATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_EMAILADDRESSES ADD CONSTRAINT PUBLIC.FK4BD2B08E86EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE ADD CONSTRAINT PUBLIC.FKCC7A356DB64A7B29 FOREIGN KEY(MULTIACCESSKEY_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_NAMEDAREA_AUD ADD CONSTRAINT PUBLIC.FK922630D334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP_AUD ADD CONSTRAINT PUBLIC.FK743F44D434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA ADD CONSTRAINT PUBLIC.FK21F700763B8BB609 FOREIGN KEY(DESCRIPTIONELEMENTBASE_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION_MARKER ADD CONSTRAINT PUBLIC.FK560063EC777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_GEOSCOPE ADD CONSTRAINT PUBLIC.FK3ADD7CD586D04E74 FOREIGN KEY(GEOSCOPES_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_REPRESENTATION ADD CONSTRAINT PUBLIC.FKA003835BBBD2C869 FOREIGN KEY(WORKINGSET_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.FK924F5BCC39DB2DFB FOREIGN KEY(PARENT_ID) REFERENCES PUBLIC.TAXONNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_CREDIT_AUD ADD CONSTRAINT PUBLIC.FKDB32A3C534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A6688206484 FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.FKCEF2448559832240 FOREIGN KEY(HYBRIDRELATIONSHIP_ID) REFERENCES PUBLIC.HYBRIDRELATIONSHIP(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_REPRESENTATION ADD CONSTRAINT PUBLIC.FK8C458F8B31C4747 FOREIGN KEY(REPRESENTATIONS_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_MARKER ADD CONSTRAINT PUBLIC.FK1B037D4189D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_CREDIT ADD CONSTRAINT PUBLIC.FK4950A17232D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK6665C77D9A161BED FOREIGN KEY(TYPES_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_AUD ADD CONSTRAINT PUBLIC.FK29CC662734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FK8AC9DCAE9E3ED08 FOREIGN KEY(TYPESTATUS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKA0CE054134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_REPRESENTATION ADD CONSTRAINT PUBLIC.FKA003835BB31C4747 FOREIGN KEY(REPRESENTATIONS_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_MEDIA_AUD ADD CONSTRAINT PUBLIC.FK323A45EC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_MARKER ADD CONSTRAINT PUBLIC.FKB3FFDC7CB029DDA0 FOREIGN KEY(ORIGINALSOURCEBASE_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK23F76ADEC13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FKE203E1A934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER ADD CONSTRAINT PUBLIC.FKB914A10B777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE ADD CONSTRAINT PUBLIC.FK9249B49B8492378F FOREIGN KEY(NAME_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONINTERACTION_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FK9E016B9134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_MARKER ADD CONSTRAINT PUBLIC.FK9CB22CC8BBD2C869 FOREIGN KEY(WORKINGSET_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_MEDIA ADD CONSTRAINT PUBLIC.FKE8FC5D9B86EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK81DC081534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.USERACCOUNT_GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.FKFD724D851857F6C2 FOREIGN KEY(GRANTEDAUTHORITIES_ID) REFERENCES PUBLIC.GRANTEDAUTHORITYIMPL(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING_MARKER ADD CONSTRAINT PUBLIC.FK8DA633B0777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_MARKER_AUD ADD CONSTRAINT PUBLIC.FK160DF9F734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER ADD CONSTRAINT PUBLIC.FK8E6106C73B8A5ABA FOREIGN KEY(SPECIMENOROBSERVATIONBASE_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK44D5F7D81E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_MARKER ADD CONSTRAINT PUBLIC.FK39E3C1F38C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXON_AUD ADD CONSTRAINT PUBLIC.FKED9BED3434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.FKB74F03F76BE0BFDA FOREIGN KEY(DETERMINATIONEVENT_ID) REFERENCES PUBLIC.DETERMINATIONEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK2059F21B34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_MARKER ADD CONSTRAINT PUBLIC.FK6132140CF1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_CREDIT_AUD ADD CONSTRAINT PUBLIC.FKB1E3D03734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK7EE5E5DD1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.MARKER ADD CONSTRAINT PUBLIC.FK88F1805A4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_REPRESENTATION ADD CONSTRAINT PUBLIC.FK1B8712C88F6CABE6 FOREIGN KEY(KEYREPRESENTATIONS_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION_MARKER_AUD ADD CONSTRAINT PUBLIC.FK68CE281B34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_MEDIA ADD CONSTRAINT PUBLIC.FKBBEF5B08D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION ADD CONSTRAINT PUBLIC.FKE6E91F831E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEASUREMENTUNIT_AUD ADD CONSTRAINT PUBLIC.FK2C1599B834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_MEDIA ADD CONSTRAINT PUBLIC.FK8E5D91E666ACA7EC FOREIGN KEY(CHROMATOGRAMS_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER ADD CONSTRAINT PUBLIC.FK1CB715E83B8BB609 FOREIGN KEY(DESCRIPTIONELEMENTBASE_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.FK7C978EB334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION_AUD ADD CONSTRAINT PUBLIC.FK780D5C7F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKFB680C819C9D39 FOREIGN KEY(TAXONBASE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FKB1A62C9134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CREDIT ADD CONSTRAINT PUBLIC.FK78CA9719BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_MEDIA_AUD ADD CONSTRAINT PUBLIC.FK8318CB8134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKB5C75EC028459272 FOREIGN KEY(DESCRIPTION_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATIONPART ADD CONSTRAINT PUBLIC.FK67A45544BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF ADD CONSTRAINT PUBLIC.FK56833D011128E63B FOREIGN KEY(INAPPLICABLEIF_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK25A8D88B34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION ADD CONSTRAINT PUBLIC.FK2170B25CD0BDAE9B FOREIGN KEY(FEATURE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT_MARKER_AUD ADD CONSTRAINT PUBLIC.FK8ED0FAE734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_CREDIT ADD CONSTRAINT PUBLIC.FK7536062432D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.FK6F1286F3F55AFD89 FOREIGN KEY(EXACTLOCATION_REFERENCESYSTEM_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FKF3AD32011E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.CREDIT_MARKER ADD CONSTRAINT PUBLIC.FK10CC6840777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE ADD CONSTRAINT PUBLIC.FK1205D356A830578 FOREIGN KEY(ISPARTOF_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_DESCRIPTION_AUD ADD CONSTRAINT PUBLIC.FK6817D93234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION ADD CONSTRAINT PUBLIC.FK9C4724ED4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_MARKER ADD CONSTRAINT PUBLIC.FK855CEF65777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY ADD CONSTRAINT PUBLIC.FKA9E6B138576595C3 FOREIGN KEY(ROOT_ID) REFERENCES PUBLIC.POLYTOMOUSKEYNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FKD482FE2134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_COVEREDTAXON ADD CONSTRAINT PUBLIC.FK1ABD49E07C3D0017 FOREIGN KEY(COVEREDTAXA_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKCDB0237BD57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKA197815C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE ADD CONSTRAINT PUBLIC.FK2DCE02904C428112 FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE76714FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION_ANNOTATION ADD CONSTRAINT PUBLIC.FK371091E11E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.FK5E51083AF619DE3 FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A6636C6F6F6 FOREIGN KEY(POINTAPPROXIMATION_REFERENCESYSTEM_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON ADD CONSTRAINT PUBLIC.FK34EB896DB4555A9A FOREIGN KEY(MULTIACCESSKEY_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_SCOPE ADD CONSTRAINT PUBLIC.FKBFFEE8F0BE59D760 FOREIGN KEY(MEDIAKEY_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775A4220AFEB FOREIGN KEY(FEATURE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT ADD CONSTRAINT PUBLIC.FK522D90C79682414B FOREIGN KEY(MODIFYINGTEXT_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_AUD ADD CONSTRAINT PUBLIC.FK9C2BA24534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKECA3515C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.FK1FFEC88BAEB7F3BE FOREIGN KEY(CITATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.FKE412C8164AAB411A FOREIGN KEY(DERIVATIONEVENT_ID) REFERENCES PUBLIC.DERIVATIONEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MARKER ADD CONSTRAINT PUBLIC.FK1CB715E8777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FKB7C811D234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKDCC094D63A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK10E2B9D334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEDIA ADD CONSTRAINT PUBLIC.FK6FC908ABC2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK28ED409934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK74E1B58B8D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE_AUD ADD CONSTRAINT PUBLIC.FK6255A1D434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_AUD ADD CONSTRAINT PUBLIC.FK7456581E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE ADD CONSTRAINT PUBLIC.FK1205D356BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS_AUD ADD CONSTRAINT PUBLIC.FK9215BC6334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.EXTENSION ADD CONSTRAINT PUBLIC.FK52EF3C1FBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE76716561D9B1 FOREIGN KEY(ASSOCIATEDSPECIMENOROBSERVATION_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_MARKER_AUD ADD CONSTRAINT PUBLIC.FKC6BD229234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKF961257B927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKB482C5E63A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKAEF84EBF34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK589B6C81E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_EXTENSION ADD CONSTRAINT PUBLIC.FKDB62D164C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK86E8E9AB34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_MARKER ADD CONSTRAINT PUBLIC.FK3D22B278777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.CDM_VIEW_CDM_VIEW ADD CONSTRAINT PUBLIC.FK230A885FC00D1213 FOREIGN KEY(CDM_VIEW_ID) REFERENCES PUBLIC.CDM_VIEW(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK7EE5E5DD3B8BB609 FOREIGN KEY(DESCRIPTIONELEMENTBASE_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK1A6BB5A034869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK3F514B0086EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK4D7327801E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE76719108D9B FOREIGN KEY(TAXON2_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_CREDIT ADD CONSTRAINT PUBLIC.FK5BC6DEAD8D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK626B7850C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_AUD ADD CONSTRAINT PUBLIC.FK628F58E234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO_ANNOTATION ADD CONSTRAINT PUBLIC.FK27CB1E97C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_FAXNUMBERS ADD CONSTRAINT PUBLIC.FK52E1AD9586EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK6A3D3D434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FKF128E10534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.KEYSTATEMENT ADD CONSTRAINT PUBLIC.FK7125B9F0BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK353DB784A1CA19B1 FOREIGN KEY(TITLE_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA_AUD ADD CONSTRAINT PUBLIC.FK4CB735DA34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.FK731CC81F33B8A841 FOREIGN KEY(DESCRIPTIONS_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_MARKER ADD CONSTRAINT PUBLIC.FK5C475102777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_AUD ADD CONSTRAINT PUBLIC.FK355BE36534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FKA981956134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE76711C3C3FF7 FOREIGN KEY(AREA_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_REFERENCE ADD CONSTRAINT PUBLIC.FK6944904D1DDDC219 FOREIGN KEY(CITATIONS_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.FK1FFEC88B4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_AUD ADD CONSTRAINT PUBLIC.FK37041CEC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKDCC094D6C0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.FKEFA0D10B1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_DESCRIPTION ADD CONSTRAINT PUBLIC.FK368283E128459272 FOREIGN KEY(DESCRIPTION_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CREDIT_ANNOTATION ADD CONSTRAINT PUBLIC.FKE8DA4C351E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK222D46ED34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT ADD CONSTRAINT PUBLIC.FK20132036BD59A1AD FOREIGN KEY(DERIVATIONEVENTS_ID) REFERENCES PUBLIC.DERIVATIONEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.INSTITUTIONALMEMBERSHIP ADD CONSTRAINT PUBLIC.FK3C8E1FF9AAC1B820 FOREIGN KEY(PERSON_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_RIGHTSINFO ADD CONSTRAINT PUBLIC.FKF9BDEE98EB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_SCOPE_AUD ADD CONSTRAINT PUBLIC.FK63AD1EC134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_ANNOTATION ADD CONSTRAINT PUBLIC.FKEA970F70EB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKAFDA5E4834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION ADD CONSTRAINT PUBLIC.FK98592F33473FB677 FOREIGN KEY(INVERSEREPRESENTATIONS_ID) REFERENCES PUBLIC.REPRESENTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO_MARKER ADD CONSTRAINT PUBLIC.FKB739BBA2777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FK8AC9DCAEAEB7F3BE FOREIGN KEY(CITATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE ADD CONSTRAINT PUBLIC.FK4CF19F944FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.FK82C86DAC1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT ADD CONSTRAINT PUBLIC.FK426BC034FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_EXTENSION ADD CONSTRAINT PUBLIC.FKF68FEBDEEB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_AUD ADD CONSTRAINT PUBLIC.FK867830934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION ADD CONSTRAINT PUBLIC.FKA72FB5AE5255EAFD FOREIGN KEY(RECOMMENDEDMODIFIERENUMERATION_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775ABC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_AUD ADD CONSTRAINT PUBLIC.FKA0DE16D334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_SCOPE_AUD ADD CONSTRAINT PUBLIC.FK75D5B91334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.FKFEBA3D0834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFIER_AUD ADD CONSTRAINT PUBLIC.FK2982F45634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_AUD ADD CONSTRAINT PUBLIC.FKA0252EE834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE_AUD ADD CONSTRAINT PUBLIC.FKC42E1E2534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXONBASE ADD CONSTRAINT PUBLIC.FKED8F3A547C3D0017 FOREIGN KEY(COVEREDTAXA_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK11AE594734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK15FE775234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.FK6F1286F3BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_SCOPE ADD CONSTRAINT PUBLIC.FKB9257C42D86445CE FOREIGN KEY(TAXONDESCRIPTION_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_ANNOTATION ADD CONSTRAINT PUBLIC.FKA020DAAA1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK42D7AF90C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_ANNOTATION ADD CONSTRAINT PUBLIC.FKCBBA8CBD1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE ADD CONSTRAINT PUBLIC.FK4CEED9F84FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_CREDIT ADD CONSTRAINT PUBLIC.FK2CFBC93732D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.FK924F5BCC84A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_AUD ADD CONSTRAINT PUBLIC.FKEB11BAD734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.ADDRESS ADD CONSTRAINT PUBLIC.FK1ED033D44FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP ADD CONSTRAINT PUBLIC.FK7DECCC18BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK9C979F3C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_AUD ADD CONSTRAINT PUBLIC.FK8F0FFF7C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK91B37B363A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA32727CC340C5 FOREIGN KEY(STOREDUNDER_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775A1C0483C4 FOREIGN KEY(SUBKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER ADD CONSTRAINT PUBLIC.FK2F5128E777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK107321E28E7BF9AB FOREIGN KEY(STATEDATA_ID) REFERENCES PUBLIC.STATEDATA(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE_AUD ADD CONSTRAINT PUBLIC.FK25AD4BC934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET ADD CONSTRAINT PUBLIC.FK668D5B91BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK8F1F9C44258E060 FOREIGN KEY(TERMVOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.FK2C7E7DFA1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATION_MEDIAREPRESENTATIONPART_AUD ADD CONSTRAINT PUBLIC.FK3544378734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT_AUD ADD CONSTRAINT PUBLIC.FK6C06031834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKCFAA93168028C309 FOREIGN KEY(DEFINITION_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA3272BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.LSIDAUTHORITY ADD CONSTRAINT PUBLIC.FK759DB8814FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK3F514B00C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA3272156CF96 FOREIGN KEY(DERIVEDFROM_ID) REFERENCES PUBLIC.DERIVATIONEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKE11D334F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FKC025854234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK2BC1DD2E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION ADD CONSTRAINT PUBLIC.FK278CF8B61E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FK681B370B34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.USERACCOUNT_AUD ADD CONSTRAINT PUBLIC.FK6A57909334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.FK2E38AC8B1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.ADDRESS ADD CONSTRAINT PUBLIC.FK1ED033D4132A2FE8 FOREIGN KEY(LOCATION_REFERENCESYSTEM_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MARKER ADD CONSTRAINT PUBLIC.FK89261453777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA ADD CONSTRAINT PUBLIC.FKFB1697BB682A4E4B FOREIGN KEY(STATE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_DESCRIPTION ADD CONSTRAINT PUBLIC.FK368283E1C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.FKFF4D58CDDA935185 FOREIGN KEY(TAXONNAME_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CDMMETADATA ADD CONSTRAINT PUBLIC.FK6EA78F7B4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION_MARKER ADD CONSTRAINT PUBLIC.FKB17EAF4A777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.LOCUS ADD CONSTRAINT PUBLIC.FK462F1BEBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FK1578E1FE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_MARKER_AUD ADD CONSTRAINT PUBLIC.FKCBAEA7D634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MARKER_AUD ADD CONSTRAINT PUBLIC.FKB951F12B34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE_MARKER ADD CONSTRAINT PUBLIC.FK395842D777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE ADD CONSTRAINT PUBLIC.FK2DCE02904FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.RELATIONSHIPTERMBASE_INVERSEREPRESENTATION ADD CONSTRAINT PUBLIC.FK98592F33ECEEF4AF FOREIGN KEY(RELATIONSHIPTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK6A2601A9F1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION ADD CONSTRAINT PUBLIC.FK9C4724EDE8D36B00 FOREIGN KEY(LANGUAGE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP ADD CONSTRAINT PUBLIC.FK7482BA02E71EF6CE FOREIGN KEY(RELATEDFROM_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO ADD CONSTRAINT PUBLIC.FK91E56DF74FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK505F2E5D966B96B2 FOREIGN KEY(NAMEUSEDINSOURCE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK629EC1D134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FK21B88BAC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.FK1C727CFF3FF8E7B2 FOREIGN KEY(GEOGRAPHICALSCOPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT ADD CONSTRAINT PUBLIC.FK6F1286F38B455EC6 FOREIGN KEY(LOCALITY_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION ADD CONSTRAINT PUBLIC.FKF078ABECEB38EFF FOREIGN KEY(SUPERCOLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION ADD CONSTRAINT PUBLIC.FKAE34C1D889D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.DERIVATIONEVENT ADD CONSTRAINT PUBLIC.FK426BC03BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_MARKER ADD CONSTRAINT PUBLIC.FK1B037D41777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_EXTENSION ADD CONSTRAINT PUBLIC.FK397EF986927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKCFAA9316CD55E0D6 FOREIGN KEY(DEFINITION_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY ADD CONSTRAINT PUBLIC.FK487AA6924FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_CREDIT ADD CONSTRAINT PUBLIC.FKE0A317BA32D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C6617E62B3 FOREIGN KEY(NOMENCLATURALREFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK9754F4643B8A5ABA FOREIGN KEY(SPECIMENOROBSERVATIONBASE_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_DESCRIPTION ADD CONSTRAINT PUBLIC.FK368283E12BEBA58D FOREIGN KEY(DESCRIPTION_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_AUD ADD CONSTRAINT PUBLIC.FKD6D4298F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A66D040DBF0 FOREIGN KEY(PARTOF_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK4616A015C13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_AUD ADD CONSTRAINT PUBLIC.FKF70B2B9534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK1CA8129234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.KEYSTATEMENT_AUD ADD CONSTRAINT PUBLIC.FK93036FC134869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_ANNOTATION ADD CONSTRAINT PUBLIC.FK1010BA6D1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION ADD CONSTRAINT PUBLIC.FK7A0351D61E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FK8AC9DCAE4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_MEDIA ADD CONSTRAINT PUBLIC.FK6FC908ABC0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FKC0D6BBB58C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE ADD CONSTRAINT PUBLIC.FK1205D3564FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_TAXONSCOPE_AUD ADD CONSTRAINT PUBLIC.FK311443734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MEDIA ADD CONSTRAINT PUBLIC.FK21F70076C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK7CFED28E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C64FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE_AUD ADD CONSTRAINT PUBLIC.FKF083E4BE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_ANNOTATION ADD CONSTRAINT PUBLIC.FK1010BA6DD57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK1AD225DC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CREDIT ADD CONSTRAINT PUBLIC.FK2636742232D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.FK1F5A7489B4555A9A FOREIGN KEY(MULTIACCESSKEY_ID) REFERENCES PUBLIC.WORKINGSET(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA ADD CONSTRAINT PUBLIC.FK46C7FC4BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK365E4F3C1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA ADD CONSTRAINT PUBLIC.FKFB1697BBBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_ANNOTATION ADD CONSTRAINT PUBLIC.FK589B6C8C0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_ONLYAPPLICABLE_AUD ADD CONSTRAINT PUBLIC.FK3F5356FC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_SCOPE ADD CONSTRAINT PUBLIC.FKCC6CE4F7546985E4 FOREIGN KEY(SCOPERESTRICTIONS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ADDRESS ADD CONSTRAINT PUBLIC.FK1EDFF7EB86EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_MARKER ADD CONSTRAINT PUBLIC.FK8E6106C7777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.FK404D5F2B697665E FOREIGN KEY(AUTHORSHIP_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK48AC64334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ADDRESS ADD CONSTRAINT PUBLIC.FK1EDFF7EB50751EC5 FOREIGN KEY(CONTACT_ADDRESSES_ID) REFERENCES PUBLIC.ADDRESS(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKACE71ECB34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_AUD ADD CONSTRAINT PUBLIC.FK3EC034434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.FK924F5BCC381381B5 FOREIGN KEY(REFERENCEFORPARENTCHILDRELATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE ADD CONSTRAINT PUBLIC.FK4CEED9F8E0AD2C59 FOREIGN KEY(PARENT_ID) REFERENCES PUBLIC.FEATURENODE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK3D1256F934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT ADD CONSTRAINT PUBLIC.FK7E3A1D8632D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_MARKER ADD CONSTRAINT PUBLIC.FK7B49CF26F95F225A FOREIGN KEY(GATHERINGEVENT_ID) REFERENCES PUBLIC.GATHERINGEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_COVEREDTAXON ADD CONSTRAINT PUBLIC.FK34EB896D7C3D0017 FOREIGN KEY(COVEREDTAXA_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_ANNOTATION ADD CONSTRAINT PUBLIC.FK5D8B8DA47C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK3281DB8734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FKF3C1293434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE ADD CONSTRAINT PUBLIC.FKC330D6395C601E49 FOREIGN KEY(DESCRIPTIONSOURCES_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE ADD CONSTRAINT PUBLIC.FK544ADBE1BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.USERACCOUNT_GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.FKFD724D855EA5DD89 FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE_AUD ADD CONSTRAINT PUBLIC.FK243C037F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_NOMENCLATURALSTATUS ADD CONSTRAINT PUBLIC.FK560BA7928C85CF94 FOREIGN KEY(TAXONNAMEBASE_ID) REFERENCES PUBLIC.TAXONNAMEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE_AUD ADD CONSTRAINT PUBLIC.FKB3BBB1EB34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK252BC84834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKB5FDC9A9E8D36B00 FOREIGN KEY(LANGUAGE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT_AUD ADD CONSTRAINT PUBLIC.FKA4A8430734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_EXTENSION ADD CONSTRAINT PUBLIC.FKA8814EB2927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_MARKER_AUD ADD CONSTRAINT PUBLIC.FK68A9270434869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_SCOPE_AUD ADD CONSTRAINT PUBLIC.FK511FBF4834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A66CC0240B6 FOREIGN KEY(SHAPE_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C6BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_MARKER ADD CONSTRAINT PUBLIC.FK862BAEA7777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_AUD ADD CONSTRAINT PUBLIC.FK39F4313234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK79E7827E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_MARKER ADD CONSTRAINT PUBLIC.FK855CEF6547C496CB FOREIGN KEY(FEATURETREE_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION ADD CONSTRAINT PUBLIC.FKDB11000677E2F09E FOREIGN KEY(NAME_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATION ADD CONSTRAINT PUBLIC.FK1966BDB1BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.FK1DB24974B251DAD FOREIGN KEY(IDENTIFIEDUNIT_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.FK1DB24973DA462D5 FOREIGN KEY(ACTOR_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_REPRESENTATION ADD CONSTRAINT PUBLIC.FKAAC8AFE6C0DB4934 FOREIGN KEY(DEFINEDTERMBASE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP ADD CONSTRAINT PUBLIC.FK5E510834FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_ADDRESS_AUD ADD CONSTRAINT PUBLIC.FK3D28383C34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK8F98B2B734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_EXTENSION ADD CONSTRAINT PUBLIC.FK7BE66D41D57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE ADD CONSTRAINT PUBLIC.FK4CF19F94B7892921 FOREIGN KEY(ROOT_ID) REFERENCES PUBLIC.FEATURENODE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK5574E12EF05D08D4 FOREIGN KEY(MODIFYINGTEXT_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET ADD CONSTRAINT PUBLIC.FK668D5B9123DB7F04 FOREIGN KEY(DESCRIPTIVESYSTEM_ID) REFERENCES PUBLIC.FEATURETREE(ID) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA ADD CONSTRAINT PUBLIC.FKFB1697BB4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_AGENTBASE_AUD ADD CONSTRAINT PUBLIC.FKA8A87CFE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK8F2D512A258E060 FOREIGN KEY(TERMVOCABULARY_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE ADD CONSTRAINT PUBLIC.FKFF4D58CDDE9A3E39 FOREIGN KEY(TAXON_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_MARKER_AUD ADD CONSTRAINT PUBLIC.FK8619495F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.FKE3E463967B4CB560 FOREIGN KEY(NAMERELATIONSHIP_ID) REFERENCES PUBLIC.NAMERELATIONSHIP(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FK4168503534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE_DEFINEDTERMBASE_INAPPLICABLEIF_AUD ADD CONSTRAINT PUBLIC.FKB8D7025234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKF41ADEEB3B8BB609 FOREIGN KEY(DESCRIPTIONELEMENTBASE_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.ADDRESS ADD CONSTRAINT PUBLIC.FK1ED033D4BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_ANNOTATION ADD CONSTRAINT PUBLIC.FKB74F03F71E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775ADE9A3E39 FOREIGN KEY(TAXON_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_REFERENCE_AUD ADD CONSTRAINT PUBLIC.FK18E5CF9E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_EXTENSION ADD CONSTRAINT PUBLIC.FK8E1E567686EFC5D4 FOREIGN KEY(AGENTBASE_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_AGENTBASE ADD CONSTRAINT PUBLIC.FK4D34EDAD1C0E9907 FOREIGN KEY(TEAM_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK505F2E5DBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK7FE7C0F334869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CREDIT_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK1DEB578634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C6BFEAE500 FOREIGN KEY(HOMOTYPICALGROUP_ID) REFERENCES PUBLIC.HOMOTYPICALGROUP(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_CONTACT_URLS_AUD ADD CONSTRAINT PUBLIC.FK1CE69BBD34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_ANNOTATION ADD CONSTRAINT PUBLIC.FKFC824E38D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK48A31E0734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_RIGHTSINFO_AUD ADD CONSTRAINT PUBLIC.FKFEB732FA34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION ADD CONSTRAINT PUBLIC.FK9C4724EDBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_SCOPE ADD CONSTRAINT PUBLIC.FK8D97986D89D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE_MARKER ADD CONSTRAINT PUBLIC.FK5CDB747E777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE ADD CONSTRAINT PUBLIC.FK860775A4FEE4393 FOREIGN KEY(OTHERNODE_ID) REFERENCES PUBLIC.POLYTOMOUSKEYNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT_AUD ADD CONSTRAINT PUBLIC.FK7170185734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FK8DC9C9934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_CREDIT ADD CONSTRAINT PUBLIC.FK7604C56632D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA3272E17C9A6B FOREIGN KEY(SEX_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FK294D143E34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.USERACCOUNT ADD CONSTRAINT PUBLIC.FKB3F13C24FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK7A38D54734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C62B4FEDD6 FOREIGN KEY(BASIONYMAUTHORSHIP_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE ADD CONSTRAINT PUBLIC.FKB4870C6D7BE55A0 FOREIGN KEY(RANK_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_CREDIT ADD CONSTRAINT PUBLIC.FK7E3A1D863B8A5ABA FOREIGN KEY(SPECIMENOROBSERVATIONBASE_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.ADDRESS_AUD ADD CONSTRAINT PUBLIC.FK115657A534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TYPEDESIGNATIONBASE ADD CONSTRAINT PUBLIC.FK8AC9DCAE94DB044A FOREIGN KEY(TYPESPECIMEN_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_SCOPE_AUD ADD CONSTRAINT PUBLIC.FK4E37C7BE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.PERMISSIONGROUP_GRANTEDAUTHORITYIMPL ADD CONSTRAINT PUBLIC.FK53114371857F6C2 FOREIGN KEY(GRANTEDAUTHORITIES_ID) REFERENCES PUBLIC.GRANTEDAUTHORITYIMPL(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_MARKER ADD CONSTRAINT PUBLIC.FK365D5D63777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_MARKER ADD CONSTRAINT PUBLIC.FK6132140C777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.SEQUENCE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKAF40E44934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_EXTENSION ADD CONSTRAINT PUBLIC.FKDEFCDC0B927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONBASE ADD CONSTRAINT PUBLIC.FK9249B49BBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK6665C77D8D9AB196 FOREIGN KEY(INSTITUTION_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATION_AUD ADD CONSTRAINT PUBLIC.FK67AAAB0234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP ADD CONSTRAINT PUBLIC.FK9033CE74AEB7F3BE FOREIGN KEY(CITATION_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.CDM_VIEW ADD CONSTRAINT PUBLIC.FKC5DE8EF84FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.AGENTBASE_MEDIA ADD CONSTRAINT PUBLIC.FKE8FC5D9BC2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_MEDIA ADD CONSTRAINT PUBLIC.FK7320E703C2C29593 FOREIGN KEY(MEDIA_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.FK924F5BCCBC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_ANNOTATION_AUD ADD CONSTRAINT PUBLIC.FK41E6A4A734869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CDM_VIEW ADD CONSTRAINT PUBLIC.FKC5DE8EF88D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_ANNOTATION ADD CONSTRAINT PUBLIC.FK76D2071C1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.FK1DB2497BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_REFERENCE ADD CONSTRAINT PUBLIC.FKC330D639F1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE_ANNOTATION ADD CONSTRAINT PUBLIC.FKD8A9A9A2927D8399 FOREIGN KEY(TAXONNODE_ID) REFERENCES PUBLIC.TAXONNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.ANNOTATION_ANNOTATION ADD CONSTRAINT PUBLIC.FKC99DFE3F1E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.STATISTICALMEASUREMENTVALUE_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK686C42B75C9F4F2B FOREIGN KEY(STATISTICALMEASUREMENTVALUE_ID) REFERENCES PUBLIC.STATISTICALMEASUREMENTVALUE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKD3E8B7F18D0FB4DA FOREIGN KEY(REFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK91B37B3684A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_MARKER_AUD ADD CONSTRAINT PUBLIC.FKA508E2B634869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONNAMEBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKC28EE7E6927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_NAMEDAREA ADD CONSTRAINT PUBLIC.FK31E7D402BE59D760 FOREIGN KEY(MEDIAKEY_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK353DB784A0A6EDCE FOREIGN KEY(TITLE_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_RIGHTSINFO ADD CONSTRAINT PUBLIC.FK74E1B58BC13F7B21 FOREIGN KEY(RIGHTS_ID) REFERENCES PUBLIC.RIGHTSINFO(ID) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK505F2E5D4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_EXTENSION ADD CONSTRAINT PUBLIC.FKD5D2B32DF1DDBFAB FOREIGN KEY(DESCRIPTIONBASE_ID) REFERENCES PUBLIC.DESCRIPTIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_EXTENSION ADD CONSTRAINT PUBLIC.FKAD1E6D34927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE_MODIFYINGTEXT ADD CONSTRAINT PUBLIC.FK522D90C7F05D08D4 FOREIGN KEY(MODIFYINGTEXT_ID) REFERENCES PUBLIC.LANGUAGESTRING(ID) NOCHECK;
ALTER TABLE PUBLIC.CREDIT_MARKER ADD CONSTRAINT PUBLIC.FK10CC68404CF694E0 FOREIGN KEY(CREDIT_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.HYBRIDRELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.FK2C7E7DFA59832240 FOREIGN KEY(HYBRIDRELATIONSHIP_ID) REFERENCES PUBLIC.HYBRIDRELATIONSHIP(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA_SEQUENCE ADD CONSTRAINT PUBLIC.FK61D09FC3282B64 FOREIGN KEY(PHYLOGENETICTREE_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.LOCUS_AUD ADD CONSTRAINT PUBLIC.FK5224108F34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.FEATURETREE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK13BD64E83A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK9662E5AE34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONELEMENTBASE ADD CONSTRAINT PUBLIC.FK38FE767110A80E07 FOREIGN KEY(UNIT_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK37DEC57E3A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT_REFERENCE ADD CONSTRAINT PUBLIC.FK8FB1ED836BE0BFDA FOREIGN KEY(DETERMINATIONEVENT_ID) REFERENCES PUBLIC.DETERMINATIONEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.CDM_VIEW_CDM_VIEW ADD CONSTRAINT PUBLIC.FK230A885F7208BB38 FOREIGN KEY(SUPERVIEWS_ID) REFERENCES PUBLIC.CDM_VIEW(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAREPRESENTATIONPART_AUD ADD CONSTRAINT PUBLIC.FKA75C411534869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.GATHERINGEVENT_DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK69D9A11AF95F225A FOREIGN KEY(GATHERINGEVENT_ID) REFERENCES PUBLIC.GATHERINGEVENT(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_RECOMMENDEDMODIFIERENUMERATION ADD CONSTRAINT PUBLIC.FKA72FB5AED0BDAE9B FOREIGN KEY(FEATURE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DETERMINATIONEVENT ADD CONSTRAINT PUBLIC.FK1DB2497AEC8CCAA FOREIGN KEY(TAXON_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIAKEY_COVEREDTAXON ADD CONSTRAINT PUBLIC.FK1ABD49E0BE59D760 FOREIGN KEY(MEDIAKEY_ID) REFERENCES PUBLIC.MEDIA(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_FEATURE ADD CONSTRAINT PUBLIC.FK58ACF5649AE62C6 FOREIGN KEY(DESCRIPTIVESYSTEM_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.INDIVIDUALSASSOCIATION_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FKB5C75EC084FF3EDF FOREIGN KEY(INDIVIDUALSASSOCIATION_ID) REFERENCES PUBLIC.DESCRIPTIONELEMENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE ADD CONSTRAINT PUBLIC.FK924F5BCCDE9A3E39 FOREIGN KEY(TAXON_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.MEDIA ADD CONSTRAINT PUBLIC.FK46C7FC4C2445443 FOREIGN KEY(ARTIST_ID) REFERENCES PUBLIC.AGENTBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FK37DEC57EEB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FK69D81BCC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
--ALTER TABLE PUBLIC.SEQUENCE_CREDIT ADD CONSTRAINT PUBLIC.FK2CFBC937D57FFDD5 FOREIGN KEY(SEQUENCE_ID) REFERENCES PUBLIC.SEQUENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.TAXONNODE_MARKER ADD CONSTRAINT PUBLIC.FK395842D927D8399 FOREIGN KEY(TAXONNODE_ID) REFERENCES PUBLIC.TAXONNODE(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_EXTENSION ADD CONSTRAINT PUBLIC.FK715D6726927DE9DF FOREIGN KEY(EXTENSIONS_ID) REFERENCES PUBLIC.EXTENSION(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION ADD CONSTRAINT PUBLIC.FKF078ABE4FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA32724FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_MARKER ADD CONSTRAINT PUBLIC.FK59778AB384A3CE1B FOREIGN KEY(CLASSIFICATION_ID) REFERENCES PUBLIC.CLASSIFICATION(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A663B0DA0EF FOREIGN KEY(KINDOF_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEYNODE_LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FKE0D0C7FF34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.CLASSIFICATION_ANNOTATION ADD CONSTRAINT PUBLIC.FKC978FD281E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO ADD CONSTRAINT PUBLIC.FK91E56DF7E6D2886A FOREIGN KEY(TYPE_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_CREDIT ADD CONSTRAINT PUBLIC.FK510B2ACB32D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_TAXON ADD CONSTRAINT PUBLIC.FK8DA4E8E389D97CB FOREIGN KEY(POLYTOMOUSKEY_ID) REFERENCES PUBLIC.POLYTOMOUSKEY(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_SCOPE ADD CONSTRAINT PUBLIC.FK8D97986D546985E4 FOREIGN KEY(SCOPERESTRICTIONS_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.COLLECTION_CREDIT ADD CONSTRAINT PUBLIC.FKE0A317BAEB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE_ORIGINALSOURCEBASE ADD CONSTRAINT PUBLIC.FKD3E8B7F13A6735D9 FOREIGN KEY(SOURCES_ID) REFERENCES PUBLIC.ORIGINALSOURCEBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.LANGUAGESTRING_AUD ADD CONSTRAINT PUBLIC.FK896AFAFA34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT ADD CONSTRAINT PUBLIC.FK2013203654C216AA FOREIGN KEY(ORIGINALS_ID) REFERENCES PUBLIC.SPECIMENOROBSERVATIONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.KEYSTATEMENT_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK70BB5FD8AAA67049 FOREIGN KEY(KEYSTATEMENT_ID) REFERENCES PUBLIC.KEYSTATEMENT(ID) NOCHECK;
ALTER TABLE PUBLIC.SPECIMENOROBSERVATIONBASE ADD CONSTRAINT PUBLIC.FK21CA3272EB62BE9A FOREIGN KEY(COLLECTION_ID) REFERENCES PUBLIC.COLLECTION(ID) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP_MARKER ADD CONSTRAINT PUBLIC.FKE3E46396777265A1 FOREIGN KEY(MARKERS_ID) REFERENCES PUBLIC.MARKER(ID) NOCHECK;
ALTER TABLE PUBLIC.FEATURENODE ADD CONSTRAINT PUBLIC.FK4CEED9F8BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.REFERENCE ADD CONSTRAINT PUBLIC.FK404D5F2BAD54327F FOREIGN KEY(INREFERENCE_ID) REFERENCES PUBLIC.REFERENCE(ID) NOCHECK;
ALTER TABLE PUBLIC.MULTIACCESSKEY_TAXONSCOPE ADD CONSTRAINT PUBLIC.FKCC7A356DDE9A3E39 FOREIGN KEY(TAXONOMICSCOPE_ID) REFERENCES PUBLIC.TAXONBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET_DESCRIPTIONBASE_AUD ADD CONSTRAINT PUBLIC.FK8959CE7034869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.WORKINGSET ADD CONSTRAINT PUBLIC.FK668D5B914FF2DB2C FOREIGN KEY(CREATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_EXTENSION_AUD ADD CONSTRAINT PUBLIC.FK1FFC43A934869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NOMENCLATURALSTATUS_AUD ADD CONSTRAINT PUBLIC.FKFB2DB8DC34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TERMVOCABULARY_ORIGINALSOURCEBASE_AUD ADD CONSTRAINT PUBLIC.FKA898D9FB34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.NAMERELATIONSHIP_ANNOTATION ADD CONSTRAINT PUBLIC.FK2E38AC8B7B4CB560 FOREIGN KEY(NAMERELATIONSHIP_ID) REFERENCES PUBLIC.NAMERELATIONSHIP(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE_SUPPORTEDCATEGORICALENUMERATION ADD CONSTRAINT PUBLIC.FK2170B25C5AF2C74 FOREIGN KEY(SUPPORTEDCATEGORICALENUMERATIONS_ID) REFERENCES PUBLIC.TERMVOCABULARY(ID) NOCHECK;
ALTER TABLE PUBLIC.DESCRIPTIONBASE_MARKER_AUD ADD CONSTRAINT PUBLIC.FK92DD5BDD34869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.POLYTOMOUSKEY_CREDIT ADD CONSTRAINT PUBLIC.FKADC940032D1B9F FOREIGN KEY(CREDITS_ID) REFERENCES PUBLIC.CREDIT(ID) NOCHECK;
ALTER TABLE PUBLIC.RIGHTSINFO_ANNOTATION ADD CONSTRAINT PUBLIC.FK27CB1E971E403E0B FOREIGN KEY(ANNOTATIONS_ID) REFERENCES PUBLIC.ANNOTATION(ID) NOCHECK;
ALTER TABLE PUBLIC.HOMOTYPICALGROUP_MARKER_AUD ADD CONSTRAINT PUBLIC.FK19337BB234869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.TAXONRELATIONSHIP_MARKER_AUD ADD CONSTRAINT PUBLIC.FK21F8978834869AAE FOREIGN KEY(REV) REFERENCES PUBLIC.AUDITEVENT(REVISIONNUMBER) NOCHECK;
ALTER TABLE PUBLIC.STATEDATA_LANGUAGESTRING ADD CONSTRAINT PUBLIC.FK93FFD2AD9682414B FOREIGN KEY(MODIFYINGTEXT_MAPKEY_ID) REFERENCES PUBLIC.DEFINEDTERMBASE(ID) NOCHECK;
ALTER TABLE PUBLIC.DEFINEDTERMBASE ADD CONSTRAINT PUBLIC.FK2E340A66BC5DA539 FOREIGN KEY(UPDATEDBY_ID) REFERENCES PUBLIC.USERACCOUNT(ID) NOCHECK;
