-
Bug
-
Resolution: Done
-
Blocker
-
6.1.0
-
None
-
Release Notes
-
-
-
-
-
CR1
- Description of problem:
Using the database dump attached I ran the migration script [1] I the error [2] was shown.
[1] - https://github.com/droolsjbpm/jbpm/blob/master/jbpm-installer/db/upgrade-scripts/postgresql/bpms-6.0-to-6.1.sql
[2] - ERROR: null value in column "id" violates not-null constraint SQL state: 23502
- Version-Release number of selected component (if applicable):
I was migrating from 6.0.3 to 6.1.3 using Postgres 9.2
- How reproducible:
You don't need Jboss BPMS to reproduce this. Just install Postgres 9.2
- Steps to Reproduce:
On Postgres 9.2:
- Create a database;
- Import the dump attached;
- Try execute the whole upgrade script.
- Actual results:
ERROR: null value in column "id" violates not-null constraint SQL state: 23502
- Expected results:
No errors
- Additional info:
As a workaround I changed the script, to link the id column (from the table AuditTaskImpl) to the sequence AUDIT_ID_SEQ (See [3]).
But I'm not sure if this is the best approach. If the persistence source code is putting the sequence using Hibernate this change which I made could lead to problems.
Better have an official solution to this from the experts.
-> Point of attention: In this change I placed single quotes in the nextval call but I got reports from people having the error because of this. So, if you got an error like [4] try remove the quote or put double quotes.
[3] -
...
create table AuditTaskImpl (
id int8 DEFAULT nextval('AUDIT_ID_SEQ') not null,
...
[4] -
ERROR: relation “audit_id_seq” does not exist SQL state: 42P01
- is blocked by
-
RHBPMS-1330 Add database upgrade scripts to BPMS distribution
- Verified