0

I am using play framework in one of my project.

Currently I am working with the initial release. I use evaluation plugin to generate the SQL queries that create the tables.

However after first release, I have to disable the evaluation plugin because it only supports generating the first SQL (1.sql).

However I am not that confident in writing SQLs that is used for Ebean. So I am looking for a proper way to get the generated SQLs and modify manually base on the changes for future version. Is that possible?

Ivor Zhou
  • 1,241
  • 13
  • 22

2 Answers2

0

Unfortunately Ebean can create only CREATE DDL (and not UPDATE DDL), which means, that next evolutions you need to create yourself.

Read other answer for more details.

Community
  • 1
  • 1
biesior
  • 55,576
  • 10
  • 125
  • 182
0

Old question, but this is a useful hack for new complex tables you need to create.

Just move 1.sql out of the way, and ebean will generate SQL for all your tables again. Copy the stuff you need for your new table out of the new 1.sql, then put the old 1.sql back, and paste your copied SQL into a new evolution.

Shanness
  • 365
  • 2
  • 10