/**Begin D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\kd_6.0.12_bdm_scanunvoice_setting.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_SCANINVOICE_SETTING' AND KSQL_COL_NAME ='FPHONEDISPLAYFLAG') 
 ALTER TABLE T_BDM_SCANINVOICE_SETTING ADD (FPHONEDISPLAYFLAG CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_SCANINVOICE_SETTING' AND KSQL_COL_NAME ='FPHONEREQUIREDFLAG') 
 ALTER TABLE T_BDM_SCANINVOICE_SETTING ADD (FPHONEREQUIREDFLAG CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_SCANINVOICE_SETTING' AND KSQL_COL_NAME ='FEMAILDISPLAYFLAG') 
 ALTER TABLE T_BDM_SCANINVOICE_SETTING ADD (FEMAILDISPLAYFLAG CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_SCANINVOICE_SETTING' AND KSQL_COL_NAME ='FEMAILREQUIREDFLAG') 
 ALTER TABLE T_BDM_SCANINVOICE_SETTING ADD (FEMAILREQUIREDFLAG CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_SCANINVOICE_SETTING' AND KSQL_COL_NAME ='FREMARKDISPLAYFLAG') 
 ALTER TABLE T_BDM_SCANINVOICE_SETTING ADD (FREMARKDISPLAYFLAG CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_SCANINVOICE_SETTING' AND KSQL_COL_NAME ='FREMARKTIPS') 
 ALTER TABLE T_BDM_SCANINVOICE_SETTING ADD (FREMARKTIPS NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_SCANINVOICE_SETTING' AND KSQL_COL_NAME ='FEXTENDFLAG') 
 ALTER TABLE T_BDM_SCANINVOICE_SETTING ADD (FEXTENDFLAG CHAR(1) DEFAULT '0' NOT NULL );

/**End D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\kd_6.0.12_bdm_scanunvoice_setting.sql **/
