Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20673

Database check shows eznode_assignment error after 5.1 upgrade

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.1.0beta1
    • Component/s: Upgrading
    • Labels:
      None
    • Environment:

      RHEL 6.4
      PHP: 5.3.3
      Mysql: 5.1.61

      Description

      After upgrading a ezp5.0 (ezflow) to ezp5.1 the following error is present in upgrade database check

      Mysql:

      The database is not consistent with the distribution database.
      To synchronize your database with the distribution setup, run the following SQL commands:
      ALTER TABLE eznode_assignment CHANGE COLUMN remote_id remote_id varchar(100) NOT NULL DEFAULT '0';
      

      Postgres:

      ALTER TABLE eznode_assignment RENAME COLUMN remote_id TO remote_id_tmp;
      ALTER TABLE eznode_assignment ADD COLUMN remote_id character varying(100);
      ALTER TABLE eznode_assignment ALTER remote_id SET DEFAULT '0'::character varying ;
      ALTER TABLE eznode_assignment ALTER remote_id SET NOT NULL ;
      UPDATE eznode_assignment SET remote_id=remote_id_tmp;
      ALTER TABLE eznode_assignment DROP COLUMN remote_id_tmp;
      

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment - - edited

          Reopening, I missed the error concerning eznode_assignment when closing this as a dupe of EZP-20000

          I removed the referrences to ez_ct_* tables in this bug report ( covered by EZP-20000

          Show
          Vidar Langseid added a comment - - edited Reopening, I missed the error concerning eznode_assignment when closing this as a dupe of EZP-20000 I removed the referrences to ez_ct_* tables in this bug report ( covered by EZP-20000
          Hide
          Vidar Langseid added a comment - - edited

          I investigated this a bit...

          in 5.1 it turns out that kernel/sql/schema.sql is not in sync with share/db_schema.dba

          in 5.1 kernel/sql/schema.sql

          CREATE TABLE eznode_assignment (
          (....)
            remote_id int(11) NOT NULL default '0',
          

          in 5.1 share/db_schema.dba

             'eznode_assignment' =>
             (....)
                array (
                  'length' => 100,
                  'type' => 'varchar',
                  'not_null' => '1',
                  'default' => 0,
                ),
          

          So, it means that a 5.1 (pre rc1) database is different, dependent on whatever it was initialized with .dba or .sql

          In 5.0, the mentioned column is a int.. What is it supposed to be in 5.1 ?

          Show
          Vidar Langseid added a comment - - edited I investigated this a bit... in 5.1 it turns out that kernel/sql/schema.sql is not in sync with share/db_schema.dba in 5.1 kernel/sql/schema.sql CREATE TABLE eznode_assignment ( (....) remote_id int(11) NOT NULL default '0', in 5.1 share/db_schema.dba 'eznode_assignment' => (....) array ( 'length' => 100, 'type' => 'varchar', 'not_null' => '1', 'default' => 0, ), So, it means that a 5.1 (pre rc1) database is different, dependent on whatever it was initialized with .dba or .sql In 5.0, the mentioned column is a int.. What is it supposed to be in 5.1 ?
          Hide
          Vidar Langseid added a comment -

          If the column is supposed to be changed from 5.0 to 5.1, the upgrade sql needs to be updated too

          Show
          Vidar Langseid added a comment - If the column is supposed to be changed from 5.0 to 5.1, the upgrade sql needs to be updated too
          Show
          Petar Spanja (Inactive) added a comment - Pull request: https://github.com/ezsystems/ezpublish-legacy/pull/622
          Show
          Petar Spanja (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-legacy/commit/61e7f3b5a9c55b160aa751f385ece3e901895bb9
          Hide
          Petar Spanja (Inactive) added a comment -
          Show
          Petar Spanja (Inactive) added a comment - Missing semicolon fixed in ezpublish-legacy/master: https://github.com/ezsystems/ezpublish-legacy/commit/3afe75b19a37b9bc0f724278175716446fc1f179
          Hide
          Joao Pingo (Inactive) added a comment -

          Tested using Upgrade 5.1 testplan in mysql, postgres and dfsmysql
          All tests passed ... QA done!

          Show
          Joao Pingo (Inactive) added a comment - Tested using Upgrade 5.1 testplan in mysql, postgres and dfsmysql All tests passed ... QA done!

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Pingo (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 2 hours, 30 minutes
                3d 2h 30m