{"action":"created","issue":{"url":"https://api.github.com/repos/flyway/flyway/issues/1638","repository_url":"https://api.github.com/repos/flyway/flyway","labels_url":"https://api.github.com/repos/flyway/flyway/issues/1638/labels{/name}","comments_url":"https://api.github.com/repos/flyway/flyway/issues/1638/comments","events_url":"https://api.github.com/repos/flyway/flyway/issues/1638/events","html_url":"https://github.com/flyway/flyway/issues/1638","id":229181041,"number":1638,"title":"JdbcMigration lacking MigrationInfo","user":{"login":"cluelessjoe","id":982002,"avatar_url":"https://avatars3.githubusercontent.com/u/982002?v=3","gravatar_id":"","url":"https://api.github.com/users/cluelessjoe","html_url":"https://github.com/cluelessjoe","followers_url":"https://api.github.com/users/cluelessjoe/followers","following_url":"https://api.github.com/users/cluelessjoe/following{/other_user}","gists_url":"https://api.github.com/users/cluelessjoe/gists{/gist_id}","starred_url":"https://api.github.com/users/cluelessjoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cluelessjoe/subscriptions","organizations_url":"https://api.github.com/users/cluelessjoe/orgs","repos_url":"https://api.github.com/users/cluelessjoe/repos","events_url":"https://api.github.com/users/cluelessjoe/events{/privacy}","received_events_url":"https://api.github.com/users/cluelessjoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-16T21:58:00Z","updated_at":"2017-05-17T10:24:15Z","closed_at":null,"body":"Hi\r\n\r\nFirst of all, thanks a lot for Flyway.\r\n\r\nI'm using [Flyway 4.1.2 with jOOQ based migrations in order to make them typesafe](https://github.com/cluelessjoe/jooq-flyway-typesafe-migration). \r\n\r\nCurrently, on each executed migation, if some DDL instructions were issued, I generated the matching model through jOOQ (or I make sure the corresponding package is empty).\r\n\r\nI've however the following dilema:\r\n- I can only know whether some DDL instructions were executed in the migration itself, cf [JooqMigration.java](https://github.com/cluelessjoe/jooq-flyway-typesafe-migration/blob/f1a44611db91f133a723bc97d677333713307c67/migrator/src/main/java/org/jooq/example/migrator/JooqMigration.java)\r\n- I can only know the current version through the callback method \"afterEachMigrate(Connection connection, MigrationInfo info)\", cf [ModelSynchronizer](https://github.com/cluelessjoe/jooq-flyway-typesafe-migration/blob/f1a44611db91f133a723bc97d677333713307c67/migrator/src/test/java/ModelSynchronizer.java)\r\n\r\nI didn't find a way to explicitly inform the callback of the data gathered in the JooqMigration file, and as such I had to use static variables in [JooqMigration.java](https://github.com/cluelessjoe/jooq-flyway-typesafe-migration/blob/f1a44611db91f133a723bc97d677333713307c67/migrator/src/main/java/org/jooq/example/migrator/JooqMigration.java), which clearly isn't the best way.\r\n\r\nDo you have any better way or could you somehow provide the MigrationInfo in JdbcMigration?\r\n\r\nThanks in advance\r\n\r\nbest regards"},"comment":{"url":"https://api.github.com/repos/flyway/flyway/issues/comments/302049830","html_url":"https://github.com/flyway/flyway/issues/1638#issuecomment-302049830","issue_url":"https://api.github.com/repos/flyway/flyway/issues/1638","id":302049830,"user":{"login":"cluelessjoe","id":982002,"avatar_url":"https://avatars3.githubusercontent.com/u/982002?v=3","gravatar_id":"","url":"https://api.github.com/users/cluelessjoe","html_url":"https://github.com/cluelessjoe","followers_url":"https://api.github.com/users/cluelessjoe/followers","following_url":"https://api.github.com/users/cluelessjoe/following{/other_user}","gists_url":"https://api.github.com/users/cluelessjoe/gists{/gist_id}","starred_url":"https://api.github.com/users/cluelessjoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cluelessjoe/subscriptions","organizations_url":"https://api.github.com/users/cluelessjoe/orgs","repos_url":"https://api.github.com/users/cluelessjoe/repos","events_url":"https://api.github.com/users/cluelessjoe/events{/privacy}","received_events_url":"https://api.github.com/users/cluelessjoe/received_events","type":"User","site_admin":false},"created_at":"2017-05-17T10:24:15Z","updated_at":"2017-05-17T10:24:15Z","body":"I had some second thoughts on the topic: since the callbacks are instancieted by the user, they can easily have whatever context we want. On the other hand, migration are managed by Flyway and so can't have more context.\r\n\r\nAs such, rather than providing the MigrationInfo to the migration, it would be better if the (java) migration could contribute some state to the migration info given to the callbacks.\r\n\r\nI edit the issue in this way.\r\n\r\nHope it helps :$\r\n\r\nCheers"}}
{"actor":{"display_login":"cluelessjoe"}}