0
votes

I have created some mysql databases in mysql. Now I am trying to get them into my web application by using the play framework.

I added the mysql configs in the application.conf, added the dependency for the mysql driver in the build.sbt, created my first model and added the models packages as the ebean default in the application.conf.

Now when I go into my browser I get this error:

error

I`m a little confused right now, because I do not want to create a new table, but use the one I created already.

Any idea what I am doing wrong??

1

1 Answers

1
votes

Play's default behaviour during development is to manage your database via the evolutions plugin. You define your initial schema in conf/evolutions/default/1.sql and then apply subsequent modifications in 2.sql, 3.sql etc etc. Whenever there are changes to these evolution files the plugin will attempt to run these on the database, which is what you're seeing here (although it looks like an error, it's really just trying to be helpful.)

If you want to manage the schema yourself (and you probably should on a production DB, for example) add evolutionplugin=disabled to the application.conf file.