/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_EXPERTSCHEME', 'T_SRC_EXPERTSCHEME', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EXPERTSCHEME_FENABLE') CREATE INDEX IDX_SRC_EXPERTSCHEME_FENABLE ON T_SRC_EXPERTSCHEME ( FENABLE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EXPERTSCHEME_FSTATUS') CREATE INDEX IDX_SRC_EXPERTSCHEME_FSTATUS ON T_SRC_EXPERTSCHEME ( FSTATUS );

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


 EXEC P_ALTERPK 'PK_SRC_EXPERTSCHEME_L', 'T_SRC_EXPERTSCHEME_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EXPERTSCHEMEENTRY', 'T_SRC_EXPERTSCHEMEENTRY', 'FENTRYID', '1';

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



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