Hooks in the evolution of the game?

Is there a way to connect to the Play concept of evolution , so that when transferring from n.sqlto n+1.sqlto n+2.sql..., it causes some hook after success in the Play application (something like postSchemaMigration(n: Int)? Can I manually check and apply the evolution one after another in a global object where- then before loading the server?

+4
source share
1 answer

In its current form, Play does not have a built-in mechanism to control the evolution process. Either he succeeds completely or fails. If your application works, then all changes have been applied

Depending on your use case, you have several options. The most flexible is simply not to use the playback evolution platform and apply database evolution with custom code in a global object using plain-ol 'JDBC. At about the same lines, you can implement a custom Play plugin that applies your evolutions.

. , , , Play.

0

Source: https://habr.com/ru/post/1531832/


All Articles