{"action":"opened","issue":{"url":"https://api.github.com/repos/jooby-project/jooby/issues/162","labels_url":"https://api.github.com/repos/jooby-project/jooby/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/jooby-project/jooby/issues/162/comments","events_url":"https://api.github.com/repos/jooby-project/jooby/issues/162/events","html_url":"https://github.com/jooby-project/jooby/issues/162","id":97276797,"number":162,"title":"flywaydb: db migration should run in the order they are defined","user":{"login":"jknack","id":1301129,"avatar_url":"https://avatars.githubusercontent.com/u/1301129?v=3","gravatar_id":"","url":"https://api.github.com/users/jknack","html_url":"https://github.com/jknack","followers_url":"https://api.github.com/users/jknack/followers","following_url":"https://api.github.com/users/jknack/following{/other_user}","gists_url":"https://api.github.com/users/jknack/gists{/gist_id}","starred_url":"https://api.github.com/users/jknack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jknack/subscriptions","organizations_url":"https://api.github.com/users/jknack/orgs","repos_url":"https://api.github.com/users/jknack/repos","events_url":"https://api.github.com/users/jknack/events{/privacy}","received_events_url":"https://api.github.com/users/jknack/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jooby-project/jooby/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jooby-project/jooby/milestones/19","html_url":"https://github.com/jooby-project/jooby/milestones/0.9.0","labels_url":"https://api.github.com/repos/jooby-project/jooby/milestones/19/labels","id":1215004,"number":19,"title":"0.9.0","description":"","creator":{"login":"jknack","id":1301129,"avatar_url":"https://avatars.githubusercontent.com/u/1301129?v=3","gravatar_id":"","url":"https://api.github.com/users/jknack","html_url":"https://github.com/jknack","followers_url":"https://api.github.com/users/jknack/followers","following_url":"https://api.github.com/users/jknack/following{/other_user}","gists_url":"https://api.github.com/users/jknack/gists{/gist_id}","starred_url":"https://api.github.com/users/jknack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jknack/subscriptions","organizations_url":"https://api.github.com/users/jknack/orgs","repos_url":"https://api.github.com/users/jknack/repos","events_url":"https://api.github.com/users/jknack/events{/privacy}","received_events_url":"https://api.github.com/users/jknack/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-07-20T00:39:41Z","updated_at":"2015-07-26T02:27:19Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-07-26T02:27:19Z","updated_at":"2015-07-26T02:27:19Z","closed_at":null,"body":"It's not possible to use flyway+hibernate today:\r\n\r\n```properties\r\ndb.url=...\r\ndb.user=..\r\ndb.password=...\r\n\r\nflyway.url=${db.url}\r\nflyway.user=${db.user}\r\nflyway.password=${db.url}\r\n```\r\n\r\n```java\r\n{\r\n   use(new Flywaydb());\r\n\r\n   use(new Hbm());\r\n}\r\n```\r\n\r\nBy the time Hibernate run, it expects to have the schema ready. Today, Flyway and Hibernate are initialized by Guice so it isn't possible to run these lines in order.\r\n\r\nThe change will make flyway run as soon as possible and don't depend on any ```DataSource``` provided by Guice.\r\n"}}