{"action":"opened","issue":{"url":"https://api.github.com/repos/BjerknesClimateDataCentre/QuinCe/issues/740","repository_url":"https://api.github.com/repos/BjerknesClimateDataCentre/QuinCe","labels_url":"https://api.github.com/repos/BjerknesClimateDataCentre/QuinCe/issues/740/labels{/name}","comments_url":"https://api.github.com/repos/BjerknesClimateDataCentre/QuinCe/issues/740/comments","events_url":"https://api.github.com/repos/BjerknesClimateDataCentre/QuinCe/issues/740/events","html_url":"https://github.com/BjerknesClimateDataCentre/QuinCe/issues/740","id":299630872,"number":740,"title":"Add flyway  migration support to the gradle setup","user":{"login":"jonasfh","id":5442807,"avatar_url":"https://avatars1.githubusercontent.com/u/5442807?v=4","gravatar_id":"","url":"https://api.github.com/users/jonasfh","html_url":"https://github.com/jonasfh","followers_url":"https://api.github.com/users/jonasfh/followers","following_url":"https://api.github.com/users/jonasfh/following{/other_user}","gists_url":"https://api.github.com/users/jonasfh/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasfh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasfh/subscriptions","organizations_url":"https://api.github.com/users/jonasfh/orgs","repos_url":"https://api.github.com/users/jonasfh/repos","events_url":"https://api.github.com/users/jonasfh/events{/privacy}","received_events_url":"https://api.github.com/users/jonasfh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-23T08:16:14Z","updated_at":"2018-02-23T08:16:14Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Flyway is a simple database migration plugin for gradle. This should be setup in our gradle build file. I tested this when setting up gradle, but did not include it in the first setup. however, the setup worked nicely, and like like this: \r\n\r\n```\r\n// For the flyway migration, add first in build.gradle:\r\n buildscript {\r\n     dependencies {\r\n         classpath 'mysql:mysql-connector-java:5.1.36'\r\n     }\r\n }\r\n\r\n// Include the flyway plugin: \r\napply plugin 'org.flywaydb.flyway'\r\n\r\n// Anywhere:\r\n flyway {\r\n     url = webContext.Resource.@url\r\n     user = webContext.Resource.@username\r\n     password = webContext.Resource.@password\r\n     locations = [\"classpath:flywayMigrations\"]\r\n     baselineOnMigrate = true\r\n }\r\n```\r\n\r\nAlso, in the cron script on the TEST-server running daily git checkout and database reset, the following should be run: \r\n\r\n./gradlew flywayMigrate\r\n\r\nThis will apply any schema - changes to the database after being reset to prod-version.\r\n\r\n"}}
{"actor":{"display_login":"jonasfh"}}