It seems that whenever I change my models, Play Framework asks me to run a script that deletes my entire schema and recreates it. Obviously this won't work for production, so what is the proper way to handle this in production?
Note, I'm using ebean and Postgres, and hosting on heroku.
Unfortunately
Ebeancan create onlyCREATE DDL(and notUPDATE DDL) (as answered on their group), therefore you need to switch to manual evolutions ASAP.some rules:
1.sqlevolution created by it1.sqland start to writing own evolutions with next numbers2.sql,3.sqletc. Try to place as many models/fields as possible before switching to manual evolutions. The biggest part will be done automatically by plugin.ALTERSto existing tables/columns instead of DROP/CREATE, they should have both:UpsandDownsfor each change.De facto sometimes it's just easier to modify DB structure with DB gui, anyway it works mainly for the single developer... when you need to share your code with other developers writing evolutions will be better option.
If after some time you'll add next 'big' portion of new models you can enable temporary auto DDL again and using local git just to copy new parts. Then revert to own revolution and paste new parts generated by Ebean plugin.