Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Mar 2008
    Location
    Sweden
    Posts
    17
    Plugin Contributions
    0

    Default Problem with database upgrade v1.3.7 to 1.3.8

    When trying to upgrade from 1.3.7.1 to 1.3.8a i get the following error when the database upgrade from 1.3.7 to 1.3.8 is chosen and i press "Update database now" in the Database Upgrade setup page.


    1364 Field 'query_keys_list' doesn't have a default value
    in:
    [INSERT INTO query_builder (query_category, query_name, query_description , query_string) VALUES ('email,newsletters', 'Customers who have never completed a purchase', 'For sending newsletter to all customers who registered but have never completed a purchase', 'SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL');]



    How can i fix this? And yes, i have made backups ;)

    When i go back again after this error the page reports no upgrade is needed:
    Database Information -- Upgrade Sniffer predicts: *** No upgrade required ***

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    That entry looks to be for the newsletter subscribe add on and I do not know if they have a new sql for this or if one is needed

    Does it still work?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Mar 2008
    Location
    Sweden
    Posts
    17
    Plugin Contributions
    0

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    it don't seem to work..

    I get the following text when trying to access the shop:
    ICON_WARNING_ALT WARNING_DATABASE_VERSION_OUT_OF_DATE

    And i can't access the admin part at all..

    I guess the update from 1.3.7 to 1.3.8 of the database stopped at that error message and did not complete..

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    Quote Originally Posted by kobra View Post
    That entry looks to be for the newsletter subscribe add on and I do not know if they have a new sql for this or if one is needed
    Sorry, that's not correct.
    The query is a new record added as part of v1.3.8.
    .

    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.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    Quote Originally Posted by taz79 View Post
    When trying to upgrade from 1.3.7.1 to 1.3.8a i get the following error when the database upgrade from 1.3.7 to 1.3.8 is chosen and i press "Update database now" in the Database Upgrade setup page.


    1364 Field 'query_keys_list' doesn't have a default value
    in:
    [INSERT INTO query_builder (query_category, query_name, query_description , query_string) VALUES ('email,newsletters', 'Customers who have never completed a purchase', 'For sending newsletter to all customers who registered but have never completed a purchase', 'SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL');]



    How can i fix this? And yes, i have made backups ;)
    Edit /zc_install/sql/mysql_upgrade_zencart_137_to_138.sql
    Find this line:
    Code:
    INSERT INTO query_builder (query_category, query_name, query_description , query_string) VALUES ('email,newsletters', 'Customers who have never completed a purchase', 'For sending newsletter to all customers who registered but have never completed a purchase', 'SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN  TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL');
    Replace it with this:
    Code:
    INSERT INTO query_builder (query_category , query_name , query_description , query_string , query_keys_list ) VALUES ('email,newsletters', 'Customers who have never completed a purchase', 'For sending newsletter to all customers who registered but have never completed a purchase', 'SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN  TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL', '');
    Then run your 137-to-138 upgrade step again.
    .

    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
    Nov 2006
    Posts
    94
    Plugin Contributions
    0

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    Hi guys....

    My 1.37->1.38a upgrade went flawlessly, however, I did notice on *any* email function in admin, ie; tools >send email or tools > export email addrs, took a HUGE amount of time to return the page (1+min or so) I have something close to 6000 accounts in the DB. I have narrowed it down to this new query line added in the 1.3.8a upgrade. When I remove it from the query_builder table, everything is wonderfull, put back in the suggested change Dr. Byte left here, and back to slow as a slug...........

    Since I don't use either of these, and makes littel difference to me (for now) if I have this query in my table, any harm in leaving it out? or ??

    Zen 1.38a
    PHP 5.25
    MySql 5.0.45

    Thanks........

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    Quote Originally Posted by jerkynet View Post
    Hi guys....

    My 1.37->1.38a upgrade went flawlessly, however, I did notice on *any* email function in admin, ie; tools >send email or tools > export email addrs, took a HUGE amount of time to return the page (1+min or so) I have something close to 6000 accounts in the DB. I have narrowed it down to this new query line added in the 1.3.8a upgrade. When I remove it from the query_builder table, everything is wonderfull, put back in the suggested change Dr. Byte left here, and back to slow as a slug...........

    Since I don't use either of these, and makes littel difference to me (for now) if I have this query in my table, any harm in leaving it out? or ?
    If you edit the "query_category" field in that record of the database, and change 'email,newsletters' to just 'newsletters', it will only show up when composing a newsletter, instead of when sending emails.
    .

    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.

  8. #8
    Join Date
    Nov 2006
    Posts
    94
    Plugin Contributions
    0

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    Quote Originally Posted by DrByte View Post
    If you edit the "query_category" field in that record of the database, and change 'email,newsletters' to just 'newsletters', it will only show up when composing a newsletter, instead of when sending emails.
    Let me be clear on where I am.....

    I have replaced the upgrade.sql with the suggestion above in this thread. I now have tried this with your suggestion above, this was with *both* the variations of the sql above. As expected, pull email and that settles the problem for the admin->send emails. Leaves the problem on the export email addresses (only one I use).

    Bottom line to simplify my issue, is this query important to future upgrades, or can I just run without it? Without it, gets me doing what I need, but was concerned simply pulling this from the query_builder table, might cause an issue on future upgrades......

    Thanks!
    Dave

  9. #9
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    If it's a pain in your side, drop it.
    Upgrades won't hinge on it.
    .

    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.

  10. #10
    Join Date
    Nov 2006
    Posts
    94
    Plugin Contributions
    0

    Default Re: Problem with database upgrade v1.3.7 to 1.3.8

    Dropped...........after thinking this out, likely this this hinged to your "export emial addr" mod? Was just cruising that one to see if anything glared at me, but in the event I was unclear earlier, that mod is in play here.

    Thanks!
    Dave
    Quote Originally Posted by DrByte View Post
    If it's a pain in your side, drop it.
    Upgrades won't hinge on it.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Upgrading from v154 to v155a problem with database upgrade
    By rsrwus in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 13 May 2016, 02:28 AM
  2. Problem with database may as well upgrade?
    By pb4 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 18 May 2010, 01:07 PM
  3. problem with database upgrade
    By billt in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 14 Jan 2008, 10:39 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR