From 8bf245c11a79c2c185cb9f9503a061dfb2b7d338 Mon Sep 17 00:00:00 2001 From: Dasiu Date: Sun, 19 Jan 2020 15:41:04 +0100 Subject: [PATCH] Updated Play to 2.8 * trailing commas from evolutions needed to be removed. They started to cause SQL syntax issues after H2 update. --- build.sbt | 14 +++++++------- conf/evolutions/default/1.sql | 4 ++-- project/plugins.sbt | 2 +- .../RealWorldWithServerAndTestConfigBaseTest.scala | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index 81eb0b4..e2cd7f1 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ version := "1.0" lazy val root = (project in file(".")) .enablePlugins(PlayScala) -scalaVersion := "2.13.0" +scalaVersion := "2.13.1" javacOptions ++= Seq("-source", "11", "-target", "11") @@ -15,19 +15,19 @@ libraryDependencies ++= Seq( ws, ehcache, cacheApi, - "com.typesafe.play" %% "play-json" % "2.7.4", - "org.julienrf" %% "play-json-derived-codecs" % "6.0.0", - "com.typesafe.play" %% "play-slick" % "4.0.2", - "com.typesafe.play" %% "play-slick-evolutions" % "4.0.2", + "com.typesafe.play" %% "play-json" % "2.8.1", + "org.julienrf" %% "play-json-derived-codecs" % "7.0.0", + "com.typesafe.play" %% "play-slick" % "5.0.0", + "com.typesafe.play" %% "play-slick-evolutions" % "5.0.0", "commons-validator" % "commons-validator" % "1.6", "com.github.slugify" % "slugify" % "2.4", - "com.h2database" % "h2" % "1.4.199", + "com.h2database" % "h2" % "1.4.200", "org.mindrot" % "jbcrypt" % "0.4", "org.apache.commons" % "commons-lang3" % "3.9", "com.softwaremill.macwire" %% "macros" % "2.3.3" % "provided", - "org.scalatestplus.play" %% "scalatestplus-play" % "4.0.3" % "test", + "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % "test", ) fork in run := true \ No newline at end of file diff --git a/conf/evolutions/default/1.sql b/conf/evolutions/default/1.sql index 7ac4a8d..edb554e 100644 --- a/conf/evolutions/default/1.sql +++ b/conf/evolutions/default/1.sql @@ -71,7 +71,7 @@ CREATE TABLE follow_associations ( followed_id INTEGER NOT NULL, FOREIGN KEY (follower_id) REFERENCES users(id), FOREIGN KEY (followed_id) REFERENCES users(id), - CONSTRAINT follow_associations_follower_followed_unq UNIQUE (follower_id, followed_id), + CONSTRAINT follow_associations_follower_followed_unq UNIQUE (follower_id, followed_id) ); CREATE TABLE favorite_associations ( @@ -80,7 +80,7 @@ CREATE TABLE favorite_associations ( favorited_id INTEGER NOT NULL, FOREIGN KEY (user_id) REFERENCES users(id), FOREIGN KEY (favorited_id) REFERENCES articles(id), - CONSTRAINT favorite_associations_user_favorited_unq UNIQUE (user_id, favorited_id), + CONSTRAINT favorite_associations_user_favorited_unq UNIQUE (user_id, favorited_id) ); # --- !Downs diff --git a/project/plugins.sbt b/project/plugins.sbt index 2add8e3..9da9bf1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" -addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.3") +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.0") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.4.1") diff --git a/test/commons_test/test_helpers/RealWorldWithServerAndTestConfigBaseTest.scala b/test/commons_test/test_helpers/RealWorldWithServerAndTestConfigBaseTest.scala index 51f1775..769d189 100644 --- a/test/commons_test/test_helpers/RealWorldWithServerAndTestConfigBaseTest.scala +++ b/test/commons_test/test_helpers/RealWorldWithServerAndTestConfigBaseTest.scala @@ -42,7 +42,7 @@ object RealWorldWithServerAndTestConfigBaseTest { override def configuration: Configuration = { val testConfig = Configuration.from(TestUtils.config) val config = super.configuration - config ++ testConfig + testConfig.withFallback(config) } }