Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-44721

Conversion fails when dropping column GB_GRADE_RECORD_T.EXCLUDED

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: OPEN
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 20.0
    • Fix Version/s: None
    • Component/s: Reference
    • Labels:
    • Environment:
      Docker:
      - mysql:5.7 (5.7.32)
      - mariadb:latest (10.5.8)
    • Conversion Script Required:
      Yes
    • Test Plan:
      Hide
      docker run -it --rm --name sakai-database  \
      	-p 3306:3306 \
      	-e MYSQL_ROOT_PASSWORD=secret  \
      	-e MYSQL_DATABASE=sakai  \
      	-e MYSQL_USER=sakai  \
      	-e MYSQL_PASSWORD=sakai  \
      	-v ${DB_ENTRYPOINT}:/docker-entrypoint-initdb.d:ro \
      	-v sakai20-database:/var/lib/mysql \
      	${DATABASE_IMAGE} `# specifiy image and version` \
      	--character-set-server=utf8mb4 \
      	--collation-server=utf8mb4_unicode_ci  \
      	--lower-case-table-names=1
      

      With $DB_ENTRYPOINT containing the path to a database dump from Sakai 19 or earlier and all migrations up to sakai_20-0_mysql_conversion.sql (the ascending alphabetical order is the execution order).
      $DATABASE_IMAGE being mysql:5.7, mysql:latest, mariadb:latest or similar.

      Show
      docker run -it --rm --name sakai-database \ -p 3306:3306 \ -e MYSQL_ROOT_PASSWORD=secret \ -e MYSQL_DATABASE=sakai \ -e MYSQL_USER=sakai \ -e MYSQL_PASSWORD=sakai \ -v ${DB_ENTRYPOINT}:/docker-entrypoint-initdb.d:ro \ -v sakai20-database:/var/lib/mysql \ ${DATABASE_IMAGE} ` # specifiy image and version` \ --character-set-server=utf8mb4 \ --collation-server=utf8mb4_unicode_ci \ --lower- case -table-names=1 With $DB_ENTRYPOINT containing the path to a database dump from Sakai 19 or earlier and all migrations up to sakai_20-0_mysql_conversion.sql (the ascending alphabetical order is the execution order). $DATABASE_IMAGE being mysql:5.7, mysql:latest, mariadb:latest or similar.

      Description

      2020-11-26 19:43:46+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/sakai_20-0_mysql_conversion.sql
      ERROR 1091 (42000) at line 155: Can't DROP 'EXCLUDED'; check that column/key exists

      The column `EXCLUDED` does not seem to exist at all and is not referenced in any prior migration according to `git grep`.

      An IF EXISTS would only work for newer mysql implementations (works in mariadb:latest but fails in mysql:5.7 and mysql:latest).
      So this line should probably be removed or - if really needed - wrapped into a procedure that is run on the condition that this column exists.

      This line also exists in the oracle conversion, but I don't know if it's also a problem there.

      The line was introduced in https://github.com/sakaiproject/sakai-reference/pull/86

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  stendler Maximilian Stendler
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:

                      Git Integration