Skip to content
Browse files

Merge pull request #1 from wishbear/master

Init flyway on migrate
  • Loading branch information...
2 parents 187b5d2 + 306adc6 commit 6973495b523a46c0f9f757b675b8a83170c3e1a6 @tototoshi committed Apr 27, 2013
Showing with 4 additions and 3 deletions.
  1. +1 −1 README.md
  2. +1 −0 plugin/src/main/scala/com/github/tototoshi/play2/flyway/Plugin.scala
  3. +2 −2 project/Build.scala
View
2 README.md
@@ -22,7 +22,7 @@ and write play.plugins.
Almost the same as play-evolutions.
-Place your migration scripts in config/db/migration/${dbName} .
+Place your migration scripts in conf/db/migration/${dbName} .
![screenshot](/screenshot1.png)
View
1 plugin/src/main/scala/com/github/tototoshi/play2/flyway/Plugin.scala
@@ -47,6 +47,7 @@ class Plugin(implicit app: Application) extends play.api.Plugin
val flyway = new Flyway
flyway.setDataSource(configuration.url, configuration.user, configuration.password)
flyway.setLocations(migrationFilesLocation)
+ flyway.setInitOnMigrate(true)
dbName -> flyway
}
}
View
4 project/Build.scala
@@ -11,10 +11,10 @@ object ApplicationBuild extends Build {
settings = Defaults.defaultSettings ++ Seq (
name := "play-flyway",
organization := "com.github.tototoshi",
- version := "0.1.2",
+ version := "0.1.3-SNAPSHOT",
scalaVersion := "2.10.0",
libraryDependencies ++= Seq(
- "play" %% "play" % "2.1.0" % "provided",
+ "play" %% "play" % "2.1.1" % "provided",
"com.googlecode.flyway" % "flyway-core" % "2.1.1",
"org.scalatest" %% "scalatest" % "1.9.1" % "test"
),

0 comments on commit 6973495

Please sign in to comment.
Something went wrong with that request. Please try again.