cancel
Showing results for 
Search instead for 
Did you mean: 

upgrade 1.3 Community to 1.4 (Tomcat/Sybase ASE12.5)

wisem
Champ in-the-making
Champ in-the-making
I am trying to upgrade an existing 1.3 Community installation on Tomcat 5.5 to 1.4.  We are using Sybase ASE 12.5.  I've converted the supplied MySQL upgrade script (in dbscripts\upgrade\1.4) to T-SQL and run this manually, so I now have all my Alfresco tables prefixed with alf_.  I've deployed the 1.4 WAR file as well.  When starting Alfresco I am now getting errors because I do not have the JBPM tables defined in my database.  I've found a script in the ECMS Community Network download for HSQL (alfresco.script), so I guess I can convert this if needed (or preferably if there is a MySQL version somewhere please let me know).  I don't think we need the workflow capabilities presently, so is there a way of switching this off?

TIA,
Malc
3 REPLIES 3

derek
Star Contributor
Star Contributor
Hi,

Have you switched schema updating off?  If so, the system won't automatically create any missing tables, i.e. the JBPM tables.  If you ran the scripts yourself, then the system will detect that they have been run and will not attempt to run them automatically.  This is controlled by the final insert intot the alf_applied_patch table.

Alternatively, follow the guidance in the Wiki and put your files in the shared/classes subdirectory in Tomcat, using the correct package naming.  Then the system will find the scripts appropriate to your DB dialect and execute them for you, followed by checking for missing tables and auto-generating and running a script for those.

If you are happy with your scripts, please consider contributing them back to us for inclusion into the product.

Regards

wisem
Champ in-the-making
Champ in-the-making
Hi Derek,

Thanks for the reply.
Looks like I needed to add the hibernate.hbm2ddl.auto=update property to my hibernate.cfg to create the JBPM tables.
I'll tidy up my Sybase script and then I'll be glad to contribute it.

Cheers,
Malc

derek
Star Contributor
Star Contributor
Hi,

The schemaBootstrap bean in bootstrap-context.xml uses the Hibernate schema generator, but the hibernate.hbm2ddl.auto property should be false.  Instead auto-generation is controlled as part of our bootstrap process:

   <bean id="schemaBootstrap" class="org.alfresco.repo.domain.schema.SchemaBootstrap" >
      <property name="localSessionFactory">
         <ref bean="&amp;sessionFactory"></ref>  <!– inject the actual factory, not a session –>
      </property>
      <property name="updateSchema">
         <value>${db.schema.update}</value>
      </property>
      <property name="postCreateScriptUrls">
         <list>
            <value>classpath:alfresco/dbscripts/create/1.4/${db.script.dialect}/post-create-indexes.sql</value>
         </list>
      </property>
      <property name="validateUpdateScriptPatches">
         <list>
         </list>
      </property>
      <property name="applyUpdateScriptPatches">
         <list>
            <ref bean="patch.schemaUpdateScript-V1.4-1" />
            <ref bean="patch.schemaUpdateScript-V1.4-2" />
         </list>
      </property>
   </bean>
The important property here is db.schema.update, which is defined in repository.properties and can be overridden.  If you have the default

db.schema.update=true
then a SQL script will be generated and executed for all the missing bits.

Regards