fix the table relation between gallery and event