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

EXEC P_ALTERPK 'PK_T_EB_EXECSCHEMEENTITY_L', 'T_EB_EXECSCHEMEENTITY_L', 'FPKID', '1';
EXEC P_ALTERPK 'PK_T_EB_DIFFANALYZESCHEME_L', 'T_EB_DIFFANALYZESCHEME_L', 'FPKID', '1';

-- 任务下达
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_EXECSCHEMEENTITY_L')
CREATE INDEX IDX_EB_EXECSCHEMEENTITY_L ON T_EB_EXECSCHEMEENTITY_L (FID);

--编制方案
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_DIFFANALYZESCHEME_L')
CREATE INDEX IDX_EB_DIFFANALYZESCHEME_L ON T_EB_DIFFANALYZESCHEME_L (FID);

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