/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKRULE' AND KSQL_COL_NAME IN ('FBOID'))
 ALTER TABLE T_HPDI_TASKRULE ADD (FBOID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKRULE' AND KSQL_COL_NAME IN ('FISCURRENTVERSION'))
 ALTER TABLE T_HPDI_TASKRULE ADD (FISCURRENTVERSION CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKRULE' AND KSQL_COL_NAME IN ('FDATASTATUS'))
 ALTER TABLE T_HPDI_TASKRULE ADD (FDATASTATUS VARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKRULE' AND KSQL_COL_NAME IN ('FSOURCEVID'))
 ALTER TABLE T_HPDI_TASKRULE ADD (FSOURCEVID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKRULE' AND KSQL_COL_NAME IN ('FHISVERSION'))
 ALTER TABLE T_HPDI_TASKRULE ADD (FHISVERSION VARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKRULE' AND KSQL_COL_NAME IN ('FCHANGEDESCRIPTION'))
 ALTER TABLE T_HPDI_TASKRULE ADD (FCHANGEDESCRIPTION VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKRULEENT' AND KSQL_COL_NAME IN ('FENTRYBOID'))
 ALTER TABLE T_HPDI_TASKRULEENT ADD (FENTRYBOID BIGINT DEFAULT 0 NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_table.sql **/
