new database schema + thumbnail fix