Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to remove sql instructions from Database


NewBudda

Recommended Posts

Posted

Hi, I am trying to uninstall a contribution and now need to undo the database changes. I assume that I need phpmyadmin access which i have. I think i need to undo the instructions in the *.sql file:

ALTER TABLE products_description ADD products_head_title_tag VARCHAR(80) NULL;
ALTER TABLE products_description ADD products_head_desc_tag LONGTEXT NULL;
ALTER TABLE products_description ADD products_head_keywords_tag LONGTEXT NULL;

ALTER TABLE categories_description ADD categories_htc_title_tag VARCHAR(80) NULL;
ALTER TABLE categories_description ADD categories_htc_desc_tag LONGTEXT NULL;
ALTER TABLE categories_description ADD categories_htc_keywords_tag LONGTEXT NULL;
ALTER TABLE categories_description ADD categories_htc_description LONGTEXT NULL;

ALTER TABLE manufacturers_info ADD manufacturers_htc_title_tag VARCHAR(80) NULL;
ALTER TABLE manufacturers_info ADD manufacturers_htc_desc_tag LONGTEXT NULL;
ALTER TABLE manufacturers_info ADD manufacturers_htc_keywords_tag LONGTEXT NULL;
ALTER TABLE manufacturers_info ADD manufacturers_htc_description LONGTEXT NULL;

How do i UNDO those instructions?

ALTER TABLE manufacturers_info REM manufacturers_htc_title_tag

???

Or do I amanually delete something with phpmyadmin?

Thank you for your thoughts!

Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Posted

Philip,

 

You would need to run a query like this to remove the columns added to your tables:

 

ALTER TABLE `products_description` drop column `products_head_title_tag`;

ALTER TABLE `products_description` drop column `products_head_desc_tag`;

ALTER TABLE `products_description` drop column `products_head_keywords_tag`;

 

 

ALTER TABLE `categories_description` drop column `categories_htc_title_tag`;

ALTER TABLE `categories_description` drop column `categories_htc_desc_tag`;

ALTER TABLE `categories_description` drop column `categories_htc_keywords_tag`;

ALTER TABLE `categories_description` drop column `categories_htc_description`;

 

ALTER TABLE `manufacturers_info` drop column `manufacturers_htc_title_tag`;

ALTER TABLE `manufacturers_info` drop column `manufacturers_htc_desc_tag`;

ALTER TABLE `manufacturers_info` drop column `manufacturers_htc_keywords_tag`;

ALTER TABLE `manufacturers_info` drop column `manufacturers_htc_description`;

 

 

 

BACK UP FIRST

 

 

Chris

Posted

I'm no help on your solution, but I'm thinking I might have run into a similar issue with removing a contribution. I installed a couple of them that just didn't work like I wanted and when I removed them, certain things in my site quite working like shipping with Table Rate.

 

Wonder if you have to go back and REM all db queries that you ran but are no longer using?

Posted

ok. ill try this tonite, while no people are at the site. Will let you know how it worked.

Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Posted
ok. ill try this tonite, while no people are at the site. Will let you know how it worked.

 

Would very much be interested in how it worked out. Still dealing with the same issue on mine.

 

One of my issues is that the sql query I'm working with is:

 

ALTER TABLE `products_attributes` ADD `options_quantity` INT( 11 )

 

That means that I have to figure out how to restore the products_attributes table to the original state somehow! Am at a loss as to how to do that right now. Hopefully someone can shed some light on that...

 

Hope it works for you!

Posted

I have not yet found the time, but will come back here.

Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Posted

I found the solution to my problem!

 

Went in the PHPmyadmin panel, clicked on the osC database, selected the database in the php control panel and browsed to the products_attributes table. Found the "options_quanity" cell and dropped it (by clicking the red X). Problem solved! Hope this helps someone!

Posted

Hi all

 

I have also uninstalled the

ALTER TABLE `products_attributes` ADD `options_quantity` INT( 11 ) ;
option which comes from Quantity for Product Attributes Mod v1.0 add-on

 

However now I am getting problems with normal stock not being subtracted when orders are placed and the best sellers reports not updating. Could anyone shed any light on this? :(

Debbie Harrison

 

Posted

I think there is a moral to all this, before adding any contribution BACK UP! It saves a lot of time and trouble.

Better to be looked over than overlooked!

Posted

Actually I have and I am looking into it now.

 

But it would be nice to know if the problem is from the database and if so, is it a recurring problem?

Debbie Harrison

 

Posted

I have restored and it has not made one iota of difference. What files would I need to restore in order for stock to subtract and for the best sellers function to update?

Debbie Harrison

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...