Fixing the DB setup, fixing the 'Newest' sorting for text thumbnails.