Split a domain and migrate change to database
I have a domain class and it already has a lot of data in the database. Now I need to split the domain into two. Is th开发者_JS百科ere a way by which the data in the database will automatically be split into the two tables as well?
You can use the Grails Database Migration Plugin plugin for such a task.
i think there is no automatic mechanism for your issue. i would backup the old database schema, change the domain class schema, deploy the new shema (hopefully all database changes get executed) and migrate the old data to the new schema.
精彩评论