Bottom
Upgrade Error
  • Posted: 12.12.2004, 09:20
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    I just tried to upgrade to the latest version of Weather Module and I got the following error:

    _CREATETABLEFAILED table : nuke_wthr_cache error : You have an error in your SQL syntax near 'varchar(20) DEFAULT '' NOT NULL, nuke_wthr_cache.pressure varchar(20) DEFAULT ' at line 12

    How do I correct this??

    Thanks in advance.
  • Posted: 12.12.2004, 09:51
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    Hello,
    unfortunately I am aware of the problem but there was no "clean" way to modify the 1.33 release to handle your case.
    Your problem is that your mysql version doesn't like a database field with "real" as name and unfortunately this was not a problem in previous mysql version so the previous developper choose to have a 'real" field in the cache table.
    If you have not too many country packages loaded and if you accept that your users loose their weather preferences an easy solution is to remove the weather module entirely regenerate the module list, initialize and activate, the problem would be solved.
    But if you want to keep your installed cities and if you don't want your users to loose their weather preferences it is possible to solve the problem but it will require to edit the pninit.php file and use phpmyadmin to change some records in the database. For that I need to know :
    - from what version of the weather module you were trying to upgrade
    - is there still a nuke_wthr_cache in your database or was it deleted during the aborted upgrade attempt ?
    - what version is now listed for your weather module (has it changed during the aborted upgrade ?)
    of course the solution to remove and re-initialyze is a lot easier !!

    NOTE TO OTHER USERS : As I don't want this to happend to a lot of people, I changed the way pninit.php is handling the upgrade from 1.30 and 1.31, it now delete the cache table at each step and re-create it with a flike field. So this shouldn't happend anymore. I changed the zipfile in the download section of this site and Olivier should do the same very soon on keopsonline. The consequence is that I needed to change 1.30 -> 1.31 and 1.31->1.32 upgrades contained in this release. But after some thinking, I am pretty sure this will not have any adverse effect.
  • Posted: 12.12.2004, 21:33
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Cool. I have done a full new install and all working fine.
    I noticed that the Australian cities are far from complete as yet and I have been sorting them out from the lists you gave me a while ago.
    Can I just overwrite the existing city files that are in use with updated ones? Or do I need to now install each new city one by one from the admin panel?
  • Posted: 12.12.2004, 22:00
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    If you have a datafile more complete than the one included, you can replace the file in modules/weather/data with a new one and choose one of the 2 ways to update your database if this country is already installed :
    - either uninstall the package for that country and install again
    - or change the line $city_version = x.x; in the datafile increasing the number x.x (for instance change 1.0 to 1.1 or 1.1 to 1.2) and install the package without uninstalling it.
    In any case if you have some updated packages for Australia, don't forget to send them to me so that other users can benefit from your work.
  • Posted: 12.12.2004, 22:11
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    OK.. I tyested this by changing the version to 1.1 and uploading the new data file.
    But the new cities do not appear in the list...
    Any ideas?
  • Posted: 12.12.2004, 22:13
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Thats was me too.. I forgot to add a username icon_rolleyes
    OK.. So I missed the part of installing the city package after upgrade...
    But when I try to do this, I get the following error:
    Error updating information in database INSERT INTO nuke_wthr_city (nuke_wthr_city.accid, nuke_wthr_city.city_title, nuke_wthr_city.subdiv_id) VALUES ('ASXX0002', 'Alice Springs', '124')
  • Posted: 12.12.2004, 22:34
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Hmmmm
    Now after that error, the Queensland cities are not showing in the lists at all... icon_rolleyes
  • Posted: 12.12.2004, 23:13
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    Can you please send me the 1.1 package so that I can make some tests. The upgrade function for country datafile was tested and it appear to work but this an area of the module hat was not really used by a lot of people so maybe there is a problem and you will permit to debug it.
    The unfortunate thing is that you will have to :
    1)first suppress all australian packages in the module administration
    2) use phpmyadmin to delete all records whose ACCID begin with ASXX from your nuke_wthr_city table (these are the records left over by the aborted package install
    3)reinstall all australian packages again
    to correct the problem (I know that for sure, I did it quite a lot of times debugging this part of the module !!)

    BEFORE INSTALLING YOUR MODIFIED AUSTRALIAN PACKAGES VERIFY THAT THERE IS NOT 2 CITIES WITH THE SAME ACCID IN 2 DIFFERENTS PACKAGES (OR OF COURSE IN THE SAME PACKAGE AT 2 DIFFERENTS PLACES !!) IF THIS IS THE CASE YOUR PUNISHMENT WILL BE THAT YOU WILL HAVE TO REDO ALL THE ABOVE PROCEDURE AGAIN icon_evil icon_evil
  • Posted: 13.12.2004, 02:44
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Have emailed the file to you.
  • Posted: 13.12.2004, 04:09
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Ahh My Bad....
    I actually had Alice Springs in the queensland data file when it should have been in the norther territory data file (and was already installed).

    I shall continue to add the other cities and send them all to you when finished.

    Cheers
    Paul
Quick reply
 
  • Options
Code:
Font color:  
Font size: