/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_PURLISTTPL', 'T_SRC_PURLISTTPL', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PURLISTTPL_EID') CREATE INDEX IDX_SRC_PURLISTTPL_EID ON T_SRC_PURLISTTPL ( FENTRYID );


 EXEC P_ALTERPK 'PK_SRC_SUPSCHEME', 'T_SRC_SUPSCHEME', 'FID', '1';

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

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

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


 EXEC P_ALTERPK 'PK_SRC_SUPSCHEME_L', 'T_SRC_SUPSCHEME_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SUPSCHEMEBASE', 'T_SRC_SUPSCHEMEBASE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SUPSCHEMEENTRY', 'T_SRC_SUPSCHEMEENTRY', 'FENTRYID', '1';

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



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