fix the database relations among event gallery and author