/**Begin D:\PDM_UPGRADE\PDM1\BEI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKPAYINGBILL_E' AND KSQL_COL_NAME IN ('FISLINKPAY'))
 ALTER TABLE T_BEI_BANKPAYINGBILL_E ADD (FISLINKPAY CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKPAYINGBILL_E' AND KSQL_COL_NAME IN ('FPARENTACCTBANKID'))
 ALTER TABLE T_BEI_BANKPAYINGBILL_E ADD (FPARENTACCTBANKID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKPAYINGBILL_E' AND KSQL_COL_NAME IN ('FCHILDACCTBANKID'))
 ALTER TABLE T_BEI_BANKPAYINGBILL_E ADD (FCHILDACCTBANKID BIGINT DEFAULT 0 NOT NULL );


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKAGENTPAYBILL' AND KSQL_COL_NAME IN ('FAPPLYNAME'))
 ALTER TABLE T_BEI_BANKAGENTPAYBILL ADD (FAPPLYNAME NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKAGENTPAYBILL' AND KSQL_COL_NAME IN ('FAPPLYPHONE'))
 ALTER TABLE T_BEI_BANKAGENTPAYBILL ADD (FAPPLYPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKPAYINGBILL' AND KSQL_COL_NAME IN ('FAPPLYNAME'))
 ALTER TABLE T_BEI_BANKPAYINGBILL ADD (FAPPLYNAME NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_BANKPAYINGBILL' AND KSQL_COL_NAME IN ('FAPPLYPHONE'))
 ALTER TABLE T_BEI_BANKPAYINGBILL ADD (FAPPLYPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL );

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