sanger/sequencescape — pull request #554 by mattdenner (2012-06-27 08:55:34+00:00)
Title: [fixes #31829175] Do not access study reports tables until they exist

The problem with paperclip, when using the database storage engine, is
that it needs the underlying tables to exist. If they don't then
everything falls over. This happens when using the observers that
import various other classes, one of which is StudyReport and that uses
paperclip, and you have yet to do 'rake db:create db:schema:load'.

This pushes the column detection into a named_scope to alleviate this
problem for the moment.