Post by SteKearns » Thu Oct 09, 2014 6:07 am

I'm playing around with OCMOD, without any experience of vQmod.

I've managed to create a zip file with the right contents, make changes (virtual) to a core file, and alter a database table (install.sql). Is there any way for me to remove the change to the database on removing the mod?

Any help appreciated 8)

Newbie

Posts

Joined
Thu Oct 09, 2014 3:51 am

Post by rph » Thu Oct 09, 2014 6:33 pm

There is no way to revert DB changes.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by uksitebuilder » Wed Oct 15, 2014 3:33 pm

After testing, it seems the install() and uninstall() methods still work in the extension admin controller

So my question is why do we need an install.sql file ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by rph » Wed Oct 15, 2014 4:38 pm

Every modification isn't going to be an extension module. If you have an OCMod based solution the only other option for DB changes would be dumping an install method in a model file.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by uksitebuilder » Wed Oct 15, 2014 5:13 pm

Ahh I see. So this is an additiononal function for those "non extension/module" modifications to allow them to run install sql commands in addition to the current controller methods.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by rph » Thu Oct 16, 2014 12:10 am

In all honesty I don't know what the official thinking behind it is. (For something that's the bread and butter of OpenCart there hasn't been much communication about modding.) SQL handling is a regularly requested feature for vQmod - I've even seen devs hack it in - so I'm sure that's how it will get used. I know I have a few mods it would be useful for.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by rmullaney77 » Fri Oct 31, 2014 6:49 pm

Why not just add support for an uninstall.sql file?

--------------------------------------------------
My BlogMy ExtensionsOpenCart Templates


User avatar
Active Member

Posts

Joined
Fri Nov 19, 2010 2:08 am
Location - Tampa, Florida
Who is online

Users browsing this forum: No registered users and 45 guests