/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BAS_PROGRAMGROUP_L', 'T_BAS_PROGRAMGROUP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BAS_PROGRAMTEMPLATE', 'T_BAS_PROGRAMTEMPLATE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BAS_PROGRAMTEMPLATE_L', 'T_BAS_PROGRAMTEMPLATE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BAS_PROGRAMGROUP', 'T_BAS_PROGRAMGROUP', 'FID', '1';

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


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