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



 EXEC P_ALTERPK 'PK_TCCIT_APITUDEINFO_S', 'T_TCCIT_APITUDEINFO_S', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_APITUDEINFO_S_FK') CREATE  CLUSTERED INDEX IDX_TCCIT_APITUDEINFO_S_FK ON T_TCCIT_APITUDEINFO_S ( FID );
 
 
 EXEC P_ALTERPK 'PK_TCCIT_ITEM_FETCH', 'T_TCCIT_ITEM_FETCH', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_ITEM_FETCH_FK') CREATE  CLUSTERED INDEX IDX_TCCIT_ITEM_FETCH_FK ON T_TCCIT_ITEM_FETCH ( FID );
 
 
 
 EXEC P_ALTERPK 'PK_TCCIT_PREFERENTIAL_ITEM', 'T_TCCIT_PREFERENTIAL_ITEM', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_PREFERENTIAL_ITEM') CREATE  CLUSTERED INDEX IDX_TCCIT_PREFERENTIAL_ITEM ON T_TCCIT_PREFERENTIAL_ITEM ( FORGID );
 
 
 
 EXEC P_ALTERPK 'PK_TCCIT_PREFERENTIAL_ITEM_L', 'T_TCCIT_PREFERENTIAL_ITEM_L', 'FPKID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_PREFERENTIAL_ITEM_L') CREATE  CLUSTERED INDEX IDX_TCCIT_PREFERENTIAL_ITEM_L ON T_TCCIT_PREFERENTIAL_ITEM_L ( FID, FLOCALEID);
 
 
 EXEC P_ALTERPK 'PK_TCCIT_SEASONAL_POLICY', 'T_TCCIT_SEASONAL_POLICY', 'FID', '0';

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

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