mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged V3.4 to HEAD (SQL-level fixes)
23368: Merged V3.3-BUG-FIX to V3.4 23363: Merged V3.3 to V3.3-BUG-FIX 23358: (RECORD ONLY) Removed redundant svn:mergeinfo 23359: Minor I18N fix on patch.updateMimetypes2 23360: Fixed ALF-3167: Websphere/Db2 SchemaBootstrap.dumpSchema is failing due to result set is closed error - SchemaDump uses nested resultset reads, which is incompatible with SchemaBootstrap's auto-commit connection - Also pull back some changes to fix MySQL builds after MySQL upgrades 23361: More patch I18N 23362: Merged V3.2 to V3.3 23333: Fixed ALF-5396: Missing FK indexes on non-MySQL databases 23324: Fixed ALF-5396: Missing FK indexes on non-MySQL databases - Create scripts were manually ported and required full clean-install testing in addition to upgrade testing 23372: Fixed ALF-5421: update_ChildAssocsIndex ibatis statement does not include child_node_id 23523: Merged BRANCHES/DEV/V3.3-BUG-FIX to BRANCHES/V3.4: 23490: Merged BRANCHES/V3.3 to BRANCHES/DEV/V3.3-BUG-FIX: 23470: Merged V3.2 to V3.3 23395: Merged BRANCHES/DEV/BELARUS/HEAD_2010_09_21 to V32 22821: ALF-4203: WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x. 23055: ALF-4203: WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x (record-only, used only part of this checkin). 23198: ALF-4203: WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x. 23398: ALF-4203: fix for "WCM 2.2.7 case-senstivity causes err rs after upgrade to 3.2.x" - updated template for patch.eliminateDuplicates 23433: Fix for ALF-4203: "WCM 2.2.7 case-sensitivity causes errors after upgrade to 3.2.x" - revised fix 23752: Fixed ALF-5453: Remove old Audit tables from schema create scripts 23957: Fixed ALF-5308: SQL error when changing name for record / folder with dispostion schedule applied 24250: Fix typo in original fix of ALF-5308 and add unit test 24345: Merged V3.3 to V3.4 24337: Fixed ALF-6078: WCM: alf_lock table version number fails during roll-over. - Added specific, minor fixes for 3.4 24352: Fix SQL fallout from ALF-6078 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@24354 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
--
|
||||
-- Title: Ensure the audit table path column is indexed
|
||||
-- Database: Generic
|
||||
-- Since: V2.1 Schema 82
|
||||
-- Author: Andy Hind
|
||||
--
|
||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
||||
--
|
||||
-- Path was previously unused and unindex - new we use it the index is required.
|
||||
|
||||
CREATE INDEX idx_alf_adtf_pth ON alf_audit_fact (path(128));
|
||||
|
||||
--
|
||||
-- Record script finish
|
||||
--
|
||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-AuditPathIndex';
|
||||
INSERT INTO alf_applied_patch
|
||||
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
|
||||
VALUES
|
||||
(
|
||||
'patch.db-V2.1-AuditPathIndex', 'Manually executed script upgrade V2.1: Ensure existence of audit path index',
|
||||
0, 81, -1, 82, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
|
||||
);
|
@@ -10,11 +10,6 @@
|
||||
-- to simplify subsequent upgrade scripts.
|
||||
--
|
||||
|
||||
-- Fix alf_audit_date column names
|
||||
|
||||
ALTER TABLE alf_audit_date CHANGE COLUMN halfYear half_year INTEGER NOT NULL;
|
||||
ALTER TABLE alf_audit_date CHANGE COLUMN year full_year INTEGER NOT NULL;
|
||||
|
||||
-- create other new tables
|
||||
|
||||
create table avm_aspects (
|
||||
|
@@ -966,56 +966,6 @@ ALTER TABLE alf_attributes
|
||||
ADD INDEX fk_alf_attr_acl (acl_id)
|
||||
;
|
||||
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_woy_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_date_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_y_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_q_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_m_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_dow_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_doy_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_dom_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_hy_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date DROP INDEX adt_wom_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_date
|
||||
ADD INDEX idx_alf_adtd_woy (week_of_year),
|
||||
ADD INDEX idx_alf_adtd_q (quarter),
|
||||
ADD INDEX idx_alf_adtd_wom (week_of_month),
|
||||
ADD INDEX idx_alf_adtd_dom (day_of_month),
|
||||
ADD INDEX idx_alf_adtd_doy (day_of_year),
|
||||
ADD INDEX idx_alf_adtd_dow (day_of_week),
|
||||
ADD INDEX idx_alf_adtd_m (month),
|
||||
ADD INDEX idx_alf_adtd_hy (half_year),
|
||||
ADD INDEX idx_alf_adtd_fy (full_year),
|
||||
ADD INDEX idx_alf_adtd_dat (date_only)
|
||||
;
|
||||
|
||||
ALTER TABLE alf_audit_fact DROP INDEX adt_user_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_fact DROP INDEX adt_store_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_fact
|
||||
DROP INDEX FKEAD18174A0F9B8D9, DROP FOREIGN KEY FKEAD18174A0F9B8D9,
|
||||
DROP INDEX FKEAD1817484342E39, DROP FOREIGN KEY FKEAD1817484342E39,
|
||||
DROP INDEX FKEAD18174F524CFD7, DROP FOREIGN KEY FKEAD18174F524CFD7
|
||||
;
|
||||
ALTER TABLE alf_audit_fact
|
||||
ADD INDEX idx_alf_adtf_ref (store_protocol, store_id, node_uuid),
|
||||
ADD INDEX idx_alf_adtf_usr (user_id),
|
||||
ADD INDEX fk_alf_adtf_src (audit_source_id),
|
||||
ADD CONSTRAINT fk_alf_adtf_src FOREIGN KEY (audit_source_id) REFERENCES alf_audit_source (id),
|
||||
ADD INDEX fk_alf_adtf_date (audit_date_id),
|
||||
ADD CONSTRAINT fk_alf_adtf_date FOREIGN KEY (audit_date_id) REFERENCES alf_audit_date (id),
|
||||
ADD INDEX fk_alf_adtf_conf (audit_conf_id),
|
||||
ADD CONSTRAINT fk_alf_adtf_conf FOREIGN KEY (audit_conf_id) REFERENCES alf_audit_config (id)
|
||||
;
|
||||
|
||||
ALTER TABLE alf_audit_source DROP INDEX app_source_app_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_source DROP INDEX app_source_ser_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_source DROP INDEX app_source_met_idx; -- (optional)
|
||||
ALTER TABLE alf_audit_source
|
||||
ADD INDEX idx_alf_adts_met (method),
|
||||
ADD INDEX idx_alf_adts_ser (service),
|
||||
ADD INDEX idx_alf_adts_app (application)
|
||||
;
|
||||
|
||||
ALTER TABLE alf_global_attributes DROP FOREIGN KEY FK64D0B9CF69B9F16A; -- (optional)
|
||||
ALTER TABLE alf_global_attributes DROP INDEX FK64D0B9CF69B9F16A; -- (optional)
|
||||
-- alf_global_attributes.attribute is declared unique. Indexes may automatically have been created.
|
||||
|
Reference in New Issue
Block a user