Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default How Can I Uninstall This SQL Patch?

    This one has screwed up my Admin area and I didn't backup my database... I know, I know but 99.999999% of SQL patches run perfectly and i've never had to reinstate a database to this day...... Well until now

    Here's the SQL I uploaded.... Does anyone know how to uninstall this???

    PHP Code:
    # Admin Notes

    # --------------------------------------------------------

    #
    # Table structure for table '`notes_categories`'
    #

    DROP TABLE IF EXISTS `notes_categories`;
    CREATE TABLE `notes_categories` (
      `
    notes_categories_idint(11NOT NULL auto_increment,
      `
    notes_categories_namevarchar(64) default NULL,
      
    PRIMARY KEY  (`notes_categories_id`)
    TYPE=MyISAM;

    # --------------------------------------------------------

    #
    # Table structure for table '`notes`'
    #

    DROP TABLE IF EXISTS `notes`;
    CREATE TABLE `notes` (
      `
    notes_idint(11NOT NULL auto_increment,
      `
    notes_titlevarchar(64NOT NULL,
      `
    notes_texttext,
      `
    notes_date_createddatetime NOT NULL default '0001-01-01 00:00:00',
      `
    notes_date_modifieddatetime NOT NULL default '0001-01-01 00:00:00'
      `
    notes_start_datedate NOT NULL default '0001-01-01',
      `
    notes_end_datedate NOT NULL default '0001-01-01',  
      `
    notes_snooze_datedatetime NOT NULL default '0001-01-01 00:00:00'
      `
    notes_categories_idint(11NOT NULL default '1',
      `
    notes_priorityint(11NOT NULL default '1',
      `
    notes_statusint(1NOT NULL default '1',
      `
    notes_text_message_stack_statusint(1NOT NULL default '1',  
      `
    notes_catalog_statusint(1NOT NULL default '0',    
      `
    notes_is_special_statusint(1NOT NULL default '0',      
      `
    customers_idint(11) default NULL,
      `
    orders_idint(11) default NULL,  
      `
    products_idint(11) default NULL
      `
    categories_idvarchar(64) default NULL,    
      
    PRIMARY KEY  (`notes_id`)
    TYPE=MyISAM;

    # --------------------------------------------------------

    #
    # Sample data 
    #

    INSERT INTO `notes_categoriesVALUES (NULL'New notes');
    INSERT INTO `notes_categoriesVALUES (NULL'Sample notes');
    INSERT INTO `notes_categoriesVALUES (NULL'Personal');
    INSERT INTO `notes_categoriesVALUES (NULL'Add ons');

    INSERT INTO `notesVALUES (NULL'Welcome to Admin Notes!''Tired of having Post-it Notes all over the place, and never being able to find that one important note between all other notes?<br />
    With Zen Cart notes you will save lots of time (and the money you spend on Post-it notes... :-)<br /><br />
    Goto to your Zen Cart admin :: Extras :: Admin Notes to view, edit and create new notes.<br /><br />
    If you like this contribution and would like to support the development please make a donation to [email protected]'
    NOW(),  NOW(), NOW(), '0001-01-01''0001-01-01 00:00:00'221100NULLNULLNULLNULL);


    INSERT INTO `notesVALUES (NULL'Special notes sample (attached to customer 1).''This is a customers note about customer 1 (customers_id = 1) 'NOW(),  NOW(), NOW(), '0001-01-01''0001-01-01 00:00:00'2211011NULLNULLNULL);


    INSERT INTO `notesVALUES (NULL'Special notes sample (unattached).''You can attach this special note to a customer, order, category or product. When attached it will only be shown while you are viewing the details of the customer, order, category or product.<br />
    <br />
    There are two ways to attach a special note:<br />
    <br />
    1- You can attach a special note directly by editting the details, but then you will need to know the id of the object you want it to be attached to (the notifier is triggered by the cID, pID, cPath, oID value).<br />
    <br />
    2- If none of the ID values is > 0 (note details), then the note will be active on all special events and the notes notifier will ask you if you want to attach this note to the product, customer, order or category which you are viewing in you Zen Cart admin. Now the ID will be entered into the note editor automaticly if you click on the note link.'
    NOW(),  NOW(), NOW(), '0001-01-01 00:00:00''0001-01-01 00:00:00'221101NULLNULLNULLNULL);

    # --------------------------------------------------------

    #
    # Remove data 
    #

    #TRUNCATE TABLE `notes`;
    #TRUNCATE TABLE `notes_categories`;

    # --------------------------------------------------------

    #
    # Delete tables 
    #

    #DROP TABLE IF EXISTS `notes`;
    #DROP TABLE IF EXISTS `notes_categories`; 

  2. #2
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: How Can I Uninstall This SQL Patch:

    It looks like the uninstall commands are commented out at the bottom there.

    DROP TABLE IF EXISTS `notes`;
    DROP TABLE IF EXISTS `notes_categories`;

    Though I can't see how these two tables could mess up the admin panel. It's more likely to be the mod's files.

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: How Can I Uninstall This SQL Patch:

    Mod Files were all unique and I removed them and ran the uninstall SQL above.... Still getting the exact same errors... What on earth could be causing them ?

  4. #4
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: How Can I Uninstall This SQL Patch:

    What errors are you getting?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How Can I Uninstall This SQL Patch:

    Quote Originally Posted by Steven300 View Post
    What errors are you getting?
    Probably this one: http://www.zen-cart.com/forum/showthread.php?t=128369
    ... which is entirely unrelated to the SQL Patch code posted above.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Dec 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: How Can I Uninstall This SQL Patch:

    could you please help me with uninstalling sql


    CREATE TABLE customers_additional (
    field_id int(11) NOT NULL auto_increment,
    field_name varchar(255) NOT NULL default '',
    field_status char(2) NOT NULL default '',
    PRIMARY KEY (field_id)
    ) ENGINE=MyISAM;


    after this patch i have started getting error below

    1054 Unknown column 'field_required' in 'field list'
    in:
    [ SELECT field_id, field_name, field_required, field_status, use_url, field_url FROM customers_additional WHERE field_status = 1 ]

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: How Can I Uninstall This SQL Patch:

    Quote Originally Posted by sohailarif View Post
    could you please help me with uninstalling sql


    CREATE TABLE customers_additional (
    field_id int(11) NOT NULL auto_increment,
    field_name varchar(255) NOT NULL default '',
    field_status char(2) NOT NULL default '',
    PRIMARY KEY (field_id)
    ) ENGINE=MyISAM;


    after this patch i have started getting error below

    1054 Unknown column 'field_required' in 'field list'
    in:
    [ SELECT field_id, field_name, field_required, field_status, use_url, field_url FROM customers_additional WHERE field_status = 1 ]
    The error message and the patch are suggesting that the database is out of sync with the files. The 'patch' alone will not (cannot) produce this error message, and if someone DOES tell you how to reverse the patch you will actually end up with *more* errors.

    You have 2 solutions.

    1. Complete the rest of the SQL upgrade patches (one of them will add the missing field(s). or
    2. Delete (revert back to the original) of any FILES that were installed as a part of the module that you installed that has given you this error.

    Cheers
    Rod

    ps. Please avoid posting the same question in multiple places. It annoys people. :)

 

 

Similar Threads

  1. Uninstall SQL Patch
    By CharInLasVegas in forum General Questions
    Replies: 12
    Last Post: 24 Aug 2011, 06:34 PM
  2. How Can I Uninstall This "show price with tax and without" SQL Patch?
    By marjankopi in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 7 May 2011, 12:44 PM
  3. uninstall SQL patch that's messed up my site
    By limelites in forum General Questions
    Replies: 29
    Last Post: 21 Dec 2010, 12:52 AM
  4. How do I uninstall this SQL Patch???
    By tsav87 in forum General Questions
    Replies: 0
    Last Post: 10 Sep 2010, 01:42 PM
  5. Need uninstall sql file for this mod
    By coucho in forum General Questions
    Replies: 5
    Last Post: 14 Jan 2008, 07:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg