Compare commits

...

1 Commits

Author SHA1 Message Date
Bruno Bossola
a64e72a2c7 Created patch for the addition of the transaction ID index on alf_node table 2021-05-27 18:11:39 +01:00
6 changed files with 45 additions and 2 deletions

View File

@@ -57,6 +57,7 @@
<ref bean="patch.db-V6.0-change-set-indexes" />
<ref bean="patch.db-V6.3-add-indexes-node-transaction" />
<ref bean="patch.db-V7.1.0-remove-alf_server-table" />
<ref bean="patch.db-V7.1.0-add-node-txid-index" />
</list>
</property>
</bean>

View File

@@ -0,0 +1 @@
(?i).*missing index.*.alf_node.idx_alf_node_txn

View File

@@ -0,0 +1,23 @@
--
-- Title: Add txid index
-- Database: PostgreSQL
-- Since: V7.1.0
-- Author: Bruno Bossola
--
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
DROP INDEX idx_alf_node_txn;
CREATE INDEX idx_alf_node_txn on alf_node (transaction_id);
--
-- Record script finish
--
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V7.1.0-add-node-txid-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-V7.1.0-add-node-txid-index', 'Creates additional index on alf_node',
0, 15001, -1, 15002, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Transaction ID index added to alf_node'
);

View File

@@ -406,4 +406,4 @@ patch.db-V6.3-add-indexes-node-transaction.description=Create additional indexes
patch.db-V7.1.0-remove-alf_server-table.description=Removes alf_server table and constraints
patch.db-V7.1.0-add-node-txid-index.description=Adds the transaction ID index on the alf_node table

View File

@@ -1424,6 +1424,21 @@
</property>
<property name="ignored"><value>${system.remove-alf_server-table-from-db.ignored}</value></property>
</bean>
<bean id="patch.db-V7.1.0-add-node-txid-index" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
<property name="id"><value>patch.db-V7.1.0-add-node-txid-index</value></property>
<property name="description"><value>patch.db-V7.1.0-add-node-txid-index.description</value></property>
<property name="fixesFromSchema"><value>0</value></property>
<property name="fixesToSchema"><value>15001</value></property>
<property name="targetSchema"><value>15002</value></property>
<property name="scriptUrl">
<value>classpath:alfresco/dbscripts/upgrade/7.1.0/${db.script.dialect}/add-node-txid-index.sql</value>
</property>
<property name="problemsPatternFileUrl">
<value>classpath:alfresco/dbscripts/upgrade/7.1.0/add-node-txid-index.patterns</value>
</property>
<property name="ignored"><value>${system.add-node-txid-index.ignored}</value></property>
</bean>
<!--
-->

View File

@@ -3,7 +3,7 @@
repository.name=Main Repository
# Schema number
version.schema=15001
version.schema=15002
# Directory configuration
@@ -1244,3 +1244,6 @@ system.tempFileCleaner.maxTimeToRun=
# Property to long running migration to remove alf_server in v7+ patch.db-V7.1.0-remove-alf_server-table
system.remove-alf_server-table-from-db.ignored=true
# Adds the transaction ID index on the alf_node table
system.add-node-txid-index.ignored=true