/**Begin D:\PDM_UPGRADE\PDM1\FCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SCHEDULEFILTERCONF')
 CREATE TABLE T_FCS_SCHEDULEFILTERCONF (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLERID BIGINT DEFAULT 0 NOT NULL,
FENABLEDATE DATETIME,
FDISABLEDATE DATETIME,
FBIZAPPID BIGINT DEFAULT 0 NOT NULL,
FENTITYNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL,
FOPKEY NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FCS_SCHEDULEFILTERCONF_L')
 CREATE TABLE T_FCS_SCHEDULEFILTERCONF_L (
FPKID NVARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMMENT NVARCHAR(255) DEFAULT ' ' NOT NULL
);

/**Begin D:\PDM_UPGRADE\PDM1\FCS_table.sql **/
 EXEC p_AlterColumn 'T_FCS_SCHEDULEFILTERCONF', 'FBIZAPPID', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';


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

/**Begin D:\PDM_UPGRADE\PDM1\FCS_table.sql **/
 EXEC p_AlterColumn 'T_FCS_SCHETASKENTRY', 'FTASKNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';


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

/**Begin D:\PDM\PDM_UPGRADE\pdm1\FCS_table.sql **/
 EXEC p_AlterColumn 'T_FCS_SCHEDULE_LOG_ENTRY', 'FTASKNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_FCS_SCHEDULEDETAIL_LOG', 'FTASKNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FCS_SCHETASKENTRY' AND KSQL_COL_NAME IN ('FISSINGLE'))
 ALTER TABLE T_FCS_SCHETASKENTRY ADD (FISSINGLE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FCS_SCHETASKENTRY' AND KSQL_COL_NAME IN ('FEACHBATCHSIZE'))
 ALTER TABLE T_FCS_SCHETASKENTRY ADD (FEACHBATCHSIZE BIGINT DEFAULT 0 NOT NULL );


/**End D:\PDM\PDM_UPGRADE\pdm1\FCS_table.sql **/