{"action":"closed","issue":{"url":"https://api.github.com/repos/PyGotham/pygotham/issues/118","labels_url":"https://api.github.com/repos/PyGotham/pygotham/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/PyGotham/pygotham/issues/118/comments","events_url":"https://api.github.com/repos/PyGotham/pygotham/issues/118/events","html_url":"https://github.com/PyGotham/pygotham/issues/118","id":69973226,"number":118,"title":"Add event_id to tables that need it","user":{"login":"dirn","id":168109,"avatar_url":"https://avatars.githubusercontent.com/u/168109?v=3","gravatar_id":"","url":"https://api.github.com/users/dirn","html_url":"https://github.com/dirn","followers_url":"https://api.github.com/users/dirn/followers","following_url":"https://api.github.com/users/dirn/following{/other_user}","gists_url":"https://api.github.com/users/dirn/gists{/gist_id}","starred_url":"https://api.github.com/users/dirn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirn/subscriptions","organizations_url":"https://api.github.com/users/dirn/orgs","repos_url":"https://api.github.com/users/dirn/repos","events_url":"https://api.github.com/users/dirn/events{/privacy}","received_events_url":"https://api.github.com/users/dirn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PyGotham/pygotham/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/PyGotham/pygotham/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"dirn","id":168109,"avatar_url":"https://avatars.githubusercontent.com/u/168109?v=3","gravatar_id":"","url":"https://api.github.com/users/dirn","html_url":"https://github.com/dirn","followers_url":"https://api.github.com/users/dirn/followers","following_url":"https://api.github.com/users/dirn/following{/other_user}","gists_url":"https://api.github.com/users/dirn/gists{/gist_id}","starred_url":"https://api.github.com/users/dirn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirn/subscriptions","organizations_url":"https://api.github.com/users/dirn/orgs","repos_url":"https://api.github.com/users/dirn/repos","events_url":"https://api.github.com/users/dirn/events{/privacy}","received_events_url":"https://api.github.com/users/dirn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/PyGotham/pygotham/milestones/4","html_url":"https://github.com/PyGotham/pygotham/milestones/PyGotham%202015","labels_url":"https://api.github.com/repos/PyGotham/pygotham/milestones/4/labels","id":1068856,"number":4,"title":"PyGotham 2015","description":"","creator":{"login":"dirn","id":168109,"avatar_url":"https://avatars.githubusercontent.com/u/168109?v=3","gravatar_id":"","url":"https://api.github.com/users/dirn","html_url":"https://github.com/dirn","followers_url":"https://api.github.com/users/dirn/followers","following_url":"https://api.github.com/users/dirn/following{/other_user}","gists_url":"https://api.github.com/users/dirn/gists{/gist_id}","starred_url":"https://api.github.com/users/dirn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirn/subscriptions","organizations_url":"https://api.github.com/users/dirn/orgs","repos_url":"https://api.github.com/users/dirn/repos","events_url":"https://api.github.com/users/dirn/events{/privacy}","received_events_url":"https://api.github.com/users/dirn/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":5,"state":"open","created_at":"2015-04-15T14:55:32Z","updated_at":"2015-04-30T03:44:31Z","due_on":"2015-04-30T04:00:00Z","closed_at":null},"comments":0,"created_at":"2015-04-21T23:03:31Z","updated_at":"2015-04-30T03:44:31Z","closed_at":"2015-04-30T03:44:31Z","body":"The following models don't have an association to events, but should:\n\n    news.models.Announcement\n    sponsors.models.Level\n    sponsors.models.Sponsor\n\nTo add the relationship, add these lines to the models:\n\n    event_id = db.Column(\n        db.Integer, db.ForeignKey('events.id'), nullable=False)\n    event = db.relationship(\n        'Event', backref=db.backref('talks', lazy='dynamic'))\n\nIn addition to the code changes, a migration needs to be generated. As part of the migration, the new `event_id` fields need to be populated with a value. This may require multiple migrations in order to make a value required."}}