BUGFIX: record memType and staff correctly when adding/removing
member discounts. Longstanding issue so don't necessarily worry
about updating your views ASAP. Some summary table stuff can
potentially be cleaner in the future without these issues.
BUGFIX: repeated calls should switch default/selected database
Don't use sessions if loaded via CLI
New "normalize" function in BasicController that compares
the class' column structure to the actual table structure
and adds anything that's missing. The controller for dtransactions
leans heavily on this functionality to ensure all the related
structures have consistent columns.