/**Begin C:\PDM_UPGRADE\PDM1\PBD_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_REGSUPAPTITUDE' AND KSQL_COL_NAME IN ('FCOMPANYTYPEID')) 
 ALTER TABLE T_PUR_REGSUPAPTITUDE ADD (FCOMPANYTYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_REGSUPAPTITUDE' AND KSQL_COL_NAME IN ('FAPTITUDETYPEID')) 
 ALTER TABLE T_PUR_REGSUPAPTITUDE ADD (FAPTITUDETYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_REGSUPAPTITUDE' AND KSQL_COL_NAME IN ('FREQUIRED')) 
 ALTER TABLE T_PUR_REGSUPAPTITUDE ADD (FREQUIRED CHAR(1) DEFAULT '0' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_REGSUPAPTITUDE' AND KSQL_COL_NAME IN ('FAPTITUDETYPECFGID')) 
 ALTER TABLE T_PUR_REGSUPAPTITUDE ADD (FAPTITUDETYPECFGID BIGINT DEFAULT 0 NOT NULL );

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