mirror of https://github.com/sipwise/db-schema.git
As far as I remember it is rudiment of old invoicing schema, when balance supposed to be changed on invoice issue. So now we allow to remove invoices from web interface and clear accountent balance => fixed.changes/61/61/1
parent
a037063a0d
commit
69cf0b88df
@ -0,0 +1,3 @@
|
|||||||
|
USE billing;
|
||||||
|
alter table contract_balances drop foreign key `cb_invoiceid_ref`;
|
||||||
|
alter table contract_balances add CONSTRAINT cb_invoiceid_ref FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) on delete CASCADE ON UPDATE CASCADE;
|
@ -0,0 +1,3 @@
|
|||||||
|
USE billing;
|
||||||
|
alter table contract_balances drop foreign key `cb_invoiceid_ref`;
|
||||||
|
alter table contract_balances add CONSTRAINT cb_invoiceid_ref FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) on delete set null ON UPDATE CASCADE;
|
Loading…
Reference in new issue