How i could generate database scheme based on model in play 2.0?
Is there any config for this?
How i could generate database scheme based on model in play 2.0? Is there
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s enabled by default, every time you modify any model Ebean plugin updates file /conf/evolutions/default/1.sql, so when you’ll refresh app in browser it will ask you if you want to apply evolotions
BUT BEWARE! Ebean script will DROP any existing table and will create it from scratch after each model’s modification. So it could be destructive in future … If you’ll finish basic modeling of app it’s definitely better idea to disable Ebean DDL generation and start using common Play’s evolutions