01-26-2008 11:43 AM
<bean id="myUpdatePatch1" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
<property name="id">
<value>myUpdatePatch1</value>
</property>
<property name="description">
<value>patch.schemaUpgradeScript.description</value>
</property>
<property name="fixesFromSchema">
<value>0</value>
</property>
<property name="fixesToSchema">
<value>116</value>
</property>
<property name="targetSchema">
<value>117</value>
</property>
<property name="scriptUrl">
<value>classpath:alfresco/module/myamp/dbscripts/create/2.9/${db.script.dialect}/patch1.sql</value>
</property>
</bean>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.01-26-2008 02:30 PM
Hi,
I really need to add new table to the Alfresco database schema. The schema upgrade should be performed when the AMP is loaded. Following http://wiki.alfresco.com/wiki/Schema_Upgrade_Scripts#Script_Loading I added the appropriate bean<bean id="myUpdatePatch1" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
<property name="id">
<value>myUpdatePatch1</value>
</property>
<property name="description">
<value>patch.schemaUpgradeScript.description</value>
</property>
<property name="fixesFromSchema">
<value>0</value>
</property>
<property name="fixesToSchema">
<value>116</value>
</property>
<property name="targetSchema">
<value>117</value>
</property>
<property name="scriptUrl">
<value>classpath:alfresco/module/myamp/dbscripts/create/2.9/${db.script.dialect}/patch1.sql</value>
</property>
</bean>
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,
René
01-26-2008 02:56 PM
Just wondering what you need to add a new table to Alfresco for? I don't think it's impossible but you would want to have a really good reason to do it. Can you tell us a little about it?
01-29-2008 10:55 PM
Hi.Just wondering what you need to add a new table to Alfresco for? I don't think it's impossible but you would want to have a really good reason to do it. Can you tell us a little about it?
I'm working on a "Social Graph, Friend-Of-A-Friend" module similar to things you find in facebook.com or xing.com. At least this has to work with 20.000 users. To have full control how the database indexes and handles queries on that graph structure I think it is a good idea to have a distinct database table to store the graph. What do you think?
I can create the tables in code from the AMP using a component that will be executed once when the AMP ist loaded for the first time. But I think it's better to use the SchemaUpgradeScriptPatch. But this is not working for me until now. I think I have missed something
Best regards,
René
01-30-2008 03:23 AM
How does what you are building relate to alfresco? It's FOF inside alfresco ?
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.