MT#8065 Create #1 contract balance if none exists.

gjungwirth/voicemail_numbers
Andreas Granig 12 years ago
parent 74dc409172
commit e6e1e167d0

@ -0,0 +1,9 @@
use billing;
insert into contract_balances (
contract_id, cash_balance, cash_balance_interval,
free_time_balance, free_time_balance_interval,
start, end)
select * from (
select '1' as c1, '0' as c2, '0' as c3, '0' as c4, '0' as c5, '2014-01-01 00:00:00', '2014-01-31 23:59:59'
) as tmp where not exists (select id from contract_balances where contract_id = 1) limit 1;
Loading…
Cancel
Save