IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_ROLE' AND KSQL_COL_NAME IN ('FCREATEADMINGRP')) 
 ALTER TABLE T_PERM_ROLE ADD (FCREATEADMINGRP BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_ROLE' AND KSQL_COL_NAME IN ('FUSESCOPE')) 
 ALTER TABLE T_PERM_ROLE ADD (FUSESCOPE CHAR(1) DEFAULT '2' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PERM_ADMINGROUPROLE') 
 CREATE TABLE T_PERM_ADMINGROUPROLE (
FID BIGINT DEFAULT 0 NOT NULL,
FADMINGROUPID BIGINT DEFAULT 0 NOT NULL,
FROLEID VARCHAR(19) DEFAULT ' ' NOT NULL,
FISMODIFIABLE CHAR(1) DEFAULT '0' NOT NULL
);

