Uploaded image for project: 'Opencast'
  1. MH-10973

Inconsistency between MySQL DDL and MySQL upgrade script

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed and reviewed
    • Affects versions: 2.0.0
    • Fix versions: 2.0.0
    • Components: Backend Software
    • Labels:
      None
    • Severity:
      Incorrect Documentation
    • Steps to reproduce:
      Hide
      While transfering the MySQL DDL (https://bitbucket.org/opencast-community/matterhorn/src/564c1f251d525b67f600e7fe244edd422bf170f2/docs/scripts/ddl/mysql5.sql?at=r%2F2.0.x) and Upgrade Script (https://bitbucket.org/opencast-community/matterhorn/src/564c1f251d525b67f600e7fe244edd422bf170f2/docs/upgrade/1.6_to_2.0/mysql5.sql?at=r/2.0.x) to Postgres, I noticed several inconsistencies:

      -------------------------------------------------

      1. The mh_search table changes from 1.6 to 2.0. This is not reflected in the upgrade script.
      You should add

      ALTER TABLE mh_search
      ADD COLUMN "series_id" VARCHAR(128) AFTER "id",

      to the upgrade script

      -------------------------------------------------

      2. The columns of the mh_user_settings table are not equal between the DDL and the upgrade script:

      The DDL says:
      CREATE TABLE mh_user_settings (
      [...]
        username varchar(128) NOT NULL,
        organization varchar(128) NOT NULL,
      [...]

      But the upgrade script says:
      CREATE TABLE mh_user_settings (
      [...]
        username varchar(128) DEFAULT NULL,
        organization varchar(128) DEFAULT NULL,
      [...]

      -------------------------------------------------

      3. The Upgrade script introduces a change to the mh_organization_property table:

      ALTER TABLE mh_organization_property MODIFY value TEXT(65535);

      This change is not reflected in the DDL:

      CREATE TABLE mh_organization_property (
      [...]
        value VARCHAR(255),
      [...]

      Show
      While transfering the MySQL DDL ( https://bitbucket.org/opencast-community/matterhorn/src/564c1f251d525b67f600e7fe244edd422bf170f2/docs/scripts/ddl/mysql5.sql?at=r%2F2.0.x ) and Upgrade Script ( https://bitbucket.org/opencast-community/matterhorn/src/564c1f251d525b67f600e7fe244edd422bf170f2/docs/upgrade/1.6_to_2.0/mysql5.sql?at=r/2.0.x ) to Postgres, I noticed several inconsistencies: ------------------------------------------------- 1. The mh_search table changes from 1.6 to 2.0. This is not reflected in the upgrade script. You should add ALTER TABLE mh_search ADD COLUMN "series_id" VARCHAR(128) AFTER "id", to the upgrade script ------------------------------------------------- 2. The columns of the mh_user_settings table are not equal between the DDL and the upgrade script: The DDL says: CREATE TABLE mh_user_settings ( [...]   username varchar(128) NOT NULL,   organization varchar(128) NOT NULL, [...] But the upgrade script says: CREATE TABLE mh_user_settings ( [...]   username varchar(128) DEFAULT NULL,   organization varchar(128) DEFAULT NULL, [...] ------------------------------------------------- 3. The Upgrade script introduces a change to the mh_organization_property table: ALTER TABLE mh_organization_property MODIFY value TEXT(65535); This change is not reflected in the DDL: CREATE TABLE mh_organization_property ( [...]   value VARCHAR(255), [...]
    • Tags (folksonomy):

      TestRail: Results

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                lrohner Lukas Rohner
                Reporter:
                abias Alexander Bias
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  TestRail: Cases