updating image migration stored proc to work in older versions of mysql
Merge pull request #329 from vishwasbabu/bug-fix

updating image migration stored proc to work with older versions of mysql