/**Begin C:\PDM_UPGRADE\PDM1\SRM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_PERSON_E' AND KSQL_COL_NAME IN ('FBDSUPPLIER_EID')) 
 ALTER TABLE T_PUR_BLACK_PERSON_E ADD (FBDSUPPLIER_EID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_PERSON_E' AND KSQL_COL_NAME IN ('FBLACKLISTDEADLINE_E')) 
 ALTER TABLE T_PUR_BLACK_PERSON_E ADD (FBLACKLISTDEADLINE_E DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_COMPANY_E' AND KSQL_COL_NAME IN ('FBDSUPPLIER_EID')) 
 ALTER TABLE T_PUR_BLACK_COMPANY_E ADD (FBDSUPPLIER_EID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_COMPANY_E' AND KSQL_COL_NAME IN ('FBLACKLISTDEADLINE_E')) 
 ALTER TABLE T_PUR_BLACK_COMPANY_E ADD (FBLACKLISTDEADLINE_E DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_COMPANY' AND KSQL_COL_NAME IN ('FBLACKTYPE')) 
 ALTER TABLE T_PUR_BLACK_COMPANY ADD (FBLACKTYPE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_COMPANY' AND KSQL_COL_NAME IN ('FBLACKLISTDEADLINE')) 
 ALTER TABLE T_PUR_BLACK_COMPANY ADD (FBLACKLISTDEADLINE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_COMPANY' AND KSQL_COL_NAME IN ('FBDSUPPLIERID')) 
 ALTER TABLE T_PUR_BLACK_COMPANY ADD (FBDSUPPLIERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_COMPANY' AND KSQL_COL_NAME IN ('FSOURCEBLACKBILLID')) 
 ALTER TABLE T_PUR_BLACK_COMPANY ADD (FSOURCEBLACKBILLID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_BLACK_COMPANY' AND KSQL_COL_NAME IN ('FRELEASEREMARK')) 
 ALTER TABLE T_PUR_BLACK_COMPANY ADD (FRELEASEREMARK NVARCHAR(2000) DEFAULT ' ' NOT NULL );

/**End C:\PDM_UPGRADE\PDM1\SRM_table.sql **/
