db table creation***fix photo and status table query***