/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_SCH_SCHEDULESTATS', 'T_SCH_SCHEDULESTATS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SCH_SCHEDULESTATS' AND KSQL_INDNAME = 'IDX_SCH_SCHEDULESTATS_TIME') CREATE INDEX IDX_SCH_SCHEDULESTATS_TIME ON T_SCH_SCHEDULESTATS ( FTIME ,FSCHEDULEID );


 EXEC P_ALTERPK 'PK_T_SCH_TASKNUMSTATS', 'T_SCH_TASKNUMSTATS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SCH_TASKNUMSTATS' AND KSQL_INDNAME = 'IDX_SCH_TASKNUMSTATS_TIME') CREATE INDEX IDX_SCH_TASKNUMSTATS_TIME ON T_SCH_TASKNUMSTATS ( FTIME );



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