Bug 778712 (SOA-1176) - Database structure changes between GA and CP01
Summary: Database structure changes between GA and CP01
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1176
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: JBPM - within SOA, Build Process, Configuration, Deployment
Version: 4.3 CP01
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.3 CP01
Assignee: Julian Coleman
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-13 10:23 UTC by Jiri Pechanec
Modified: 2009-04-08 05:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-08 05:45:47 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 778713 0 medium CLOSED Empty sql scripts in jpbm.esb/jbpm-sql directory 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 778754 0 urgent CLOSED Schema tool does not correctly update jbpm-service.xml file 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBPM-1755 0 None None None Never
Red Hat Issue Tracker JBPM-2017 0 None None None Never
Red Hat Issue Tracker JBPM-2018 0 None None None Never
Red Hat Issue Tracker SOA-1176 0 None None None Never

Internal Links: 778713 778754

Description Jiri Pechanec 2009-02-13 10:23:30 UTC
Date of First Response: 2009-02-13 08:05:38
project_key: SOA

There are significant changes in the database structure between GA and CP version. The Oracle changes are
1) A lot of varchar2(4000) columns were replace with clob
2) There is new field PARENTLOCKMODE_ in JBPM_NODE table

There should be either now changes or migration scripts has to be provided for all databases

Comment 1 Thomas Diesler 2009-02-13 12:48:27 UTC
Link: Added: This issue related JBPM-2018


Comment 2 Thomas Diesler 2009-02-13 12:48:53 UTC
Link: Added: This issue related JBPM-2017


Comment 3 Thomas Diesler 2009-02-13 12:56:59 UTC
Link: Added: This issue related JBPM-1755


Comment 4 Thomas Diesler 2009-02-13 13:05:38 UTC
Added links to related issues that contain detailed information on 1) and 2) 

> There should be either now changes or migration scripts has to be provided for all databases

The build can produce update scripts if there is a valid db connection to a legacy 3.2.2 schema. 

We only do this for databases that we can actually do QA for

http://www.jboss.org/community/docs/DOC-12860

https://svn.jboss.org/repos/jbpm/jbpm3/tags/jbpm-3.2.5.SP1/modules/db/scripts/antrun-jbpmschema.xml

We cannot claim support for databases that are not covered my this matrix.

Support for all SOA platform Tier1 databases is subject of JBPM-1451, which has a dependency on JBPM-1408



Comment 5 trev 2009-02-17 10:01:14 UTC
We cannot release until the migration scripts are presen
If the build cannot produce the scripts can they be hand crafted?

Comment 7 Thomas Diesler 2009-02-17 11:18:41 UTC
Generating the update scripts should be easy for mysql, postgresql and sybase. You point your connection properties in profiles.xml to an existing jbpm322 schema and build the db module.

For databases that you don't have an existing jbpm322 schema, the update scripts cannot be generated. In which case you probably don't need an update script because you don't have the jbpm322 schema to test it against. As a consequence I'd say you cannot claim support for a database for which you don't have an existing schema.

RH IT should be able to give you the connection properties for the jbpm322 schemas

The maven build executes this ant target

  <target name="update-schema" depends="setup-schema" description="Generate jBPM Database Update Scripts">
  
    <jbpmschema output="${scriptsdir}/jbpm.jpdl.mysql.update322.sql" config="hibernate.cfg.mysql.xml" properties="mysql.properties" action="update" delimiter=";"/>
    <jbpmschema output="${scriptsdir}/jbpm.jpdl.postgresql.update322.sql" config="hibernate.cfg.postgresql.xml" properties="postgresql.properties" action="update" delimiter=";"/>
    <jbpmschema output="${scriptsdir}/jbpm.jpdl.sybase.update322.sql" config="hibernate.cfg.sybase.xml" properties="sybase.properties" action="update" delimiter=";"/>
   
  </target>


Comment 8 trev 2009-02-18 10:26:07 UTC
Link: Added: This issue depends JBQA-2077


Comment 9 Julian Coleman 2009-02-23 15:30:07 UTC
As per JBPM-2056 and JBPM-1755, the only change between the 3.2.2 and 3.2.5SP schema
is now the addition of a PARENTLOCKMODE_ column to the JBPM_NODE table.  This addition
needs to be catered for with upgrade scripts.

This addition also needs to be documented in the release notes, for users who create/update
the database schema manually.


Comment 10 Jiri Pechanec 2009-02-24 09:10:22 UTC
Do not forget varchar2(4000)/clob replacement. These are incpomaptible datatypes from Hibernate POV so it has to be also handled carefully. The scripts should
1) Alter the tables to use clob
2) Ensure that the data already present are converted to new datatype


Comment 11 Julian Coleman 2009-02-24 10:58:56 UTC
With the changes to the 3.2.5 SP schema, the only changes are:

  all DB's:	addition of PARENTLOCKMODE_ column to the JBPM_NODE table
  Ingres:	change of columns from `date with null' to `timestamp with time zone with null'
  Sybase:	change of EXCEPTION_ column from `varchar(4000)' to `text'

Note that Ingres is not a supported database and that the Sybase change has already been
compatibilty tested.


Comment 12 Julian Coleman 2009-02-26 11:19:53 UTC
Fixed with revision 2692 (4.3 branch of:
  build-tools/builders/jbpm/jbpm.esb/jbpm-service.xml
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.db2.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.derby.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.firebird.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.hsqldb.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.ingres.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.interbase.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.mckoi.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.mssql.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.mysql.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.oracle.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.postgresql.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.sapdb.update322.sql
  build-tools/builders/jbpm/jbpm.esb/jbpm-sql/jbpm.jpdl.sybase.update322.sql

Commit message:
  Add upgrade database scripts and *service.xml files to fix JIRA SOA-1176.

and with revision 2694 (4.3 branch) of:
  build-tools/builders/jbpm/build.xml

Commit message:
  Install upgrade database scripts and *service.xml files to fix JIRA SOA-1176.



Comment 13 Jiri Pechanec 2009-03-06 06:24:48 UTC
Verified in CR3

Comment 14 Julian Coleman 2009-03-30 09:08:18 UTC
It has been decided not to add the additional PARENTLOCKMODE_
column to the JBPM_NODE table in CP01.

See also JBPM-2121

Comment 15 Julian Coleman 2009-03-30 09:08:53 UTC
Link: Added: This issue is related to JBPM-2121


Comment 16 Julian Coleman 2009-03-30 12:10:15 UTC
Link: Added: This issue related SOA-1209


Comment 17 Julian Coleman 2009-03-30 12:10:30 UTC
Link: Added: This issue related SOA-1177


Comment 18 Julian Coleman 2009-03-30 12:27:07 UTC
Fixed with revision 2867 (4.3 branch) of:
  build-tools/builders/jbpm

Commit message:
  SOA-1176
  Revert revision 2692 and remove database scripts and *service.xml files.

and with revision 2868 (4.3 branch) of: 
   build-tools/builders/jbpm/build.xml

Commit message:
  SOA-1176
  Revert revision 2694 and remove installation of upgrade database scripts
  and *service.xml files


Comment 19 Alejandro Guizar 2009-04-01 14:24:08 UTC
Link: Added: This issue is related to JBPM-2119


Comment 21 Jiri Pechanec 2009-04-08 05:45:47 UTC
Verified in CR7


Note You need to log in before you can comment on or make changes to this bug.