Regenerate evolution scenarios in game 2

I am still developing the first version of my application for game 2. How can I restore evolution scenarios?

+6
source share
2 answers

Disclaimer : it will destroy your existing database and create a new one!

Auto-evolution will automatically recover when:

  • you run your application in dev mode
  • in application.conf you have this line not : ebean.default="models.*"
  • there is only one file in your evolution folder, and 1.sql
  • he has this comment at the beginning:

# --- Created by Ebean DDL

+8
source

Using play 2.4, Slick 3.0.3, and postgres, * .sql files placed in the evolution folder were automatically generated in Heroku using the following setting:

in the build.sbt file:

  "com.typesafe.play" %% "play-slick" % "1.0.1", "com.typesafe.play" %% "play-slick-evolutions" % "1.0.1", "com.typesafe.slick" %% "slick" % "3.0.3", "org.postgresql" % "postgresql" % "9.4-1201-jdbc41", "org.slf4j" % "slf4j-nop" % "1.6.4", 

in application.conf:

 slick.dbs.default.driver ="slick.driver.PostgresDriver$" slick.dbs.default.db.dataSourceClass = "slick.jdbc.DatabaseUrlDataSource" slick.dbs.default.db.properties.driver = "org.postgresql.Driver" 

and in the Procfile file:

 -Dplay.evolutions.db.default.autoApply = true 

Greetings

0
source

Source: https://habr.com/ru/post/916950/