{"action":"created","issue":{"url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/303","repository_url":"https://api.github.com/repos/AgileVentures/LocalSupport","labels_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/303/comments","events_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/303/events","html_url":"https://github.com/AgileVentures/LocalSupport/pull/303","id":151849312,"number":303,"title":"Fix rake setup task","user":{"login":"Maroo-b","id":7128972,"avatar_url":"https://avatars.githubusercontent.com/u/7128972?v=3","gravatar_id":"","url":"https://api.github.com/users/Maroo-b","html_url":"https://github.com/Maroo-b","followers_url":"https://api.github.com/users/Maroo-b/followers","following_url":"https://api.github.com/users/Maroo-b/following{/other_user}","gists_url":"https://api.github.com/users/Maroo-b/gists{/gist_id}","starred_url":"https://api.github.com/users/Maroo-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maroo-b/subscriptions","organizations_url":"https://api.github.com/users/Maroo-b/orgs","repos_url":"https://api.github.com/users/Maroo-b/repos","events_url":"https://api.github.com/users/Maroo-b/events{/privacy}","received_events_url":"https://api.github.com/users/Maroo-b/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-29T11:53:07Z","updated_at":"2016-05-03T10:37:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AgileVentures/LocalSupport/pulls/303","html_url":"https://github.com/AgileVentures/LocalSupport/pull/303","diff_url":"https://github.com/AgileVentures/LocalSupport/pull/303.diff","patch_url":"https://github.com/AgileVentures/LocalSupport/pull/303.patch"},"body":"- Override the setup task \r\n- fix the email import task invocation\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/comments/216491731","html_url":"https://github.com/AgileVentures/LocalSupport/pull/303#issuecomment-216491731","issue_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/303","id":216491731,"user":{"login":"tansaku","id":30216,"avatar_url":"https://avatars.githubusercontent.com/u/30216?v=3","gravatar_id":"","url":"https://api.github.com/users/tansaku","html_url":"https://github.com/tansaku","followers_url":"https://api.github.com/users/tansaku/followers","following_url":"https://api.github.com/users/tansaku/following{/other_user}","gists_url":"https://api.github.com/users/tansaku/gists{/gist_id}","starred_url":"https://api.github.com/users/tansaku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tansaku/subscriptions","organizations_url":"https://api.github.com/users/tansaku/orgs","repos_url":"https://api.github.com/users/tansaku/repos","events_url":"https://api.github.com/users/tansaku/events{/privacy}","received_events_url":"https://api.github.com/users/tansaku/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T10:37:00Z","updated_at":"2016-05-03T10:37:00Z","body":"what about using the `enhance` method: \r\n\r\nhttp://edgar.tumblr.com/post/52300664342/how-to-extend-an-existing-rake-task\r\n\r\nor using `before` hooks?\r\n\r\nhttp://stackoverflow.com/questions/15707940/rake-before-task-hook\r\n\r\nhere's a handy reference for all the different db tasks:\r\n\r\nhttp://jacopretorius.net/2014/02/all-rails-db-rake-tasks-and-what-they-do.html\r\n\r\nI guess the question is should we be overriding `rake db:setup` and maybe the answer is no ...\r\n\r\nmaybe all of the stuff in our custom \"setup\" should be done from rake db:seed, but I see the nub of the problem now (which you've described already, but it's properly going in my brain now), which is that our custom \"setup\" calls `rake db:migrate`, whereas the default setup called `rake db:schema:load`, so perhaps having the feature elements added to the db in migrate is wrong-headed, but as I say, we can't run `db:seed` on production.\r\n\r\nMakes me think that over-writing the default db:setup is the way to go, although we run the risk of confusing developers who think it will do the default thing - but the upside is that we maintain a swifter process of deploying feature flags, and also our heroku PR deploys might start working (although we could also get them to work by having `db:custom_setup` and calling that as a post_install operation)\r\n\r\n"}}