just wondering how to tell AutoMOD what SQL queries to execute when uninstalling a mod.
Do I have to hand out an extra install.php with the mod having two possibilies to choose from:
- install database changes and
- uninstall database changes?
I was thinking the same thing. The only way I have going through my head is to perform the equivalent of a backup, get the user to run the script, then 'backup' again and compare the two files.A_Jelly_Doughnut wrote:Its theoretically possible, but would be difficult to achieve.
Indeed. This is why INSERT queries are not un-done. Only new columns added to the table and new DB tables are removed.Miriam wrote:To DROP a row in a database table might not always be the reverse step of INSERTing it. One might use this new row for backing up old values that have to be put back in place when uninstalling a modification.
I don't understand what you mean.Anyway, I think it is a good idea to give the User a clue of what to do within the author notes that will be displayed when uninstalling the modification using AutoMOD.