mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged DEV to HEAD (4.2)
54544: ALF-19487 : ORACLE: AVM: Schema difference is present after upgrade from 3.4.13/4.0.2/4.1.5 Removed/changed unnecessary index idx_avm_vr_revuq. Added patches for all DBs. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54662 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
tag varchar(255),
|
||||
description text,
|
||||
primary key (id),
|
||||
unique (version_id, avm_store_id)
|
||||
constraint unique index idx_avm_vr_uq (avm_store_id, version_id)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
alter table avm_aspects
|
||||
@@ -233,8 +233,6 @@ ALTER TABLE avm_store_properties ADD CONSTRAINT fk_avm_sprop_qname FOREIGN KEY (
|
||||
|
||||
CREATE INDEX idx_avm_hl_revpk ON avm_history_links (descendent, ancestor);
|
||||
|
||||
CREATE INDEX idx_avm_vr_revuq ON avm_version_roots (avm_store_id, version_id);
|
||||
|
||||
CREATE INDEX idx_avm_ce_lc_name ON avm_child_entries (lc_name, parent_id);
|
||||
|
||||
--
|
||||
|
@@ -715,12 +715,6 @@
|
||||
</foreignkey>
|
||||
</foreignkeys>
|
||||
<indexes>
|
||||
<index name="version_id" unique="true">
|
||||
<columnnames>
|
||||
<columnname>version_id</columnname>
|
||||
<columnname>avm_store_id</columnname>
|
||||
</columnnames>
|
||||
</index>
|
||||
<index name="idx_avm_vr_version" unique="false">
|
||||
<columnnames>
|
||||
<columnname>version_id</columnname>
|
||||
@@ -736,7 +730,7 @@
|
||||
<columnname>root_id</columnname>
|
||||
</columnnames>
|
||||
</index>
|
||||
<index name="idx_avm_vr_revuq" unique="false">
|
||||
<index name="idx_avm_vr_uq" unique="true">
|
||||
<columnnames>
|
||||
<columnname>avm_store_id</columnname>
|
||||
<columnname>version_id</columnname>
|
||||
|
@@ -122,10 +122,14 @@
|
||||
root_id INT8 not null,
|
||||
tag varchar(255),
|
||||
description VARCHAR(1024),
|
||||
primary key (id),
|
||||
unique (version_id, avm_store_id)
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create unique index idx_avm_vr_uq on avm_version_roots (avm_store_id, version_id);
|
||||
alter table avm_version_roots
|
||||
add constraint idx_avm_vr_uq
|
||||
unique using index idx_avm_vr_uq;
|
||||
|
||||
alter table avm_aspects
|
||||
add constraint fk_avm_nasp_n
|
||||
foreign key (node_id)
|
||||
@@ -237,8 +241,6 @@ ALTER TABLE avm_store_properties ADD CONSTRAINT fk_avm_sprop_qname FOREIGN KEY (
|
||||
|
||||
CREATE INDEX idx_avm_hl_revpk ON avm_history_links (descendent, ancestor);
|
||||
|
||||
CREATE INDEX idx_avm_vr_revuq ON avm_version_roots (avm_store_id, version_id);
|
||||
|
||||
CREATE INDEX idx_avm_ce_lc_name ON avm_child_entries (lc_name, parent_id);
|
||||
|
||||
--
|
||||
|
@@ -726,12 +726,6 @@
|
||||
</foreignkey>
|
||||
</foreignkeys>
|
||||
<indexes>
|
||||
<index name="avm_version_roots_version_id_avm_store_id_key" unique="true">
|
||||
<columnnames>
|
||||
<columnname>version_id</columnname>
|
||||
<columnname>avm_store_id</columnname>
|
||||
</columnnames>
|
||||
</index>
|
||||
<index name="fk_avm_vr_root" unique="false">
|
||||
<columnnames>
|
||||
<columnname>root_id</columnname>
|
||||
@@ -742,7 +736,7 @@
|
||||
<columnname>avm_store_id</columnname>
|
||||
</columnnames>
|
||||
</index>
|
||||
<index name="idx_avm_vr_revuq" unique="false">
|
||||
<index name="idx_avm_vr_uq" unique="true">
|
||||
<columnnames>
|
||||
<columnname>avm_store_id</columnname>
|
||||
<columnname>version_id</columnname>
|
||||
|
@@ -106,6 +106,7 @@
|
||||
<ref bean="patch.db-V3.4-AVM-rename-dupes" />
|
||||
<ref bean="patch.db-V3.4-AVM-index-child-entries-lower" />
|
||||
<ref bean="patch.db-V4.1-fix-AVM-seqs-order" />
|
||||
<ref bean="patch.db-V4.2-drop-AVM-index" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
@@ -0,0 +1,26 @@
|
||||
--
|
||||
-- Title: DROP unused IDX_AVM_VR_REVUQ index
|
||||
-- Database: InnoDB
|
||||
-- Since: V4.2 Schema 6031
|
||||
-- Author: Alex Mukha
|
||||
--
|
||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
||||
--
|
||||
-- ALF-19487 : ORACLE: AVM: Schema difference is present after upgrade from 3.4.13/4.0.2/4.1.5
|
||||
|
||||
DROP INDEX idx_avm_vr_revuq ON avm_version_roots;
|
||||
DROP INDEX version_id ON avm_version_roots;
|
||||
ALTER TABLE avm_version_roots ADD CONSTRAINT UNIQUE INDEX idx_avm_vr_uq (avm_store_id, version_id);
|
||||
|
||||
--
|
||||
-- Record script finish
|
||||
--
|
||||
|
||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V4.2-drop-AVM-index';
|
||||
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-V4.2-drop-AVM-index', 'Manually executed script to drop unnecessary index',
|
||||
0, 6031, -1, 6032, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
|
||||
);
|
@@ -0,0 +1,27 @@
|
||||
--
|
||||
-- Title: DROP unused IDX_AVM_VR_REVUQ index
|
||||
-- Database: PostgreSQL
|
||||
-- Since: V4.2 Schema 6031
|
||||
-- Author: Alex Mukha
|
||||
--
|
||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
||||
--
|
||||
-- ALF-19487 : ORACLE: AVM: Schema difference is present after upgrade from 3.4.13/4.0.2/4.1.5
|
||||
|
||||
DROP INDEX idx_avm_vr_revuq;
|
||||
ALTER TABLE avm_version_roots DROP CONSTRAINT avm_version_roots_version_id_avm_store_id_key;
|
||||
CREATE UNIQUE INDEX idx_avm_vr_uq ON avm_version_roots (avm_store_id, version_id);
|
||||
ALTER TABLE avm_version_roots ADD CONSTRAINT idx_avm_vr_uq UNIQUE USING INDEX idx_avm_vr_uq;
|
||||
|
||||
--
|
||||
-- Record script finish
|
||||
--
|
||||
|
||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V4.2-drop-AVM-index';
|
||||
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-V4.2-drop-AVM-index', 'Manually executed script to drop unnecessary index',
|
||||
0, 6031, -1, 6032, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
|
||||
);
|
@@ -3619,4 +3619,15 @@
|
||||
<value>classpath:alfresco/dbscripts/upgrade/4.1/${db.script.dialect}/fix-AVM-seqs-order.sql</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.db-V4.2-drop-AVM-index" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<property name="id" value="patch.db-V4.2-drop-AVM-index" />
|
||||
<property name="description" value="patch.schemaUpgradeScript.description" />
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>6031</value></property>
|
||||
<property name="targetSchema"><value>6032</value></property>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/upgrade/4.2/${db.script.dialect}/drop-AVM-index.sql</value>
|
||||
</property>
|
||||
</bean>
|
||||
</beans>
|
||||
|
@@ -23,4 +23,4 @@ version.build=r@scm-revision@-b@build-number@
|
||||
|
||||
# Schema number
|
||||
|
||||
version.schema=6031
|
||||
version.schema=6032
|
||||
|
Reference in New Issue
Block a user