I learned the game by following the tutorial on my website to create a small blogging mechanism.
It uses JPA, and in it bootstrap calls Fixtures.Deletemodels (), (or something like that).
It basically destroys all the tables every time it starts, and I lose all the data.
I have deployed a production system such as (without nuke instruction).
Now I need to deploy a big update to the production system. Many classes have changed, been added and removed. In my testing locally, without decorating the tables every time I started, I ran into synchronization problems. When I try to write or read from tables, the game will cause errors. I opened mysql and, of course, the tables were partially modified and incorrectly changed in some cases. Even if I have the DDL mode set to โcreateโ in my configuration, JPA cannot โdetermineโ how to reconcile the changes and change my schema accordingly.
Therefore, I need to return to the bootstrap statement, which destroys all my tables.
So, I began to study the evolution of the database in Play and read an article on the website of the playback platform about the development of databases. The article talked about version scripts, but he said: "If you work with JPA, Hibernate can automatically process database changes. Evolutions are useful if you do not use JPA."
So, if the JPA is supposed to take care of this for me, how do I deploy large updates to the large Play application? So far, JPA has not been able to correctly modify the schema, and the application will throw errors. I do not want to lose all my data, so the fix on dev "Fixtures.deleteModels ()" cannot really be used in prod.
Thanks in advance, Josh