{"action":"created","issue":{"url":"https://api.github.com/repos/kunklejr/node-db-migrate/issues/219","labels_url":"https://api.github.com/repos/kunklejr/node-db-migrate/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/kunklejr/node-db-migrate/issues/219/comments","events_url":"https://api.github.com/repos/kunklejr/node-db-migrate/issues/219/events","html_url":"https://github.com/kunklejr/node-db-migrate/issues/219","id":57371198,"number":219,"title":"Default environment should not be dev","user":{"login":"toymachiner62","id":485782,"avatar_url":"https://avatars.githubusercontent.com/u/485782?v=3","gravatar_id":"","url":"https://api.github.com/users/toymachiner62","html_url":"https://github.com/toymachiner62","followers_url":"https://api.github.com/users/toymachiner62/followers","following_url":"https://api.github.com/users/toymachiner62/following{/other_user}","gists_url":"https://api.github.com/users/toymachiner62/gists{/gist_id}","starred_url":"https://api.github.com/users/toymachiner62/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toymachiner62/subscriptions","organizations_url":"https://api.github.com/users/toymachiner62/orgs","repos_url":"https://api.github.com/users/toymachiner62/repos","events_url":"https://api.github.com/users/toymachiner62/events{/privacy}","received_events_url":"https://api.github.com/users/toymachiner62/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-02-11T20:18:20Z","updated_at":"2015-02-13T21:46:13Z","closed_at":null,"body":"I don't think the environment should default to dev because you can accidently populate your dev db if you forget to specify the env paramater.\r\n\r\nAn example use case is we have 3 servers - dev, int, and prod, which have those same NODE_ENV's set (so the NODE_ENV=dev on the dev server etc.).\r\n\r\nAll the developers also have their own local mongo instances installed as well. If I just run `$ db-migrate up` on my local machine, it's running those migrations against the dev server even though I just want them to run locally.\r\n\r\nI'm advocating that the default environment should be \"undefined\" because that is what the NODE_ENV is by default.\r\n\r\nThen in my `database.json` file i would just have a block for the \"undefined\" environment which is actually my local environment.\r\n\r\n```json\r\n{\r\n  \"undefined\": {\r\n    \"driver\": \"mongodb\",\r\n    \"host\": \"localhost\",\r\n    \"database\": \"my_db\"\r\n  },\r\n}\r\n```\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/kunklejr/node-db-migrate/issues/comments/74332581","html_url":"https://github.com/kunklejr/node-db-migrate/issues/219#issuecomment-74332581","issue_url":"https://api.github.com/repos/kunklejr/node-db-migrate/issues/219","id":74332581,"user":{"login":"toymachiner62","id":485782,"avatar_url":"https://avatars.githubusercontent.com/u/485782?v=3","gravatar_id":"","url":"https://api.github.com/users/toymachiner62","html_url":"https://github.com/toymachiner62","followers_url":"https://api.github.com/users/toymachiner62/followers","following_url":"https://api.github.com/users/toymachiner62/following{/other_user}","gists_url":"https://api.github.com/users/toymachiner62/gists{/gist_id}","starred_url":"https://api.github.com/users/toymachiner62/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toymachiner62/subscriptions","organizations_url":"https://api.github.com/users/toymachiner62/orgs","repos_url":"https://api.github.com/users/toymachiner62/repos","events_url":"https://api.github.com/users/toymachiner62/events{/privacy}","received_events_url":"https://api.github.com/users/toymachiner62/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T21:46:13Z","updated_at":"2015-02-13T21:46:13Z","body":"oh i think i see so you can now specify either \"default\" or \"env\" in the database.json file and they'll do the same thing."}}