/**BEGIN E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\EB_TABLE.SQL **/

-- 主键索引
EXEC P_ALTERPK 'PK_T_EB_EXECSCHEMEENTITY', 'T_EB_EXECSCHEMEENTITY', 'FID', '1';
EXEC P_ALTERPK 'PK_T_EB_EXECCOLENTITY', 'T_EB_EXECCOLENTITY', 'FID', '1';

-- 索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_T_EB_EXECSCHEMEENTITY')
CREATE INDEX INDEX_T_EB_EXECSCHEMEENTITY ON T_EB_EXECSCHEMEENTITY ( FBIZMODELID );

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_T_EB_EXECCOLENTITY')
CREATE INDEX IX_T_EB_EXECCOLENTITY ON T_EB_EXECCOLENTITY ( FORDER );

/**END E:\NEXTERP_PDM\PDM_UPGRADE\PDMS\BRANCH_LASTEST\PDM\EB_TABLE.SQL **/