Page 2 of 2

Re: Migration from 5.0.4 to 5.1.4

PostPosted:Mon Sep 05, 2011 2:57 pm
by Catscratch
I tried to test it.

In the admin interface at database query I additionally have to select JDBC or Hibernate. But in both cases, I get an error.

JDBC
Code: Select all
Application error
Class:	com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
Message:	You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT CONCAT('INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''', ROL_ID, ''' at line 2
Date:	Mon Sep 05 16:55:22 CEST 2011
Hibernate
Code: Select all
Application error

Class:	org.hibernate.QueryException
Message:	unexpected char: ';' [SELECT CONCAT('INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''', USR_ID, ''', ''', USR_NAME, ''', ''', USR_PASSWORD, ''', ''', USR_EMAIL, ''', ''', IF(USR_ACTIVE IS TRUE,'T', 'F'), ''');') FROM OKM_USER; SELECT CONCAT('INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''', ROL_ID, ''', ''', IF(ROL_ACTIVE IS TRUE, 'T', 'F'), ''');') FROM OKM_ROLE; SELECT CONCAT('INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''', UR_USER, ''', ''', UR_ROLE, ''');') FROM OKM_USER_ROLE;]
Date:	Mon Sep 05 16:55:52 CEST 2011

Re: Migration from 5.0.4 to 5.1.4

PostPosted:Tue Sep 06, 2011 7:15 am
by pavila
The query is in SQL (JDBC) format and is working because I have just tested it.
Code: Select all
SELECT CONCAT('INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''', ROL_ID, ''', ''', IF(ROL_ACTIVE IS TRUE, 'T', 'F'), ''');') FROM OKM_ROLE;

Re: Migration from 5.0.4 to 5.1.4

PostPosted:Thu Sep 15, 2011 8:38 am
by Catscratch
For a better overview, I moved the topic here. (Migration to 5.1.7)