updated stored procedures and functions to accomodate for schema change.
added stored proc/function changes to migration.