
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_WORKTYPEMSG')
CREATE TABLE T_FMM_WORKTYPEMSG
(
	  FID             BIGINT       DEFAULT    0      NOT NULL,     
	  FENTRYID        BIGINT       DEFAULT    0      NOT NULL,   
	  FSEQ            INT          DEFAULT    0      NOT NULL,     
	  FWORKTYPEID     BIGINT       DEFAULT    0      NOT NULL,  	
	  FENTRYENABLE    CHAR(1)      DEFAULT    '0'    NOT NULL, 	
	  FMAINWORKTP     CHAR(1)      DEFAULT    '0'    NOT NULL, 	
	  FBGCOLOR        NVARCHAR(50) DEFAULT    ' '    NOT NULL, 	
	  FBGCOLOR_SAVE   NVARCHAR(50) DEFAULT    ' '    NOT NULL, 	
	  FFONTCOLOR      NVARCHAR(50) DEFAULT    ' '    NOT NULL, 	
	  FFONTCOLOR_SAVE NVARCHAR(50) DEFAULT    ' '    NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_WKGPPERSONMSG')
CREATE TABLE T_FMM_WKGPPERSONMSG
(
	  FID          BIGINT      DEFAULT 0      NOT NULL,  
	  FENTRYID     BIGINT      DEFAULT 0      NOT NULL,   
	  FSEQ         INT         DEFAULT 0      NOT NULL, 
	  FPERSONMSGID BIGINT      DEFAULT 0      NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_WKGRESPONSIBLE')
CREATE TABLE T_FMM_WKGRESPONSIBLE
(
	  FPKID        BIGINT      DEFAULT 0      NOT NULL,          
	  FENTRYID     BIGINT      DEFAULT 0      NOT NULL,       
	  FBASEDATAID  BIGINT      DEFAULT 0      NOT NULL
);




