From 172556b4b148b7035640f90dff5e31f4e83c12ee Mon Sep 17 00:00:00 2001 From: Viliam Repan Date: Tue, 13 Feb 2018 15:36:28 +0100 Subject: [PATCH] improved column order for extension tables primary keys --- config/sql/_all/h2-3.8-all.sql | 24 ++++++++++++------------ config/sql/_all/mysql-3.8-all.sql | 24 ++++++++++++------------ config/sql/_all/oracle-3.8-all.sql | 24 ++++++++++++------------ config/sql/_all/postgresql-3.8-all.sql | 24 ++++++++++++------------ config/sql/_all/sqlserver-3.8-all.sql | 24 ++++++++++++------------ 5 files changed, 60 insertions(+), 60 deletions(-) diff --git a/config/sql/_all/h2-3.8-all.sql b/config/sql/_all/h2-3.8-all.sql index 26cc6d7fd5c..fed876fb1d7 100644 --- a/config/sql/_all/h2-3.8-all.sql +++ b/config/sql/_all/h2-3.8-all.sql @@ -8,12 +8,12 @@ create table m_acc_cert_definition (handlerUri varchar(255), lastCampaignClosedT create table m_acc_cert_wi (id integer not null, owner_id integer not null, owner_owner_oid varchar(36) not null, closeTimestamp timestamp, outcome varchar(255), outputChangeTimestamp timestamp, performerRef_relation varchar(157), performerRef_targetOid varchar(36), performerRef_type integer, stageNumber integer, primary key (id, owner_id, owner_owner_oid)); create table m_acc_cert_wi_reference (owner_id integer not null, owner_owner_id integer not null, owner_owner_owner_oid varchar(36) not null, relation varchar(157) not null, targetOid varchar(36) not null, targetType integer, primary key (owner_id, owner_owner_id, owner_owner_owner_oid, relation, targetOid)); create table m_assignment (id integer not null, owner_oid varchar(36) not null, administrativeStatus integer, archiveTimestamp timestamp, disableReason varchar(255), disableTimestamp timestamp, effectiveStatus integer, enableTimestamp timestamp, validFrom timestamp, validTo timestamp, validityChangeTimestamp timestamp, validityStatus integer, assignmentOwner integer, createChannel varchar(255), createTimestamp timestamp, creatorRef_relation varchar(157), creatorRef_targetOid varchar(36), creatorRef_type integer, lifecycleState varchar(255), modifierRef_relation varchar(157), modifierRef_targetOid varchar(36), modifierRef_type integer, modifyChannel varchar(255), modifyTimestamp timestamp, orderValue integer, orgRef_relation varchar(157), orgRef_targetOid varchar(36), orgRef_type integer, resourceRef_relation varchar(157), resourceRef_targetOid varchar(36), resourceRef_type integer, targetRef_relation varchar(157), targetRef_targetOid varchar(36), targetRef_type integer, tenantRef_relation varchar(157), tenantRef_targetOid varchar(36), tenantRef_type integer, extId integer, extOid varchar(36), primary key (id, owner_oid)); -create table m_assignment_ext_boolean (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, booleanValue boolean not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, booleanValue)); -create table m_assignment_ext_date (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, dateValue timestamp not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, dateValue)); -create table m_assignment_ext_long (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, longValue bigint not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, longValue)); -create table m_assignment_ext_poly (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, orig varchar(255) not null, norm varchar(255), primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, orig)); -create table m_assignment_ext_reference (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, targetoid)); -create table m_assignment_ext_string (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, stringValue varchar(255) not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, stringValue)); +create table m_assignment_ext_boolean (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, booleanValue boolean not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, booleanValue)); +create table m_assignment_ext_date (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, dateValue timestamp not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, dateValue)); +create table m_assignment_ext_long (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, longValue bigint not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, longValue)); +create table m_assignment_ext_poly (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, orig varchar(255) not null, norm varchar(255), primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, orig)); +create table m_assignment_ext_reference (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, targetoid)); +create table m_assignment_ext_string (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, stringValue varchar(255) not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, stringValue)); create table m_assignment_extension (owner_id integer not null, owner_owner_oid varchar(36) not null, booleansCount smallint, datesCount smallint, longsCount smallint, polysCount smallint, referencesCount smallint, stringsCount smallint, primary key (owner_id, owner_owner_oid)); create table m_assignment_policy_situation (assignment_id integer not null, assignment_oid varchar(36) not null, policySituation varchar(255)); create table m_assignment_reference (owner_id integer not null, owner_owner_oid varchar(36) not null, reference_type integer not null, relation varchar(157) not null, targetOid varchar(36) not null, targetType integer, primary key (owner_id, owner_owner_oid, reference_type, relation, targetOid)); @@ -27,12 +27,12 @@ create table m_ext_item (id integer generated by default as identity, kind integ create table m_focus_photo (owner_oid varchar(36) not null, photo blob, primary key (owner_oid)); create table m_focus_policy_situation (focus_oid varchar(36) not null, policySituation varchar(255)); create table m_object (oid varchar(36) not null, booleansCount smallint, createChannel varchar(255), createTimestamp timestamp, creatorRef_relation varchar(157), creatorRef_targetOid varchar(36), creatorRef_type integer, datesCount smallint, fullObject blob, lifecycleState varchar(255), longsCount smallint, modifierRef_relation varchar(157), modifierRef_targetOid varchar(36), modifierRef_type integer, modifyChannel varchar(255), modifyTimestamp timestamp, name_norm varchar(255), name_orig varchar(255), objectTypeClass integer, polysCount smallint, referencesCount smallint, stringsCount smallint, tenantRef_relation varchar(157), tenantRef_targetOid varchar(36), tenantRef_type integer, version integer not null, primary key (oid)); -create table m_object_ext_boolean (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, booleanValue boolean not null, primary key (item_id, owner_oid, ownerType, booleanValue)); -create table m_object_ext_date (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, dateValue timestamp not null, primary key (item_id, owner_oid, ownerType, dateValue)); -create table m_object_ext_long (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, longValue bigint not null, primary key (item_id, owner_oid, ownerType, longValue)); -create table m_object_ext_poly (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, orig varchar(255) not null, norm varchar(255), primary key (item_id, owner_oid, ownerType, orig)); -create table m_object_ext_reference (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key (item_id, owner_oid, ownerType, targetoid)); -create table m_object_ext_string (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, stringValue varchar(255) not null, primary key (item_id, owner_oid, ownerType, stringValue)); +create table m_object_ext_boolean (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, booleanValue boolean not null, primary key (owner_oid, ownerType, item_id, booleanValue)); +create table m_object_ext_date (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, dateValue timestamp not null, primary key (owner_oid, ownerType, item_id, dateValue)); +create table m_object_ext_long (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, longValue bigint not null, primary key (owner_oid, ownerType, item_id, longValue)); +create table m_object_ext_poly (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, orig varchar(255) not null, norm varchar(255), primary key (owner_oid, ownerType, item_id, orig)); +create table m_object_ext_reference (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key (owner_oid, ownerType, item_id, targetoid)); +create table m_object_ext_string (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, stringValue varchar(255) not null, primary key (owner_oid, ownerType, item_id, stringValue)); create table m_object_text_info (owner_oid varchar(36) not null, text varchar(255) not null, primary key (owner_oid, text)); create table m_operation_execution (id integer not null, owner_oid varchar(36) not null, initiatorRef_relation varchar(157), initiatorRef_targetOid varchar(36), initiatorRef_type integer, status integer, taskRef_relation varchar(157), taskRef_targetOid varchar(36), taskRef_type integer, timestampValue timestamp, primary key (id, owner_oid)); create table m_org_closure (ancestor_oid varchar(36) not null, descendant_oid varchar(36) not null, val integer, primary key (ancestor_oid, descendant_oid)); diff --git a/config/sql/_all/mysql-3.8-all.sql b/config/sql/_all/mysql-3.8-all.sql index 88b9d9c18a0..a7818bce170 100644 --- a/config/sql/_all/mysql-3.8-all.sql +++ b/config/sql/_all/mysql-3.8-all.sql @@ -6,12 +6,12 @@ create table m_acc_cert_definition (handlerUri varchar(255), lastCampaignClosedT create table m_acc_cert_wi (id integer not null, owner_id integer not null, owner_owner_oid varchar(36) not null, closeTimestamp datetime(6), outcome varchar(255), outputChangeTimestamp datetime(6), performerRef_relation varchar(157), performerRef_targetOid varchar(36), performerRef_type integer, stageNumber integer, primary key (id, owner_id, owner_owner_oid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_acc_cert_wi_reference (owner_id integer not null, owner_owner_id integer not null, owner_owner_owner_oid varchar(36) not null, relation varchar(157) not null, targetOid varchar(36) not null, targetType integer, primary key (owner_id, owner_owner_id, owner_owner_owner_oid, relation, targetOid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_assignment (id integer not null, owner_oid varchar(36) not null, administrativeStatus integer, archiveTimestamp datetime(6), disableReason varchar(255), disableTimestamp datetime(6), effectiveStatus integer, enableTimestamp datetime(6), validFrom datetime(6), validTo datetime(6), validityChangeTimestamp datetime(6), validityStatus integer, assignmentOwner integer, createChannel varchar(255), createTimestamp datetime(6), creatorRef_relation varchar(157), creatorRef_targetOid varchar(36), creatorRef_type integer, lifecycleState varchar(255), modifierRef_relation varchar(157), modifierRef_targetOid varchar(36), modifierRef_type integer, modifyChannel varchar(255), modifyTimestamp datetime(6), orderValue integer, orgRef_relation varchar(157), orgRef_targetOid varchar(36), orgRef_type integer, resourceRef_relation varchar(157), resourceRef_targetOid varchar(36), resourceRef_type integer, targetRef_relation varchar(157), targetRef_targetOid varchar(36), targetRef_type integer, tenantRef_relation varchar(157), tenantRef_targetOid varchar(36), tenantRef_type integer, extId integer, extOid varchar(36), primary key (id, owner_oid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_assignment_ext_boolean (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, booleanValue bit not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, booleanValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_assignment_ext_date (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, dateValue datetime(6) not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, dateValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_assignment_ext_long (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, longValue bigint not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, longValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_assignment_ext_poly (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, orig varchar(255) not null, norm varchar(255), primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, orig)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_assignment_ext_reference (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, targetoid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_assignment_ext_string (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, stringValue varchar(255) not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, stringValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_assignment_ext_boolean (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, booleanValue bit not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, booleanValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_assignment_ext_date (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, dateValue datetime(6) not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, dateValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_assignment_ext_long (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, longValue bigint not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, longValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_assignment_ext_poly (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, orig varchar(255) not null, norm varchar(255), primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, orig)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_assignment_ext_reference (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, targetoid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_assignment_ext_string (item_id integer not null, anyContainer_owner_id integer not null, anyContainer_owner_owner_oid varchar(36) not null, stringValue varchar(255) not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, stringValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_assignment_extension (owner_id integer not null, owner_owner_oid varchar(36) not null, booleansCount smallint, datesCount smallint, longsCount smallint, polysCount smallint, referencesCount smallint, stringsCount smallint, primary key (owner_id, owner_owner_oid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_assignment_policy_situation (assignment_id integer not null, assignment_oid varchar(36) not null, policySituation varchar(255)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_assignment_reference (owner_id integer not null, owner_owner_oid varchar(36) not null, reference_type integer not null, relation varchar(157) not null, targetOid varchar(36) not null, targetType integer, primary key (owner_id, owner_owner_oid, reference_type, relation, targetOid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; @@ -25,12 +25,12 @@ create table m_ext_item (id integer not null auto_increment, kind integer, itemN create table m_focus_photo (owner_oid varchar(36) not null, photo longblob, primary key (owner_oid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_focus_policy_situation (focus_oid varchar(36) not null, policySituation varchar(255)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_object (oid varchar(36) not null, booleansCount smallint, createChannel varchar(255), createTimestamp datetime(6), creatorRef_relation varchar(157), creatorRef_targetOid varchar(36), creatorRef_type integer, datesCount smallint, fullObject longblob, lifecycleState varchar(255), longsCount smallint, modifierRef_relation varchar(157), modifierRef_targetOid varchar(36), modifierRef_type integer, modifyChannel varchar(255), modifyTimestamp datetime(6), name_norm varchar(255), name_orig varchar(255), objectTypeClass integer, polysCount smallint, referencesCount smallint, stringsCount smallint, tenantRef_relation varchar(157), tenantRef_targetOid varchar(36), tenantRef_type integer, version integer not null, primary key (oid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_object_ext_boolean (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, booleanValue bit not null, primary key (item_id, owner_oid, ownerType, booleanValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_object_ext_date (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, dateValue datetime(6) not null, primary key (item_id, owner_oid, ownerType, dateValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_object_ext_long (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, longValue bigint not null, primary key (item_id, owner_oid, ownerType, longValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_object_ext_poly (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, orig varchar(255) not null, norm varchar(255), primary key (item_id, owner_oid, ownerType, orig)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_object_ext_reference (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key (item_id, owner_oid, ownerType, targetoid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; -create table m_object_ext_string (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, stringValue varchar(255) not null, primary key (item_id, owner_oid, ownerType, stringValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_object_ext_boolean (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, booleanValue bit not null, primary key (owner_oid, ownerType, item_id, booleanValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_object_ext_date (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, dateValue datetime(6) not null, primary key (owner_oid, ownerType, item_id, dateValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_object_ext_long (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, longValue bigint not null, primary key (owner_oid, ownerType, item_id, longValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_object_ext_poly (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, orig varchar(255) not null, norm varchar(255), primary key (owner_oid, ownerType, item_id, orig)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_object_ext_reference (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, targetoid varchar(36) not null, relation varchar(157), targetType integer, primary key (owner_oid, ownerType, item_id, targetoid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; +create table m_object_ext_string (item_id integer not null, owner_oid varchar(36) not null, ownerType integer not null, stringValue varchar(255) not null, primary key (owner_oid, ownerType, item_id, stringValue)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_object_text_info (owner_oid varchar(36) not null, text varchar(255) not null, primary key (owner_oid, text)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_operation_execution (id integer not null, owner_oid varchar(36) not null, initiatorRef_relation varchar(157), initiatorRef_targetOid varchar(36), initiatorRef_type integer, status integer, taskRef_relation varchar(157), taskRef_targetOid varchar(36), taskRef_type integer, timestampValue datetime(6), primary key (id, owner_oid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; create table m_org_closure (ancestor_oid varchar(36) not null, descendant_oid varchar(36) not null, val integer, primary key (ancestor_oid, descendant_oid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin engine=InnoDB; diff --git a/config/sql/_all/oracle-3.8-all.sql b/config/sql/_all/oracle-3.8-all.sql index b6a110e81a1..9f67305bd9a 100644 --- a/config/sql/_all/oracle-3.8-all.sql +++ b/config/sql/_all/oracle-3.8-all.sql @@ -4,12 +4,12 @@ create table m_acc_cert_definition (handlerUri varchar2(255 char), lastCampaignC create table m_acc_cert_wi (id number(10,0) not null, owner_id number(10,0) not null, owner_owner_oid varchar2(36 char) not null, closeTimestamp timestamp, outcome varchar2(255 char), outputChangeTimestamp timestamp, performerRef_relation varchar2(157 char), performerRef_targetOid varchar2(36 char), performerRef_type number(10,0), stageNumber number(10,0), primary key (id, owner_id, owner_owner_oid)) initrans 30; create table m_acc_cert_wi_reference (owner_id number(10,0) not null, owner_owner_id number(10,0) not null, owner_owner_owner_oid varchar2(36 char) not null, relation varchar2(157 char) not null, targetOid varchar2(36 char) not null, targetType number(10,0), primary key (owner_id, owner_owner_id, owner_owner_owner_oid, relation, targetOid)) initrans 30; create table m_assignment (id number(10,0) not null, owner_oid varchar2(36 char) not null, administrativeStatus number(10,0), archiveTimestamp timestamp, disableReason varchar2(255 char), disableTimestamp timestamp, effectiveStatus number(10,0), enableTimestamp timestamp, validFrom timestamp, validTo timestamp, validityChangeTimestamp timestamp, validityStatus number(10,0), assignmentOwner number(10,0), createChannel varchar2(255 char), createTimestamp timestamp, creatorRef_relation varchar2(157 char), creatorRef_targetOid varchar2(36 char), creatorRef_type number(10,0), lifecycleState varchar2(255 char), modifierRef_relation varchar2(157 char), modifierRef_targetOid varchar2(36 char), modifierRef_type number(10,0), modifyChannel varchar2(255 char), modifyTimestamp timestamp, orderValue number(10,0), orgRef_relation varchar2(157 char), orgRef_targetOid varchar2(36 char), orgRef_type number(10,0), resourceRef_relation varchar2(157 char), resourceRef_targetOid varchar2(36 char), resourceRef_type number(10,0), targetRef_relation varchar2(157 char), targetRef_targetOid varchar2(36 char), targetRef_type number(10,0), tenantRef_relation varchar2(157 char), tenantRef_targetOid varchar2(36 char), tenantRef_type number(10,0), extId number(10,0), extOid varchar2(36 char), primary key (id, owner_oid)) initrans 30; -create table m_assignment_ext_boolean (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, booleanValue number(1,0) not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, booleanValue)) initrans 30; -create table m_assignment_ext_date (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, dateValue timestamp not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, dateValue)) initrans 30; -create table m_assignment_ext_long (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, longValue number(19,0) not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, longValue)) initrans 30; -create table m_assignment_ext_poly (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, orig varchar2(255 char) not null, norm varchar2(255 char), primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, orig)) initrans 30; -create table m_assignment_ext_reference (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, targetoid varchar2(36 char) not null, relation varchar2(157 char), targetType number(10,0), primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, targetoid)) initrans 30; -create table m_assignment_ext_string (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, stringValue varchar2(255 char) not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, stringValue)) initrans 30; +create table m_assignment_ext_boolean (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, booleanValue number(1,0) not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, booleanValue)) initrans 30; +create table m_assignment_ext_date (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, dateValue timestamp not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, dateValue)) initrans 30; +create table m_assignment_ext_long (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, longValue number(19,0) not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, longValue)) initrans 30; +create table m_assignment_ext_poly (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, orig varchar2(255 char) not null, norm varchar2(255 char), primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, orig)) initrans 30; +create table m_assignment_ext_reference (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, targetoid varchar2(36 char) not null, relation varchar2(157 char), targetType number(10,0), primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, targetoid)) initrans 30; +create table m_assignment_ext_string (item_id number(10,0) not null, anyContainer_owner_id number(10,0) not null, anyContainer_owner_owner_oid varchar2(36 char) not null, stringValue varchar2(255 char) not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, stringValue)) initrans 30; create table m_assignment_extension (owner_id number(10,0) not null, owner_owner_oid varchar2(36 char) not null, booleansCount number(5,0), datesCount number(5,0), longsCount number(5,0), polysCount number(5,0), referencesCount number(5,0), stringsCount number(5,0), primary key (owner_id, owner_owner_oid)) initrans 30; create table m_assignment_policy_situation (assignment_id number(10,0) not null, assignment_oid varchar2(36 char) not null, policySituation varchar2(255 char)) initrans 30; create table m_assignment_reference (owner_id number(10,0) not null, owner_owner_oid varchar2(36 char) not null, reference_type number(10,0) not null, relation varchar2(157 char) not null, targetOid varchar2(36 char) not null, targetType number(10,0), primary key (owner_id, owner_owner_oid, reference_type, relation, targetOid)) initrans 30; @@ -23,12 +23,12 @@ create table m_ext_item (id number(10,0) generated as identity, kind number(10,0 create table m_focus_photo (owner_oid varchar2(36 char) not null, photo blob, primary key (owner_oid)) initrans 30; create table m_focus_policy_situation (focus_oid varchar2(36 char) not null, policySituation varchar2(255 char)) initrans 30; create table m_object (oid varchar2(36 char) not null, booleansCount number(5,0), createChannel varchar2(255 char), createTimestamp timestamp, creatorRef_relation varchar2(157 char), creatorRef_targetOid varchar2(36 char), creatorRef_type number(10,0), datesCount number(5,0), fullObject blob, lifecycleState varchar2(255 char), longsCount number(5,0), modifierRef_relation varchar2(157 char), modifierRef_targetOid varchar2(36 char), modifierRef_type number(10,0), modifyChannel varchar2(255 char), modifyTimestamp timestamp, name_norm varchar2(255 char), name_orig varchar2(255 char), objectTypeClass number(10,0), polysCount number(5,0), referencesCount number(5,0), stringsCount number(5,0), tenantRef_relation varchar2(157 char), tenantRef_targetOid varchar2(36 char), tenantRef_type number(10,0), version number(10,0) not null, primary key (oid)) initrans 30; -create table m_object_ext_boolean (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, booleanValue number(1,0) not null, primary key (item_id, owner_oid, ownerType, booleanValue)) initrans 30; -create table m_object_ext_date (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, dateValue timestamp not null, primary key (item_id, owner_oid, ownerType, dateValue)) initrans 30; -create table m_object_ext_long (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, longValue number(19,0) not null, primary key (item_id, owner_oid, ownerType, longValue)) initrans 30; -create table m_object_ext_poly (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, orig varchar2(255 char) not null, norm varchar2(255 char), primary key (item_id, owner_oid, ownerType, orig)) initrans 30; -create table m_object_ext_reference (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, targetoid varchar2(36 char) not null, relation varchar2(157 char), targetType number(10,0), primary key (item_id, owner_oid, ownerType, targetoid)) initrans 30; -create table m_object_ext_string (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, stringValue varchar2(255 char) not null, primary key (item_id, owner_oid, ownerType, stringValue)) initrans 30; +create table m_object_ext_boolean (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, booleanValue number(1,0) not null, primary key (owner_oid, ownerType, item_id, booleanValue)) initrans 30; +create table m_object_ext_date (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, dateValue timestamp not null, primary key (owner_oid, ownerType, item_id, dateValue)) initrans 30; +create table m_object_ext_long (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, longValue number(19,0) not null, primary key (owner_oid, ownerType, item_id, longValue)) initrans 30; +create table m_object_ext_poly (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, orig varchar2(255 char) not null, norm varchar2(255 char), primary key (owner_oid, ownerType, item_id, orig)) initrans 30; +create table m_object_ext_reference (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, targetoid varchar2(36 char) not null, relation varchar2(157 char), targetType number(10,0), primary key (owner_oid, ownerType, item_id, targetoid)) initrans 30; +create table m_object_ext_string (item_id number(10,0) not null, owner_oid varchar2(36 char) not null, ownerType number(10,0) not null, stringValue varchar2(255 char) not null, primary key (owner_oid, ownerType, item_id, stringValue)) initrans 30; create table m_object_text_info (owner_oid varchar2(36 char) not null, text varchar2(255 char) not null, primary key (owner_oid, text)) initrans 30; create table m_operation_execution (id number(10,0) not null, owner_oid varchar2(36 char) not null, initiatorRef_relation varchar2(157 char), initiatorRef_targetOid varchar2(36 char), initiatorRef_type number(10,0), status number(10,0), taskRef_relation varchar2(157 char), taskRef_targetOid varchar2(36 char), taskRef_type number(10,0), timestampValue timestamp, primary key (id, owner_oid)) initrans 30; create table m_org_closure (ancestor_oid varchar2(36 char) not null, descendant_oid varchar2(36 char) not null, val number(10,0), primary key (ancestor_oid, descendant_oid)) initrans 30; diff --git a/config/sql/_all/postgresql-3.8-all.sql b/config/sql/_all/postgresql-3.8-all.sql index 3113782a5cf..c7868a1b789 100644 --- a/config/sql/_all/postgresql-3.8-all.sql +++ b/config/sql/_all/postgresql-3.8-all.sql @@ -4,12 +4,12 @@ create table m_acc_cert_definition (handlerUri varchar(255), lastCampaignClosedT create table m_acc_cert_wi (id int4 not null, owner_id int4 not null, owner_owner_oid varchar(36) not null, closeTimestamp timestamp, outcome varchar(255), outputChangeTimestamp timestamp, performerRef_relation varchar(157), performerRef_targetOid varchar(36), performerRef_type int4, stageNumber int4, primary key (id, owner_id, owner_owner_oid)); create table m_acc_cert_wi_reference (owner_id int4 not null, owner_owner_id int4 not null, owner_owner_owner_oid varchar(36) not null, relation varchar(157) not null, targetOid varchar(36) not null, targetType int4, primary key (owner_id, owner_owner_id, owner_owner_owner_oid, relation, targetOid)); create table m_assignment (id int4 not null, owner_oid varchar(36) not null, administrativeStatus int4, archiveTimestamp timestamp, disableReason varchar(255), disableTimestamp timestamp, effectiveStatus int4, enableTimestamp timestamp, validFrom timestamp, validTo timestamp, validityChangeTimestamp timestamp, validityStatus int4, assignmentOwner int4, createChannel varchar(255), createTimestamp timestamp, creatorRef_relation varchar(157), creatorRef_targetOid varchar(36), creatorRef_type int4, lifecycleState varchar(255), modifierRef_relation varchar(157), modifierRef_targetOid varchar(36), modifierRef_type int4, modifyChannel varchar(255), modifyTimestamp timestamp, orderValue int4, orgRef_relation varchar(157), orgRef_targetOid varchar(36), orgRef_type int4, resourceRef_relation varchar(157), resourceRef_targetOid varchar(36), resourceRef_type int4, targetRef_relation varchar(157), targetRef_targetOid varchar(36), targetRef_type int4, tenantRef_relation varchar(157), tenantRef_targetOid varchar(36), tenantRef_type int4, extId int4, extOid varchar(36), primary key (id, owner_oid)); -create table m_assignment_ext_boolean (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, booleanValue boolean not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, booleanValue)); -create table m_assignment_ext_date (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, dateValue timestamp not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, dateValue)); -create table m_assignment_ext_long (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, longValue int8 not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, longValue)); -create table m_assignment_ext_poly (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, orig varchar(255) not null, norm varchar(255), primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, orig)); -create table m_assignment_ext_reference (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, targetoid varchar(36) not null, relation varchar(157), targetType int4, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, targetoid)); -create table m_assignment_ext_string (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, stringValue varchar(255) not null, primary key (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, stringValue)); +create table m_assignment_ext_boolean (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, booleanValue boolean not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, booleanValue)); +create table m_assignment_ext_date (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, dateValue timestamp not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, dateValue)); +create table m_assignment_ext_long (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, longValue int8 not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, longValue)); +create table m_assignment_ext_poly (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, orig varchar(255) not null, norm varchar(255), primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, orig)); +create table m_assignment_ext_reference (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, targetoid varchar(36) not null, relation varchar(157), targetType int4, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, targetoid)); +create table m_assignment_ext_string (item_id int4 not null, anyContainer_owner_id int4 not null, anyContainer_owner_owner_oid varchar(36) not null, stringValue varchar(255) not null, primary key ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, stringValue)); create table m_assignment_extension (owner_id int4 not null, owner_owner_oid varchar(36) not null, booleansCount int2, datesCount int2, longsCount int2, polysCount int2, referencesCount int2, stringsCount int2, primary key (owner_id, owner_owner_oid)); create table m_assignment_policy_situation (assignment_id int4 not null, assignment_oid varchar(36) not null, policySituation varchar(255)); create table m_assignment_reference (owner_id int4 not null, owner_owner_oid varchar(36) not null, reference_type int4 not null, relation varchar(157) not null, targetOid varchar(36) not null, targetType int4, primary key (owner_id, owner_owner_oid, reference_type, relation, targetOid)); @@ -23,12 +23,12 @@ create table m_ext_item (id serial not null, kind int4, itemName varchar(157), create table m_focus_photo (owner_oid varchar(36) not null, photo bytea, primary key (owner_oid)); create table m_focus_policy_situation (focus_oid varchar(36) not null, policySituation varchar(255)); create table m_object (oid varchar(36) not null, booleansCount int2, createChannel varchar(255), createTimestamp timestamp, creatorRef_relation varchar(157), creatorRef_targetOid varchar(36), creatorRef_type int4, datesCount int2, fullObject bytea, lifecycleState varchar(255), longsCount int2, modifierRef_relation varchar(157), modifierRef_targetOid varchar(36), modifierRef_type int4, modifyChannel varchar(255), modifyTimestamp timestamp, name_norm varchar(255), name_orig varchar(255), objectTypeClass int4, polysCount int2, referencesCount int2, stringsCount int2, tenantRef_relation varchar(157), tenantRef_targetOid varchar(36), tenantRef_type int4, version int4 not null, primary key (oid)); -create table m_object_ext_boolean (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, booleanValue boolean not null, primary key (item_id, owner_oid, ownerType, booleanValue)); -create table m_object_ext_date (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, dateValue timestamp not null, primary key (item_id, owner_oid, ownerType, dateValue)); -create table m_object_ext_long (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, longValue int8 not null, primary key (item_id, owner_oid, ownerType, longValue)); -create table m_object_ext_poly (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, orig varchar(255) not null, norm varchar(255), primary key (item_id, owner_oid, ownerType, orig)); -create table m_object_ext_reference (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, targetoid varchar(36) not null, relation varchar(157), targetType int4, primary key (item_id, owner_oid, ownerType, targetoid)); -create table m_object_ext_string (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, stringValue varchar(255) not null, primary key (item_id, owner_oid, ownerType, stringValue)); +create table m_object_ext_boolean (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, booleanValue boolean not null, primary key (owner_oid, ownerType, item_id, booleanValue)); +create table m_object_ext_date (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, dateValue timestamp not null, primary key (owner_oid, ownerType, item_id, dateValue)); +create table m_object_ext_long (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, longValue int8 not null, primary key (owner_oid, ownerType, item_id, longValue)); +create table m_object_ext_poly (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, orig varchar(255) not null, norm varchar(255), primary key (owner_oid, ownerType, item_id, orig)); +create table m_object_ext_reference (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, targetoid varchar(36) not null, relation varchar(157), targetType int4, primary key (owner_oid, ownerType, item_id, targetoid)); +create table m_object_ext_string (item_id int4 not null, owner_oid varchar(36) not null, ownerType int4 not null, stringValue varchar(255) not null, primary key (owner_oid, ownerType, item_id, stringValue)); create table m_object_text_info (owner_oid varchar(36) not null, text varchar(255) not null, primary key (owner_oid, text)); create table m_operation_execution (id int4 not null, owner_oid varchar(36) not null, initiatorRef_relation varchar(157), initiatorRef_targetOid varchar(36), initiatorRef_type int4, status int4, taskRef_relation varchar(157), taskRef_targetOid varchar(36), taskRef_type int4, timestampValue timestamp, primary key (id, owner_oid)); create table m_org_closure (ancestor_oid varchar(36) not null, descendant_oid varchar(36) not null, val int4, primary key (ancestor_oid, descendant_oid)); diff --git a/config/sql/_all/sqlserver-3.8-all.sql b/config/sql/_all/sqlserver-3.8-all.sql index e72c3a66968..29cdf65b82b 100644 --- a/config/sql/_all/sqlserver-3.8-all.sql +++ b/config/sql/_all/sqlserver-3.8-all.sql @@ -130,21 +130,21 @@ CREATE TABLE m_assignment_ext_boolean ( anyContainer_owner_id INT NOT NULL, anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, booleanValue BIT NOT NULL, - PRIMARY KEY (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, booleanValue) + PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, booleanValue) ); CREATE TABLE m_assignment_ext_date ( item_id INT NOT NULL, anyContainer_owner_id INT NOT NULL, anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, dateValue DATETIME2 NOT NULL, - PRIMARY KEY (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, dateValue) + PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, dateValue) ); CREATE TABLE m_assignment_ext_long ( item_id INT NOT NULL, anyContainer_owner_id INT NOT NULL, anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, longValue BIGINT NOT NULL, - PRIMARY KEY (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, longValue) + PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, longValue) ); CREATE TABLE m_assignment_ext_poly ( item_id INT NOT NULL, @@ -152,7 +152,7 @@ CREATE TABLE m_assignment_ext_poly ( anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, orig NVARCHAR(255) COLLATE database_default NOT NULL, norm NVARCHAR(255) COLLATE database_default, - PRIMARY KEY (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, orig) + PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, orig) ); CREATE TABLE m_assignment_ext_reference ( item_id INT NOT NULL, @@ -161,14 +161,14 @@ CREATE TABLE m_assignment_ext_reference ( targetoid NVARCHAR(36) COLLATE database_default NOT NULL, relation NVARCHAR(157) COLLATE database_default, targetType INT, - PRIMARY KEY (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, targetoid) + PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, targetoid) ); CREATE TABLE m_assignment_ext_string ( item_id INT NOT NULL, anyContainer_owner_id INT NOT NULL, anyContainer_owner_owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, stringValue NVARCHAR(255) COLLATE database_default NOT NULL, - PRIMARY KEY (item_id, anyContainer_owner_id, anyContainer_owner_owner_oid, stringValue) + PRIMARY KEY ( anyContainer_owner_owner_oid, anyContainer_owner_id, item_id,, stringValue) ); CREATE TABLE m_assignment_extension ( owner_id INT NOT NULL, @@ -315,21 +315,21 @@ CREATE TABLE m_object_ext_boolean ( owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, ownerType INT NOT NULL, booleanValue BIT NOT NULL, - PRIMARY KEY (item_id, owner_oid, ownerType, booleanValue) + PRIMARY KEY (owner_oid, ownerType, item_id, booleanValue) ); CREATE TABLE m_object_ext_date ( item_id INT NOT NULL, owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, ownerType INT NOT NULL, dateValue DATETIME2 NOT NULL, - PRIMARY KEY (item_id, owner_oid, ownerType, dateValue) + PRIMARY KEY (owner_oid, ownerType, item_id, dateValue) ); CREATE TABLE m_object_ext_long ( item_id INT NOT NULL, owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, ownerType INT NOT NULL, longValue BIGINT NOT NULL, - PRIMARY KEY (item_id, owner_oid, ownerType, longValue) + PRIMARY KEY (owner_oid, ownerType, item_id, longValue) ); CREATE TABLE m_object_ext_poly ( item_id INT NOT NULL, @@ -337,7 +337,7 @@ CREATE TABLE m_object_ext_poly ( ownerType INT NOT NULL, orig NVARCHAR(255) COLLATE database_default NOT NULL, norm NVARCHAR(255) COLLATE database_default, - PRIMARY KEY (item_id, owner_oid, ownerType, orig) + PRIMARY KEY (owner_oid, ownerType, item_id, orig) ); CREATE TABLE m_object_ext_reference ( item_id INT NOT NULL, @@ -346,14 +346,14 @@ CREATE TABLE m_object_ext_reference ( targetoid NVARCHAR(36) COLLATE database_default NOT NULL, relation NVARCHAR(157) COLLATE database_default, targetType INT, - PRIMARY KEY (item_id, owner_oid, ownerType, targetoid) + PRIMARY KEY (owner_oid, ownerType, item_id, targetoid) ); CREATE TABLE m_object_ext_string ( item_id INT NOT NULL, owner_oid NVARCHAR(36) COLLATE database_default NOT NULL, ownerType INT NOT NULL, stringValue NVARCHAR(255) COLLATE database_default NOT NULL, - PRIMARY KEY (item_id, owner_oid, ownerType, stringValue) + PRIMARY KEY (owner_oid, ownerType, item_id, stringValue) ); CREATE TABLE m_object_text_info ( owner_oid NVARCHAR(36) COLLATE database_default NOT NULL,