Database Automation at deployment

Viewed 20

me and my team is working on 1 live project which is based on spring boot and angular language. i am working on spring boot project with mongodb database.

So we have total 4 server for deployment like develop/qa/preprod/prod. develop server/environment is for developers testing purpose, QA team will do testing in qa enviornment.

When i am working on any feature in my spring boot project in local code then i have make some database changes like if i want to give proper sorted data then i take new param in database for indexing. so in my local code i will apply index on existing documents.

Once my entire feature will done in local then i will push my code in develop environment first. at that time i will manually do database changes(i will connect develop's sever db then i will manually change in particular collection). and if evrything will good then i will deploy code in QA so same progress will be in QA(I will connect QA server DB and manually change in particular collection). same goes for preprod and prod enviornment also.

so it was just about 1 feature so when i have to deal with multiple feature then i will complete all feature in local then push all feature together in develop/qa/preprod/prod. at that time i have large changes in database so i need a more time to change data manually.

so my half day will be pass on database changes manually. and some times by mistake if i forgot to do 2-3 changes then my working feature will break. so that is humanable error.

so i just want do database automation so that i don't need to do manually changes in database and time can be reduced.

is there any way to do automation in database(any way like how we can write a script in another repository of database and then when we push the code then database changes will automatically applied to their respective environments)?

0 Answers
Related