{"action":"created","issue":{"url":"https://api.github.com/repos/Vincit/objection.js/issues/1144","repository_url":"https://api.github.com/repos/Vincit/objection.js","labels_url":"https://api.github.com/repos/Vincit/objection.js/issues/1144/labels{/name}","comments_url":"https://api.github.com/repos/Vincit/objection.js/issues/1144/comments","events_url":"https://api.github.com/repos/Vincit/objection.js/issues/1144/events","html_url":"https://github.com/Vincit/objection.js/issues/1144","id":380778241,"node_id":"MDU6SXNzdWUzODA3NzgyNDE=","number":1144,"title":"Is it safe to use knexSnakeCaseMappers that way?","user":{"login":"zefexdeveloper","id":30276092,"node_id":"MDQ6VXNlcjMwMjc2MDky","avatar_url":"https://avatars3.githubusercontent.com/u/30276092?v=4","gravatar_id":"","url":"https://api.github.com/users/zefexdeveloper","html_url":"https://github.com/zefexdeveloper","followers_url":"https://api.github.com/users/zefexdeveloper/followers","following_url":"https://api.github.com/users/zefexdeveloper/following{/other_user}","gists_url":"https://api.github.com/users/zefexdeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/zefexdeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zefexdeveloper/subscriptions","organizations_url":"https://api.github.com/users/zefexdeveloper/orgs","repos_url":"https://api.github.com/users/zefexdeveloper/repos","events_url":"https://api.github.com/users/zefexdeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/zefexdeveloper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-14T16:24:19Z","updated_at":"2018-11-14T17:48:33Z","closed_at":null,"author_association":"NONE","body":"I saw that it's not safe to use `knexSnakeCaseMappers` and somehow I didn't understand when it's safe or it's not safe.\r\n\r\nThat is how my `knexfile` looks like:\r\n\r\n```\r\nrequire('dotenv').config()\r\n\r\nmodule.exports = {\r\n  client: process.env.DB_CLIENT,\r\n  connection: {\r\n    host: process.env.DB_HOST,\r\n    port: process.env.DB_PORT,\r\n    user: process.env.DB_USER,\r\n    password: process.env.DB_PASSWORD,\r\n    database: process.env.DB_DATABASE\r\n  },\r\n  migrations: {\r\n    directory: './src/migrations',\r\n    stub: './src/migrations/migration.stub'\r\n  },\r\n  debug: true\r\n}\r\n```\r\n\r\nand in my `database.js`:\r\n\r\n```\r\nimport Knex from 'knex'\r\nimport { Model, knexSnakeCaseMappers } from 'objection'\r\n\r\nimport config from '../knexfile'\r\n\r\nexport default () => {\r\n  const knex = Knex({ ...config, ...knexSnakeCaseMappers() })\r\n  Model.knex(knex)\r\n}\r\n```\r\n\r\nIs it safe using that way or i'm going to have problem when using migrations?"},"comment":{"url":"https://api.github.com/repos/Vincit/objection.js/issues/comments/438754390","html_url":"https://github.com/Vincit/objection.js/issues/1144#issuecomment-438754390","issue_url":"https://api.github.com/repos/Vincit/objection.js/issues/1144","id":438754390,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODc1NDM5MA==","user":{"login":"zefexdeveloper","id":30276092,"node_id":"MDQ6VXNlcjMwMjc2MDky","avatar_url":"https://avatars3.githubusercontent.com/u/30276092?v=4","gravatar_id":"","url":"https://api.github.com/users/zefexdeveloper","html_url":"https://github.com/zefexdeveloper","followers_url":"https://api.github.com/users/zefexdeveloper/followers","following_url":"https://api.github.com/users/zefexdeveloper/following{/other_user}","gists_url":"https://api.github.com/users/zefexdeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/zefexdeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zefexdeveloper/subscriptions","organizations_url":"https://api.github.com/users/zefexdeveloper/orgs","repos_url":"https://api.github.com/users/zefexdeveloper/repos","events_url":"https://api.github.com/users/zefexdeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/zefexdeveloper/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T17:48:33Z","updated_at":"2018-11-14T17:48:33Z","author_association":"NONE","body":"@heisian \r\n> I use `knexSnakeCaseMappers` in both migrations and `Objection`\r\n\r\nWhat you mean by that?"}}
{"actor":{"display_login":"zefexdeveloper"}}