Fix ALF-10893: Fail upgrade from 2.2.8 -> 4.0 on MySQL

- Included: ALF-10897: Patch SiteStorePatch must be changed to NoOpPatch
 - Site permission fixes not required if the site root is being imported (see <alternatives>)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31325 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-10-18 17:11:56 +00:00
parent e3238c26a3
commit 4df62abcbf
2 changed files with 12 additions and 75 deletions

View File

@@ -1102,20 +1102,12 @@
</property>
</bean>
<bean id="patch.createSiteStore" class="org.alfresco.repo.admin.patch.impl.SiteStorePatch" parent="basePatch">
<bean id="patch.createSiteStore" class="org.alfresco.repo.admin.patch.impl.NoOpPatch" parent="basePatch">
<property name="id"><value>patch.createSiteStore</value></property>
<property name="description"><value>patch.createSiteStore.description</value></property>
<property name="description"><value>patch.noOpPatch.description</value></property>
<property name="fixesFromSchema"><value>0</value></property>
<property name="fixesToSchema"><value>126</value></property>
<property name="targetSchema"><value>127</value></property>
<property name="dependsOn" >
<list>
<ref bean="patch.updateDmPermissions" />
</list>
</property>
<property name="siteAVMBootstrap">
<ref bean="siteAVMBootstrap" />
</property>
</bean>
<bean id="patch.sitesFolder" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
@@ -2936,7 +2928,11 @@
<property name="fixesToSchema"><value>5011</value></property>
<property name="targetSchema"><value>5012</value></property>
<property name="requiresTransaction"><value>false</value></property>
<property name="alternatives" >
<list>
<ref bean="patch.sitesFolder" />
</list>
</property>
<property name="fileFolderService" ref="fileFolderService" />
<property name="contentService" ref="contentService" />
<property name="siteService" ref="SiteService" />
@@ -3057,6 +3053,11 @@
<property name="fixesFromSchema"><value>0</value></property>
<property name="fixesToSchema"><value>5017</value></property>
<property name="targetSchema"><value>5018</value></property>
<property name="alternatives" >
<list>
<ref bean="patch.sitesFolder" />
</list>
</property>
<property name="requiresTransaction"><value>true</value></property>
<property name="applyToTenants"><value>true</value></property>
<property name="permissionService" ref="permissionService" />

View File

@@ -1,64 +0,0 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.admin.patch.impl;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.site.SiteAVMBootstrap;
/**
* @author Kevin Roast
*/
public class SiteStorePatch extends AbstractPatch
{
private static final String MSG_RESULT = "patch.createSiteStore.result";
private SiteAVMBootstrap siteBootstrap;
/**
* @param siteBootstrap the SiteAVMBootstrap component to set
*/
public void setSiteAVMBootstrap(SiteAVMBootstrap siteBootstrap)
{
this.siteBootstrap = siteBootstrap;
}
/**
* @see org.alfresco.repo.admin.patch.AbstractPatch#checkProperties()
*/
@Override
protected void checkProperties()
{
super.checkProperties();
checkPropertyNotNull(this.siteBootstrap, "siteAVMBootstrap");
}
/**
* @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal()
*/
@Override
protected String applyInternal() throws Exception
{
this.siteBootstrap.bootstrap();
return I18NUtil.getMessage(MSG_RESULT);
}
}