/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\LOG_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_LOG_ADUIT_RULE', 'T_LOG_ADUIT_RULE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_ADUIT_RULE_FNAME') CREATE INDEX IDX_LOG_ADUIT_RULE_FNAME ON T_LOG_ADUIT_RULE ( FNAME );


 EXEC P_ALTERPK 'PK_T_LOG_ADUIT_RULE_L', 'T_LOG_ADUIT_RULE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LOG_ADUIT_RULE_L_FID') CREATE INDEX IDX_LOG_ADUIT_RULE_L_FID ON T_LOG_ADUIT_RULE_L ( FID ,FLOCALEID );


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_LOG_APP_MODIFYBILLID') CREATE INDEX IX_LOG_APP_MODIFYBILLID ON T_LOG_APP ( FMODIFYBILLID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_LOG_ARCHIVE_MODIFYBILLID') CREATE INDEX IX_LOG_ARCHIVE_MODIFYBILLID ON T_LOG_ARCHIVE ( FMODIFYBILLID );


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