Fixes bug 915162 - updates stored procedures related to release type

Before this is merged, we should run a migration on our releases_raw, and a few other tables to enforce lower case.