/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
EXEC p_DropIdx 'IX_EB_BgControlOperLog', 'T_EB_BGCONTROLOPERLOG';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_BGCONTROLOPERLOG') 
CREATE INDEX IX_EB_BGCONTROLOPERLOG ON T_EB_BGCONTROLOPERLOG (FBILLID,FENTITYNUMBER, FCREATEDATE);


-- 描述：维度成员自定义属性索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_MEMPROPERVALUE_VAL')
CREATE INDEX IDX_EB_MEMPROPERVALUE_VAL ON T_EB_MEMBERPROPERTYVALUE (FPROPERTYVALUEID);

-- 任务下达
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_TASKPROCESS_VIEW')
CREATE INDEX IX_EB_TASKPROCESS_VIEW ON T_EB_TASKPROCESS (FORGVIEWID);

--编制方案
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_RPTSCHEME_VIEW')
CREATE INDEX IDX_EB_RPTSCHEME_VIEW ON T_EB_RPTSCHEME (FORGVIEWID);


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