Added support for Piecewise and Histogram.  Rearranged equation_type ordering.
Added migration for previous commit