/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_constraint.sql **/
/* 发票云配置表索引和主键 */

 EXEC P_ALTERPK 'PK_T_ER_KDINVOICECFG', 'T_ER_KDINVOICECFG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ER_INVOICECFG_FTAX') CREATE INDEX IDX_BD_ER_INVOICECFG_FTAX ON T_ER_KDINVOICECFG ( FENABLE ,FTAXREGNUM );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ER_INVOICECFG_FORG') CREATE INDEX IDX_BD_ER_INVOICECFG_FORG ON T_ER_KDINVOICECFG ( FORGID );

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