/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
 EXEC P_ALTERPK 'PK_TCCIT_BRANCH', 'T_TCCIT_BRANCH', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_BRANCH') CREATE INDEX IDX_TCCIT_BRANCH ON T_TCCIT_BRANCH ( FENDDATE ,FORGID ,FSTARTDATE );


 EXEC P_ALTERPK 'PK_TCCIT_BRANCH_DECLARE', 'T_TCCIT_BRANCH_DECLARE', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_BRANCH_DECLARE_FK') CREATE INDEX IDX_TCCIT_BRANCH_DECLARE_FK ON T_TCCIT_BRANCH_DECLARE ( FID );


 EXEC P_ALTERPK 'PK_TCCIT_APITUDEINFO_F', 'T_TCCIT_APITUDEINFO_F', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_APITUDEINFO_F_FK') CREATE INDEX IDX_TCCIT_APITUDEINFO_F_FK ON T_TCCIT_APITUDEINFO_F ( FID );


 EXEC P_ALTERPK 'PK_TCCIT_BRANCH_PR_SUMMARY', 'T_TCCIT_BRANCH_PR_SUMMARY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_BRANCH_PR_SUMMARY') CREATE INDEX IDX_TCCIT_BRANCH_PR_SUMMARY ON T_TCCIT_BRANCH_PR_SUMMARY ( FORGID ,FTYPE );



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