TT#47970 truncate billing_fees_raw in 15424.up

to prevent a pontential foreign key error in susequent

alter table billing_fees_raw
  ..,
  add unique key bfr_srcdestdir_idx (billing_profile_id, type,
match_mode, direction, source, destination),
  ..;

the key is turned into not-unique afterwards with 15449.up

Change-Id: I884adc442e48202fd0061fece400f5fcb6f892b5
changes/05/25105/3
Rene Krenn 7 years ago
parent 0add785a00
commit d5c306d372

@ -13,6 +13,8 @@ alter table billing_fees
add unique key bf_srcdestdir_idx (billing_profile_id, type, match_mode, direction, source, destination),
add key bf_destsrcdir_idx (billing_profile_id, type, match_mode, destination, source, direction);
truncate billing_fees_raw;
alter table billing_fees_raw
drop index profsrcdesdirtype_idx,
add column match_mode enum('regex_longest_pattern', 'regex_longest_match', 'prefix', 'exact_destination') not null default 'regex_longest_pattern',
@ -106,4 +108,3 @@ end;
;;
delimiter ;

@ -0,0 +1,4 @@
use billing;
alter table billing_fees_raw drop index bfr_srcdestdir_idx;
alter table billing_fees_raw add key bfr_srcdestdir_idx (billing_profile_id, type, match_mode, direction, source, destination);
Loading…
Cancel
Save