• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Database error - Update ID:236

Scheduled Pinned Locked Moved Solved
FOG Problems
2
9
1.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    sapeurorca
    last edited by Jan 16, 2017, 8:56 AM

    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

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jan 17, 2017, 12:53 PM

      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.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 1
      • T
        Tom Elliott
        last edited by Jan 16, 2017, 12:57 PM

        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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • S
          sapeurorca
          last edited by Jan 16, 2017, 2:10 PM

          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?

          1 Reply Last reply Reply Quote 0
          • S
            sapeurorca
            last edited by sapeurorca Jan 17, 2017, 1:02 AM Jan 17, 2017, 7:00 AM

            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.

            1 Reply Last reply Reply Quote 0
            • T
              Tom Elliott
              last edited by Jan 17, 2017, 11:22 AM

              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.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • T
                Tom Elliott
                last edited by Jan 17, 2017, 11:38 AM

                Please post the contents of mysql:

                describe table imageGroupAssoc

                Please.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • S
                  sapeurorca
                  last edited by Jan 17, 2017, 12:17 PM

                  hello,
                  Now fog it is in 1.3.1.

                  mysql> describe table imageGroupAssoc
                  ->

                  T 1 Reply Last reply Jan 17, 2017, 12:19 PM Reply Quote 0
                  • T
                    Tom Elliott @sapeurorca
                    last edited by Jan 17, 2017, 12:19 PM

                    @sapeurorca Trying to hit you on chat.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 0
                    • T
                      Tom Elliott
                      last edited by Jan 17, 2017, 12:53 PM

                      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.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      1 / 1
                      • First post
                        1/9
                        Last post

                      213

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project