code: def add_event(self, name, subfolder, session):
          
          if self._similar_event_exists(subfolder):
              subfolder += "_{0}".format(self.next_id(subfolder))
          new_event = ProjectFileEvent(name=name, subfolder=subfolder)
          session.add(new_event)
          self.events.append(new_event)
          session.commit()
          return new_event
docs: Add an event