{"action":"created","issue":{"url":"https://api.github.com/repos/DbUp/DbUp/issues/317","repository_url":"https://api.github.com/repos/DbUp/DbUp","labels_url":"https://api.github.com/repos/DbUp/DbUp/issues/317/labels{/name}","comments_url":"https://api.github.com/repos/DbUp/DbUp/issues/317/comments","events_url":"https://api.github.com/repos/DbUp/DbUp/issues/317/events","html_url":"https://github.com/DbUp/DbUp/issues/317","id":300204979,"number":317,"title":"MySql migration with Transaction should rollback all scripts when failed","user":{"login":"sebastieno","id":2248640,"avatar_url":"https://avatars2.githubusercontent.com/u/2248640?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastieno","html_url":"https://github.com/sebastieno","followers_url":"https://api.github.com/users/sebastieno/followers","following_url":"https://api.github.com/users/sebastieno/following{/other_user}","gists_url":"https://api.github.com/users/sebastieno/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastieno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastieno/subscriptions","organizations_url":"https://api.github.com/users/sebastieno/orgs","repos_url":"https://api.github.com/users/sebastieno/repos","events_url":"https://api.github.com/users/sebastieno/events{/privacy}","received_events_url":"https://api.github.com/users/sebastieno/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-26T11:39:11Z","updated_at":"2018-02-26T12:59:47Z","closed_at":"2018-02-26T12:50:38Z","author_association":"NONE","body":"Hello everyone,\r\n\r\nI tried to use DbUp for my MySql database migration process and I meet a weird behavior.\r\n\r\nI created two migrations (each migration creates the exact same table). I want to be able to execute those migrations in a single transaction (to ensure that if an upgrade process failed, the database will not be in an invalid state). Here my code (nothing special) :\r\n\r\n```\r\n UpgradeEngine upgrader = DeployChanges.To.MySqlDatabase(connectionString)\r\n                .WithScriptsEmbeddedInAssembly(Assembly.Load(xxx))\r\n                .LogToConsole()\r\n                .LogScriptOutput()\r\n                .WithTransaction()\r\n                .Build();\r\n\r\nDatabaseUpgradeResult result = upgrader.PerformUpgrade();\r\n```\r\nThe second migration fails because the table already exists (as the first migration creates it).\r\n\r\nAfter the execution, I see in the version table that the second migration has not been marked as done, but my table (created by the first migration) is not rollbacked.\r\n\r\nI am missing something ?\r\n\r\nThx for you help."},"comment":{"url":"https://api.github.com/repos/DbUp/DbUp/issues/comments/368494802","html_url":"https://github.com/DbUp/DbUp/issues/317#issuecomment-368494802","issue_url":"https://api.github.com/repos/DbUp/DbUp/issues/317","id":368494802,"user":{"login":"sebastieno","id":2248640,"avatar_url":"https://avatars2.githubusercontent.com/u/2248640?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastieno","html_url":"https://github.com/sebastieno","followers_url":"https://api.github.com/users/sebastieno/followers","following_url":"https://api.github.com/users/sebastieno/following{/other_user}","gists_url":"https://api.github.com/users/sebastieno/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastieno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastieno/subscriptions","organizations_url":"https://api.github.com/users/sebastieno/orgs","repos_url":"https://api.github.com/users/sebastieno/repos","events_url":"https://api.github.com/users/sebastieno/events{/privacy}","received_events_url":"https://api.github.com/users/sebastieno/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T12:59:47Z","updated_at":"2018-02-26T12:59:47Z","author_association":"NONE","body":"Thx for your quick reply and your help :)"}}
{"actor":{"display_login":"sebastieno"}}