updated tables and activerecord relationships for day and class