/**Begin D:\PDM_UPGRADE\PDM1\SYS_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSG_CHANNEL' AND KSQL_COL_NAME IN ('FCORPID')) 
 ALTER TABLE T_MSG_CHANNEL ADD (FCORPID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSG_CHANNEL' AND KSQL_COL_NAME IN ('FAGENTID')) 
 ALTER TABLE T_MSG_CHANNEL ADD (FAGENTID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSG_CHANNEL' AND KSQL_COL_NAME IN ('FAPPKEY')) 
 ALTER TABLE T_MSG_CHANNEL ADD (FAPPKEY VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSG_CHANNEL' AND KSQL_COL_NAME IN ('FAPPSECRET')) 
 ALTER TABLE T_MSG_CHANNEL ADD (FAPPSECRET VARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSG_CHANNEL' AND KSQL_COL_NAME IN ('FISHASDINGTPL')) 
 ALTER TABLE T_MSG_CHANNEL ADD (FISHASDINGTPL CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSG_CHANNEL' AND KSQL_COL_NAME IN ('FTPLPROCESSCODE')) 
 ALTER TABLE T_MSG_CHANNEL ADD (FTPLPROCESSCODE VARCHAR(500) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSG_CHANNEL' AND KSQL_COL_NAME IN ('FTPLNAME')) 
 ALTER TABLE T_MSG_CHANNEL ADD (FTPLNAME VARCHAR(200) DEFAULT ' ' NOT NULL );

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