Project60 / org.project60.sepa

SEPA direct debit integration with civicrm
19 stars 46 forks source link

Differences between foreigh keys definition #301

Open scardinius opened 9 years ago

scardinius commented 9 years ago

I found out there are differences between foreigh keys definition.

Comparison definition foreign keys between sepa.sql, xml schema files and current database:

column sepa.sql xml schema db
_contribution_txgroup.contribution_id NO YES NO
_sdd_creditor.payment_processor_id NO YES NO
_sdd_creditor.sepa_file_format_id NO NO NO

In addition, sepa_file_format_id has no foreign key at all.

I think all above columns should have a foreign keys (ON DELETE | ON UPDATE SET NULL). And you? If you agree, I can prepare PR.

bjendres commented 9 years ago

@tttp Could you have a look at this?

tttp commented 9 years ago

@systopia so indeed, seems to be the xml need to be re-generated, thanks @scardinius

I think I prefer on delete for contribution_txgroup, set null for file and payment processor, but don't have a strong opinion. What do you think?

bjendres commented 9 years ago

no strong opinion here either - as long as it doesn't break the current routines...