Uninstall SQL queries

Archive of support for the automated MOD installation tool codenamed "Blinky". For support questions regarding AutoMOD please visit here.
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: IF YOU NEED SUPPORT FOR AUTOMOD PLEASE VISIT THE APPROPRIATE LOCATION HERE.
Locked
User avatar
Miriam
Registered User
Posts: 147
Joined: Tue Dec 30, 2008 3:40 pm
Location: looking over your shoulder
Name: Miriam
Contact:

Uninstall SQL queries

Post by Miriam » Wed Dec 31, 2008 2:09 pm

Hello e1,

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:
  1. install database changes and
  2. uninstall database changes?
All my posts reflect my ideas on how to solve a problem. To use them on your board is your cup of tea and in your reach of responsibility also.
And yes: I appreciate each and every "Thank You".

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Uninstall SQL queries

Post by A_Jelly_Doughnut » Wed Dec 31, 2008 3:39 pm

If your SQL queries are specified using the <sql> tag, they should be reversed automatically. If you use an install script, then you would have an uninstall option within it.

*Note: At this time, uninstall scripts are not required of MOD Authors.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

themcman1
Registered User
Posts: 45
Joined: Sat Dec 06, 2008 2:26 pm
Location: modx.prosilver.en.xsl

Re: Uninstall SQL queries

Post by themcman1 » Wed Dec 31, 2008 7:26 pm

I was thinking about this last night.

If a mod has an install script, AutoMOD obviously can't execute it because they are all implemented differently.

I'm not particularly good at PHP/MySQL programming but would there be a way for AutoMOD to monitor the database and record the changes made by the install script?

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Uninstall SQL queries

Post by A_Jelly_Doughnut » Wed Dec 31, 2008 8:08 pm

Its theoretically possible, but would be difficult to achieve.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

themcman1
Registered User
Posts: 45
Joined: Sat Dec 06, 2008 2:26 pm
Location: modx.prosilver.en.xsl

Re: Uninstall SQL queries

Post by themcman1 » Wed Dec 31, 2008 11:19 pm

A_Jelly_Doughnut wrote:Its theoretically possible, but would be difficult to achieve.
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.

User avatar
Miriam
Registered User
Posts: 147
Joined: Tue Dec 30, 2008 3:40 pm
Location: looking over your shoulder
Name: Miriam
Contact:

Re: Uninstall SQL queries

Post by Miriam » Thu Jan 01, 2009 11:40 pm

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.

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.

TY so far.
All my posts reflect my ideas on how to solve a problem. To use them on your board is your cup of tea and in your reach of responsibility also.
And yes: I appreciate each and every "Thank You".

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Uninstall SQL queries

Post by A_Jelly_Doughnut » Fri Jan 02, 2009 12:08 am

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.
Indeed. This is why INSERT queries are not un-done. Only new columns added to the table and new DB tables are removed.
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.
I don't understand what you mean.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
Miriam
Registered User
Posts: 147
Joined: Tue Dec 30, 2008 3:40 pm
Location: looking over your shoulder
Name: Miriam
Contact:

Re: Uninstall SQL queries

Post by Miriam » Fri Jan 02, 2009 1:18 pm

I am talking about the author notes given within the install.xml file of the mod. These are displayed when deinstalling the mod.
Pictures of what I am talking about in chronological order. (Pay special attention to the red frames, pls.)
Image Image Image Image
All my posts reflect my ideas on how to solve a problem. To use them on your board is your cup of tea and in your reach of responsibility also.
And yes: I appreciate each and every "Thank You".

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Uninstall SQL queries

Post by A_Jelly_Doughnut » Fri Jan 02, 2009 3:04 pm

Hm. I might not show author notes on uninstall ... but automatically altering them is out of the question, I think.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

jmjm003
Registered User
Posts: 275
Joined: Sat Dec 22, 2007 7:05 pm

Re: Uninstall SQL queries

Post by jmjm003 » Fri Jan 02, 2009 4:34 pm

I hate to jump off topic. Since we have an image here that shows what I want to ask, I'm going to take advantage of it.
The first image on the left posted above.
When we select the mod to install this is the screen that comes up. It's not until after we select to install it that we see the changes that passed or failed. Is it suppose to be this way? Or should we see the install instructions here before every clicking install? I personally, would like to see what changes it's going to make before letting it go.

I could always open the install.xml and take a look...

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Uninstall SQL queries

Post by A_Jelly_Doughnut » Fri Jan 02, 2009 5:28 pm

jmjm003: This will be fixed with the next version of AutoMOD. There will be a configuration setting whether you want to preview the changes or not.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

jmjm003
Registered User
Posts: 275
Joined: Sat Dec 22, 2007 7:05 pm

Re: Uninstall SQL queries

Post by jmjm003 » Fri Jan 02, 2009 7:10 pm

I see your notes on the last revision.
Time to go play. :D

Thanks Jelly Dude

Locked

Return to “[3.0.x] AutoMOD”