Added db pre/post hook invocations for discounts.