/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ITP_constraint.sql **/
 EXEC P_ALTERPK 'PK_ITP_PROVISTON_ITEM', 'T_ITP_PROVISTON_ITEM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PROVISTON_ITEM_NUM') CREATE INDEX IDX_PROVISTON_ITEM_NUM ON T_ITP_PROVISTON_ITEM ( FNUMBER );


 EXEC P_ALTERPK 'PK_ITP_PROVISTON_ITEM_L', 'T_ITP_PROVISTON_ITEM_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ITP_PROVISTON_ITEM_L_0') CREATE INDEX IDX_ITP_PROVISTON_ITEM_L_0 ON T_ITP_PROVISTON_ITEM_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_ITP_PROVISTON_PLAN', 'T_ITP_PROVISTON_PLAN', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PROVISTON_PLAN_NUM') CREATE INDEX IDX_PROVISTON_PLAN_NUM ON T_ITP_PROVISTON_PLAN ( FNUMBER );


 EXEC P_ALTERPK 'PK_ITP_PROVISTON_PLAN_L', 'T_ITP_PROVISTON_PLAN_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ITP_PROVISTON_PLAN_L_0') CREATE INDEX IDX_ITP_PROVISTON_PLAN_L_0 ON T_ITP_PROVISTON_PLAN_L ( FID ,FLOCALEID );


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