{"action":"created","issue":{"url":"https://api.github.com/repos/db-migrate/pg/issues/8","repository_url":"https://api.github.com/repos/db-migrate/pg","labels_url":"https://api.github.com/repos/db-migrate/pg/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/db-migrate/pg/issues/8/comments","events_url":"https://api.github.com/repos/db-migrate/pg/issues/8/events","html_url":"https://github.com/db-migrate/pg/issues/8","id":130856737,"number":8,"title":"Native driver option does not work","user":{"login":"Crocmagnon","id":3630554,"avatar_url":"https://avatars.githubusercontent.com/u/3630554?v=3","gravatar_id":"","url":"https://api.github.com/users/Crocmagnon","html_url":"https://github.com/Crocmagnon","followers_url":"https://api.github.com/users/Crocmagnon/followers","following_url":"https://api.github.com/users/Crocmagnon/following{/other_user}","gists_url":"https://api.github.com/users/Crocmagnon/gists{/gist_id}","starred_url":"https://api.github.com/users/Crocmagnon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crocmagnon/subscriptions","organizations_url":"https://api.github.com/users/Crocmagnon/orgs","repos_url":"https://api.github.com/users/Crocmagnon/repos","events_url":"https://api.github.com/users/Crocmagnon/events{/privacy}","received_events_url":"https://api.github.com/users/Crocmagnon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/db-migrate/pg/labels/feature","name":"feature","color":"009800"},{"url":"https://api.github.com/repos/db-migrate/pg/labels/Good%20for%20new%20Contributors","name":"Good for new Contributors","color":"5319e7"},{"url":"https://api.github.com/repos/db-migrate/pg/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2016-02-02T23:43:15Z","updated_at":"2016-02-03T23:29:43Z","closed_at":null,"body":"Hello,\r\nI'm trying to deploy on Heroku but it complains that SSL is not enabled. I tried activate `\"native: true\"` in my database.json file :\r\n```json\r\n{\r\n    \"prod\": {\r\n        \"ENV\": \"DATABASE_URL\",\r\n        \"native\": true\r\n    },\r\n    \"dev\": {\r\n        \"ENV\": \"DATABASE_URL\"\r\n    }\r\n}\r\n```\r\n\r\nI had no luck. By slightly changing the code in `index.js` : \r\n```node\r\nexports.connect = function(config, intern, callback) {\r\n\r\n    internals = intern;\r\n\r\n    log = intern.mod.log;\r\n    type = intern.mod.type;\r\n    console.log(\"config\", config); // Added a console.log\r\n    if (config.native) { pg = pg.native; }\r\n    var db = config.db || new pg.Client(config);\r\n    callback(null, new PgDriver(db, config.schema, intern));\r\n};\r\n```\r\nWe can see that config doesn't contain a `native` property, so it never enters the condition.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30472285-native-driver-option-does-not-work?utm_campaign=plugin&utm_content=tracker%2F14258523&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F14258523&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/db-migrate/pg/issues/comments/179529313","html_url":"https://github.com/db-migrate/pg/issues/8#issuecomment-179529313","issue_url":"https://api.github.com/repos/db-migrate/pg/issues/8","id":179529313,"user":{"login":"wzrdtales","id":1786821,"avatar_url":"https://avatars.githubusercontent.com/u/1786821?v=3","gravatar_id":"","url":"https://api.github.com/users/wzrdtales","html_url":"https://github.com/wzrdtales","followers_url":"https://api.github.com/users/wzrdtales/followers","following_url":"https://api.github.com/users/wzrdtales/following{/other_user}","gists_url":"https://api.github.com/users/wzrdtales/gists{/gist_id}","starred_url":"https://api.github.com/users/wzrdtales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzrdtales/subscriptions","organizations_url":"https://api.github.com/users/wzrdtales/orgs","repos_url":"https://api.github.com/users/wzrdtales/repos","events_url":"https://api.github.com/users/wzrdtales/events{/privacy}","received_events_url":"https://api.github.com/users/wzrdtales/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T23:29:43Z","updated_at":"2016-02-03T23:29:43Z","body":"Item opened here: https://github.com/db-migrate/node-db-migrate/issues/349"}}