Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9861

Re-enabling logging should keep logs and upgrade schema on existing tables

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      The new logging mechanism with triggers is a requirement for an installation I run. When I upgraded to 4.1.1, the schema of the log tables was not updated so I disabled and re-enabled logging to try and fix the problem (as I had read that existing tables wouldn't be dropped). Instead my log tables were dropped and there was no easy way to upgrade my existing log tables.

      The code already supported comparing schemas so I removed the DROP TABLE command and fixed it to create or upgrade existing log tables when re-enabling logging. Attached is a patch for 4.1.1.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              mnoorenberghe Matt N.
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified