{"action":"opened","issue":{"url":"https://api.github.com/repos/apollostack/GitHunt-API/issues/24","repository_url":"https://api.github.com/repos/apollostack/GitHunt-API","labels_url":"https://api.github.com/repos/apollostack/GitHunt-API/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/GitHunt-API/issues/24/comments","events_url":"https://api.github.com/repos/apollostack/GitHunt-API/issues/24/events","html_url":"https://github.com/apollostack/GitHunt-API/issues/24","id":178923690,"number":24,"title":"Changing SQL backend to mssql from sqlite3","user":{"login":"aaroncalderon","id":14810269,"avatar_url":"https://avatars.githubusercontent.com/u/14810269?v=3","gravatar_id":"","url":"https://api.github.com/users/aaroncalderon","html_url":"https://github.com/aaroncalderon","followers_url":"https://api.github.com/users/aaroncalderon/followers","following_url":"https://api.github.com/users/aaroncalderon/following{/other_user}","gists_url":"https://api.github.com/users/aaroncalderon/gists{/gist_id}","starred_url":"https://api.github.com/users/aaroncalderon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaroncalderon/subscriptions","organizations_url":"https://api.github.com/users/aaroncalderon/orgs","repos_url":"https://api.github.com/users/aaroncalderon/repos","events_url":"https://api.github.com/users/aaroncalderon/events{/privacy}","received_events_url":"https://api.github.com/users/aaroncalderon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-23T16:47:04Z","updated_at":"2016-09-23T16:47:04Z","closed_at":null,"body":"OS: Windows 7 32-bit\r\nnpm@3.10.3\r\nnode@v6.5.0\r\n\r\nI was able to change the backend from sqlite3 to mssql, my `knexfile.js` looks like this:\r\n\r\n```javascript\r\n// Since Knex always runs this file first, all of our seeds and migrations are babelified.\r\nrequire('babel-register');\r\n\r\nmodule.exports = {\r\n  development: {\r\n    client: 'mssql',\r\n    connection: {\r\n      host : 'server',\r\n      user : 'userName',\r\n      password : 'P@$$w0rd',\r\n      database : 'dbname'\r\n    },\r\n    useNullAsDefault: true,\r\n  },\r\n};\r\n```\r\n\r\nand changed [`seed.js#L87-L88`](https://github.com/apollostack/GitHunt-API/blob/master/seeds/seed.js#L87-L88) to: \r\n\r\n```javascript\r\n        created_at: new Date(Date.now() - i * 10000).toISOString(),\r\n        updated_at: new Date(Date.now() - i * 10000).toISOString(),\r\n```\r\n\r\nHowever, on [`seed.js#L91`](https://github.com/apollostack/GitHunt-API/blob/master/seeds/seed.js#L92)  I get an error:\r\n\r\n```\r\n      }).then(([id]) => { // <= here\r\n        repoIds[repository_name] = id;\r\n      });\r\n    }));\r\n```\r\n\r\nI have narrowed it down to `mssql` returning null values, on the other hand, sqlite3 returns the row id (I think).\r\n\r\nAny ideas? I am currently researching if there is a way to change `mssql` behaviour but have not found anything so far."}}
{"actor":{"display_login":"aaroncalderon"}}