Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2650

Large form templates crash the liquibase upgrade

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9 Road Map Sprint 4
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Medium

      Description

      Ah, I figured it out.

      In MySQL, a BLOB column maxes out at 65,535 bytes. The template property on Form#15 is 67,389 bytes long. In Oracle, the default size for a blob is (I think) 4GB. PostgreSQL barely supports BLOB; they use an apparently infinite-length BYTEA. I guess I should use a <modifySql> block to change BLOB to MEDIUMBLOB for MySQL.

      Since 1.9 isn't out yet, I assume making this change in the original changeset is okay ... besides, the subsequent changeset will not run properly if a resource is over the size limit. Right?

      Jeremy Keiper
      OpenMRS Core Developer
      AMPATH / IU-Kenya Support

      On Thu, Sep 8, 2011 at 4:40 PM, Jeremy Keiper <jeremy@openmrs.org> wrote:
      Now I get the same error as Michael:

      Unable to update the database. See server error logs for the full stacktrace.
      There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::201103152243-b::jkeiper:
      Reason: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.CustomChangeException: Unable to copy form metadata to form attributes table:
      Caused By: liquibase.exception.CustomChangeException: Unable to copy form metadata to form attributes table:
      Caused By: Unable to copy form metadata to form attributes table:
      Caused By: Data truncation: Data too long for column 'value' at row 1

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sunbiz Saptarshi Purkayastha
                Reporter:
                michael Michael Downey
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: