preparation for function to create rating field.

When an image is uploaded it will create a rating field in the ratings
table of the database. Making some changes to get ready for that.