{"action":"created","issue":{"url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3486","labels_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3486/labels{/name}","comments_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3486/comments","events_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3486/events","html_url":"https://github.com/gratipay/gratipay.com/issues/3486","id":81501876,"number":3486,"title":"run Gratipay 156","user":{"login":"whit537","id":134455,"avatar_url":"https://avatars.githubusercontent.com/u/134455?v=3","gravatar_id":"","url":"https://api.github.com/users/whit537","html_url":"https://github.com/whit537","followers_url":"https://api.github.com/users/whit537/followers","following_url":"https://api.github.com/users/whit537/following{/other_user}","gists_url":"https://api.github.com/users/whit537/gists{/gist_id}","starred_url":"https://api.github.com/users/whit537/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whit537/subscriptions","organizations_url":"https://api.github.com/users/whit537/orgs","repos_url":"https://api.github.com/users/whit537/repos","events_url":"https://api.github.com/users/whit537/events{/privacy}","received_events_url":"https://api.github.com/users/whit537/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gratipay/gratipay.com/labels/%E2%98%85%E2%98%85%E2%98%85","name":"★★★","color":"339966"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-05-27T15:41:13Z","updated_at":"2015-05-29T00:07:44Z","closed_at":null,"body":"[155](https://github.com/gratipay/gratipay.com/issues/3465)\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/18143850-run-gratipay-156?utm_campaign=plugin&utm_content=tracker%2F85909&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F85909&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/gratipay/gratipay.com/issues/comments/106635429","html_url":"https://github.com/gratipay/gratipay.com/issues/3486#issuecomment-106635429","issue_url":"https://api.github.com/repos/gratipay/gratipay.com/issues/3486","id":106635429,"user":{"login":"whit537","id":134455,"avatar_url":"https://avatars.githubusercontent.com/u/134455?v=3","gravatar_id":"","url":"https://api.github.com/users/whit537","html_url":"https://github.com/whit537","followers_url":"https://api.github.com/users/whit537/followers","following_url":"https://api.github.com/users/whit537/following{/other_user}","gists_url":"https://api.github.com/users/whit537/gists{/gist_id}","starred_url":"https://api.github.com/users/whit537/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whit537/subscriptions","organizations_url":"https://api.github.com/users/whit537/orgs","repos_url":"https://api.github.com/users/whit537/repos","events_url":"https://api.github.com/users/whit537/events{/privacy}","received_events_url":"https://api.github.com/users/whit537/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T00:07:44Z","updated_at":"2015-05-29T00:07:44Z","body":"Cool. Is that in production?\r\n\r\n(P.S. A couple minor style suggestions ... \r\n\r\n```python\r\nfrom gratipay.wireup import db, env\r\nfrom gratipay.models.team import Team, AlreadyMigrated\r\n\r\ndb = db(env())\r\n\r\nnew_teams = db.all(\"\"\"\r\n    SELECT teams.*::teams\r\n      FROM teams\r\n     WHERE is_approved IS TRUE\r\n\"\"\")\r\n\r\nfor team in new_teams:\r\n    try:\r\n        team.migrate_tips()\r\n        print(\"Migrated tips for '%s'\" % slug)\r\n    except AlreadyMigrated:\r\n        print(\"'%s' already migrated.\" % slug)\r\n\r\nprint(\"Done.\")\r\n```"}}