{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/834","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/834/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/834/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/834/events","html_url":"https://github.com/tgriesser/knex/issues/834","id":78166450,"number":834,"title":"no way to disable transactions in knex 0.8.0+ migrations","user":{"login":"jurko-gospodnetic","id":3112833,"avatar_url":"https://avatars.githubusercontent.com/u/3112833?v=3","gravatar_id":"","url":"https://api.github.com/users/jurko-gospodnetic","html_url":"https://github.com/jurko-gospodnetic","followers_url":"https://api.github.com/users/jurko-gospodnetic/followers","following_url":"https://api.github.com/users/jurko-gospodnetic/following{/other_user}","gists_url":"https://api.github.com/users/jurko-gospodnetic/gists{/gist_id}","starred_url":"https://api.github.com/users/jurko-gospodnetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jurko-gospodnetic/subscriptions","organizations_url":"https://api.github.com/users/jurko-gospodnetic/orgs","repos_url":"https://api.github.com/users/jurko-gospodnetic/repos","events_url":"https://api.github.com/users/jurko-gospodnetic/events{/privacy}","received_events_url":"https://api.github.com/users/jurko-gospodnetic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-19T16:49:28Z","updated_at":"2015-05-20T16:11:04Z","closed_at":"2015-05-20T15:23:28Z","body":"`knex 0.8.0` started wrapping all `knex` migration steps in separate transactions, and there seems to be no way to turn this behaviour off.\r\n\r\nProblem with that is that there are some databases and some commands that just can not be run under an active database transaction. For example, running a `ALTER TYPE ... ADD VALUE` command on Postgres will fail in such scenario (http://www.postgresql.org/docs/9.4/static/sql-altertype.html).\r\n\r\nThis is also related to a problem of knex reporting such failures by just logging an end-user warning message and not reporting it on as a regular promise rejection, but I'll log that as a separate issue.\r\n\r\nI have not yet tested whether and how I can manually stop and restart `knex`'s database transaction around such problematic commands, but since the whole migration steps can not in theory be safely run under a transaction, there really should be a way to turn this behaviour off."},"comment":{"url":"https://api.github.com/repos/tgriesser/knex/issues/comments/103943020","html_url":"https://github.com/tgriesser/knex/issues/834#issuecomment-103943020","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/834","id":103943020,"user":{"login":"tgriesser","id":154748,"avatar_url":"https://avatars.githubusercontent.com/u/154748?v=3","gravatar_id":"","url":"https://api.github.com/users/tgriesser","html_url":"https://github.com/tgriesser","followers_url":"https://api.github.com/users/tgriesser/followers","following_url":"https://api.github.com/users/tgriesser/following{/other_user}","gists_url":"https://api.github.com/users/tgriesser/gists{/gist_id}","starred_url":"https://api.github.com/users/tgriesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgriesser/subscriptions","organizations_url":"https://api.github.com/users/tgriesser/orgs","repos_url":"https://api.github.com/users/tgriesser/repos","events_url":"https://api.github.com/users/tgriesser/events{/privacy}","received_events_url":"https://api.github.com/users/tgriesser/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T16:11:04Z","updated_at":"2015-05-20T16:11:04Z","body":"Sorry about that, only real functional change was [here](https://github.com/tgriesser/knex/blob/01bae6a598bd11cf8fea9e47544ab5d2bcbb8ca2/lib/migrate/index.js#L224-L241)"}}