AnsweredAssumed Answered

Schema Upgrade from AMP

Question asked by renspr on Jan 26, 2008
Latest reply on Jan 30, 2008 by renspr

I really need to add new table to the Alfresco database schema. The schema upgrade should be performed when the AMP is loaded. Following I added the appropriate bean

<bean id="myUpdatePatch1" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
    <property name="id">
    <property name="description">
    <property name="fixesFromSchema">
    <property name="fixesToSchema">
    <property name="targetSchema">
    <property name="scriptUrl">

to module-context.xml.

I get the following problem:
16:05:14,300 User:System INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
16:05:14,824 User:System INFO  [admin.patch.PatchExecuter]    Applying patch 'myUpdatePatch1' (patch.schemaUpgradeScript.description).
16:05:14,831 User:System ERROR [admin.patch.PatchExecuter] The schema upgrade script, 'classpath:alfresco/module/myamp/dbscripts/create/2.9/${db.script.dialect}/patch1.sql', has not been run against this database.

It looks like that the ${db.script.dialect} property is not correctly replaced with the current dialect. Has somebody successfully run the SchemaUpgradeScriptPatch from an AMP? Are there better solutions?

Best regards,