Database error - Update ID:236



  • Server
    • FOG Version: 1.2.0 => 1.3.1
    • OS: Ubuntu 16.04 server
    Client
    • Service Version:
    • OS:
    Description

    Hello,

    Error when database is updated/installed.

    Update ID: 236

    Database Error:
    Failed to query: Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘igaPrimary’ in 'imageGroupAssoc’
    Variable contains:
    Array
    ( [0] => [1] => ALTER TABLE imageGroupAssoc CHANGE igaPrimary igaPrimary ENUM(‘0’,‘1’) NOT NULL [2] => ALTER TABLE snapinGroupAssoc CHANGE sgaPrimary sgaPrimary ENUM(‘0’,‘1’) NOT NULL
    )
    Database SQL:
    ALTER TABLE imageGroupAssoc CHANGE igaPrimary igaPrimary ENUM(‘0’,‘1’) NOT NULL


  • Senior Developer

    For all to see and understand what’s happening.

    1.3.0 had some strangeness I was unaware of. This things were:

    1. It had no error reporting on schema updates.
    2. Because of no error reporting, even a bad schema (bad sql) would appear as if all ran ok.

    1.3.1 corrected these issues. Apparently at schema version point 136 and 140 there was an issue in creating the primary fields. These two schema versions handled the creation of imageGroupAssoc and snapinGroupAssoc.

    These issues have been corrected for in 1.3.1 (and are of course present in 1.3.2). If you’re running into these issues, please open mysql and run:

    ALTER TABLE `fog`.`imageGroupAssoc` ADD COLUMN `igaPrimary` ENUM('0','1') NOT NULL;
    ALTER TABLE `fog`.`snapinGroupAssoc` ADD COLUMN `sgaPrimary` ENUM('0','1') NOT NULL;
    

    This would only pose a problem for those that were running on trunk builds that had a schema after these points. If either of them error on the command line (or in phpMyAdmin if that’s what you’re using) please just let me know. If you’re getting the Database ID 236 issue though, I’m pretty sure at the least the alter table of the igaPrimary above will work without any errors.


  • Senior Developer

    @sapeurorca Trying to hit you on chat.



  • hello,
    Now fog it is in 1.3.1.

    mysql> describe table imageGroupAssoc
    ->


  • Senior Developer

    Please post the contents of mysql:

    describe table imageGroupAssoc

    Please.


  • Senior Developer

    So I just installed FOG 1.2.0 “fresh” and then told it to update to 1.3.2.

    I did not see the issue in regards to ID 236. I’m going to guess you may have been on a trunk version of fog? That or mysql is doing things fast, but php is passing it info even faster.

    I don’t know what’s causing this, but if you can replicate would you mind hitting me up in chat? I’d really prefer to take a look at the database before upgrade so I might be able to figure out what’s causing this.

    I, myself, cannot replicate. 1.2.0 -> 1.3.0 works. 1.2.0 -> 1.3.1 works. 1.2.0 -> 1.3.2 works.



  • I went directly from V1.2.0 to V1.3.1, and i had an error of database.
    Following your remark I tried to install the V1.3.0 and I installed the V1.3.1 and now the V1.3.2.
    Installation is OK.

    Thank you for your help.



  • I was on Ubuntu 13.10 and Fog 1.2.0. I updated Ubuntu in 16.04 and then I updated Fog in 1.3.1.
    Now that Fog is in 1.3.1, how can I fix the error?


  • Senior Developer

    Are you sure you’re upgrading from 1.2.0?

    1.2.0 would not have worked on Ubuntu 16.04 unless you knew what to change for PHP 7.

    This seems to be more like an upgrade issue from one of the trunk releases (pre RC maybe) of 1.3.0 then an upgrade to 1.3.1.


Log in to reply
 

448
Online

38931
Users

10694
Topics

101468
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.