Page MenuHomePhabricator

deleting trips hits constraint
Closed, ResolvedPublic

Assigned To
Authored By
mhamiltonj
Nov 30 2016, 8:55 PM
Referenced Files
None
Subscribers
None

Description

on trip delete, integrity constraint on trip payment method is hit.

if the trip has no signups, it should be safe to kill the rows in trippaymentmethod too.

Created: Mon, 11 Jan 2016 10:48:44 GMT
Last Updated: Mon, 11 Jan 2016 21:16:07 GMT

Details

External Reference
HWUMC-110

Event Timeline

mhamiltonj created this object with visibility "Public (No Login Required)".
mhamiltonj created this object with edit policy "HWUMC (Project)".

stwalkerster wrote at Mon, 11 Jan 2016 21:16:07 GMT:

Fixed on beta with a purely database solution:

Fixed the constraints to automatically delete unused payment methods.
If a payment method is used (by a payment, attached to a signup), then the method will be undeletable, as will the trip. Trip deletion is protected from the UI anyway unless it's new/published, which can't have signups yet (hence this *should* fix the problem).

DB changes are a pain to deploy without associated code (it's an all-or-nothing sync), so I'll leave deploying this to production for now, it'll go with the rest of the code.