CRM-12002 Rebuild triggers appears to miss change to allowing null on table field

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.8
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      I notice that on 4.2.8 dropping & recreating triggers left the field log_civicrm_line_item.label not allowing NULL (was this < v4.2.3) whereas the table civicrm_contribution.label does allow null - resulting in fatal errors to would be contributors

        Attachments

          Activity

          [CRM-12002] Rebuild triggers appears to miss change to allowing null on table field
          Eileen McNaughton added a comment -

          Actually this should probably be 4.3 as anyone on 4.2.7 or less with logging enabled will have embarrassing fatal errors on front end pages if they upgrade to 4.2.8 or 4.3. (turning logging off & on prior & after doesn't help)

          I have gone through all our 4.2.8 DBs & fixed the log_civicrm_line_items table

          Donald A. Lobo added a comment - - edited

          civicrm_contribution does not have a label field (i fixed the description)

          Not very sure how we'll go about fixing it. (where something changes from NULL to NOT NULL)

          The current, find schema differences basically just checks for the existence of new columns and ignores any other changes to existing columns (changing type / defaults etc)

          For this one, the easy fix might be to ensure that the archive table has no "NOT NULL" qualifiers (on creation) and drop that constraint similar to what we do with CURRENT_TIMESTAMP
          atin
          However this does not fix the current upgrade issue and i'm not sure of a good workaround (other than treating this as a special case in the upgrade script)

          Eileen McNaughton added a comment -

          "However this does not fix the current upgrade issue and i'm not sure of a good workaround (other than treating this as a special case in the upgrade script)"

          I think treating it as a special case in the upgrade script would be OK. Hopefully affected people identify the problem fairly quickly & fix it before their next upgrade as it leaves contribution pages broken for those affected.

            People

            • Assignee:
              Donald A. Lobo
              Reporter:
              Eileen McNaughton

              Dates

              • Created:
                Updated:
                Resolved: