/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_constraint.sql **/
/*表T_IM_AUDITTIMERECORD的主键列fid不允许修改，如果该表还未发布，请联系管理员变更基准模型重新生成表结构。*/
 EXEC P_ALTERPK 'PK_T_IM_INVADVICE', 'T_IM_INVADVICE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_IM_INVADVICE' AND KSQL_INDNAME = 'IDX_INVADVICE_FBILLNO') CREATE INDEX IDX_INVADVICE_FBILLNO ON T_IM_INVADVICE ( FBILLNO );


 EXEC P_ALTERPK 'PK_T_IM_INVADVICEENTRY', 'T_IM_INVADVICEENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_IM_INVADVICEENTRY' AND KSQL_INDNAME = 'IDX_INVADVENTRY_FID') CREATE INDEX IDX_INVADVENTRY_FID ON T_IM_INVADVICEENTRY ( FID );



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