matthias4217 / jukebox-ultra-nrv

Multi-user jukebox for LAN use
https://gitlab.com/club-jeux-int/jukebox-ultra-nrv
3 stars 3 forks source link

Add a system to alter database if the update requires it. #82

Open matthias4217 opened 4 years ago

matthias4217 commented 4 years ago

It would solve problems like #81. I'm not sure exactly how this would be done, but it would be great to have such a system.

PaulDance commented 4 years ago

It would solve problems like #81. I'm not sure exactly how this would be done, but it would be great to have such a system.

I'm not sure either, but maybe using a Makefile could help in this regard ? For example, when updating, the user would git pull then make apply-patches that would detect automatically the previous version and the currently used version of the Jukebox and run the corresponding bash scripts stored in a patches directory. There would be one script per version change requiring a patch. To detect the previous version, you could use an ignored local file that would store the current version tag. So this way, when pulling, it would not overwrite it and it would still store the previous version tag, so that the Makefile could execute all the patch scripts one by one, in chronological order, and then update the previous tag file.