I use flyway or liquibase to manage my schema and to update some table in application during start-up. I wondering if there is some way to update mongodb collections during start-up? I want to add one new field to collection and provide a value for that field for all old objects
Asked
Active
Viewed 72 times
1 Answers
0
First update your object, create repository then create a function that will update all of the old objects. Then call your function using this reference "https://stackoverflow.com/questions/27405713/running-code-after-spring-boot-starts".
For the updating and creating of repository you can watch tutorials on youtube.