# USE COLUMN TYPE FOR COLUMN "DATA" FOR THE RELEVANT DATABASE
#Mysql           LONGTEXT
#SQLServer       TEXT
#Postgres        TEXT
#Oracle          CLOB
#H2              CLOB
#Derby           CLOB
#HSQL            LONGVARCHAR



#Hibernate MYSQL Script
ALTER TABLE STORE_PROCESS_PROP ADD COLUMN DATA LONGTEXT;
CREATE TABLE STORE_PROCESS_PROP_TEST SELECT * FROM STORE_PROCESS_PROP;
UPDATE STORE_PROCESS_PROP A SET A.DATA=(SELECT VALUE FROM STORE_PROCESS_PROP_TEST  WHERE PROPID=A.PROPID AND NAME=A.NAME);
DROP TABLE STORE_PROCESS_PROP_TEST;
ALTER TABLE STORE_PROCESS_PROP DROP COLUMN VALUE;


#OpenJPA MYSQL Script
ALTER TABLE STORE_PROCESS_PROP ADD COLUMN DATA LONGTEXT;
CREATE TABLE STORE_PROCESS_PROP_TEST SELECT * FROM STORE_PROCESS_PROP;
UPDATE STORE_PROCESS_PROP A SET A.DATA=(SELECT PROP_VAL FROM STORE_PROCESS_PROP_TEST WHERE ID=A.ID);
DROP TABLE STORE_PROCESS_PROP_TEST;
ALTER TABLE STORE_PROCESS_PROP DROP COLUMN PROP_VAL;

