/**Begin D:\PDM_UPGRADE\PDM1\EB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_TASKLISTGROUP') 
 CREATE TABLE T_EB_TASKLISTGROUP (
FID BIGINT DEFAULT 0 NOT NULL,
FCODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TASKLIST' AND KSQL_COL_NAME IN ('FGROUPID')) 
 ALTER TABLE T_EB_TASKLIST ADD (FGROUPID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_TASKSAVE') 
 CREATE TABLE T_EB_TASKSAVE (
FID BIGINT DEFAULT 0 NOT NULL,
FTASKLISTID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FORGRANGE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FCREATERID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME,
FEXECUTORID BIGINT DEFAULT 0 NOT NULL,
FTASKSTATUS CHAR(1) DEFAULT '0' NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\EB_table.sql **/
