remove mod_paiement for inexisting ledger
This commit is contained in:
parent
c2fc7b55fc
commit
faf104c601
1 changed files with 2 additions and 0 deletions
|
|
@ -792,6 +792,8 @@ update mod_payment set jrn_def_id=3 where mp_type='ACH';
|
|||
|
||||
alter table mod_payment drop mp_type;
|
||||
|
||||
delete from mod_payment where jrn_def_id not in (select jrn_def_id from jrn_def);
|
||||
|
||||
alter table mod_payment add constraint mod_payment_jrn_def_id_fk foreign key (jrn_def_id) references jrn_def(jrn_def_id) on delete cascade on update cascade;
|
||||
|
||||
comment on column mod_payment.jrn_def_id is 'Ledger using this payment method';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue