Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-3755 Merge the concepts of "Violation" and "Review" into "Issue"
  3. SONAR-4305

DB migration to migrate 'violations'/'reviews' tables to 'issues' table

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6
    • Component/s: Issues
    • Labels:
      None

      Description

      Migration process :

      • Truncate the table ISSUES and ISSUE_CHANGES if exist (reentrancy)
      • Remove duplicated rows in the REVIEWS table (see SONAR-3745) -> same RULE_FAILRE_PERMANENT_ID
      • Add and feed the ACTION_PLANS.KEE column
      • For each rule failure load the relating data from RULE_FAILURES, REVIEWS, REVIEW_COMMENTS, ACTION_PLANS_REVIEWS tables and insert some new rows in the ISSUES and ISSUE_CHANGES columns
        • For any violation
          • ISSUES.ISSUE_CREATION_DATE=ISSUES.CREATED_AT=RULE_FAILURES.CREATED_AT
          • ISSUES.UPDATED_AT=NOW
          • ISSUES.RULE_ID=RULE_FAILURES.RULE_ID
          • ISSUES.MESSAGE=RULE_FAILURES.MESSAGE
          • ISSUES.LINE=RULE_FAILURES.LINE
          • ISSUES.EFFORT_TO_FIX=RULE_FAILURE.COST
          • ISSUES.CHECKSUM=RULE_FAILURE.CHECKSUM
        • For any violation WITHOUT review :
          • ISSUES.STATUS=OPEN
          • ISSUES.ISSUE_UPDATE_DATE=RULE_FAILURES.CREATED_AT
          • ISSUES.SEVERITY=conversion of RULE_FAILURES.FAILURE_LEVEL
          • ISSUES.MANUAL_SEVERITY=false
        • For any violation WITH review :
          • ISSUES.ISSUE_UPDATE_DATE=REVIEWS.UPDATED_AT
          • ISSUES.STATUS=REVIEWS.STATUS
          • ISSUES.RESOLUTION=REVIEWS.RESOLUTION
          • ISSUES.REPORTER=REVIEWS.USER_ID
          • ISSUES.ASSIGNEE=REVIEWS.ASSIGNEE_ID
          • ISSUES.SEVERITY=REVIEWS.SEVERITY
          • ISSUES.MANUAL_SEVERITY=REVIEWS.MANUAL_SEVERITY
        • Quid ISSUES.AUTHOR_LOGIN (see RULE_FAILURES.PERSON_ID) ?
      • Drop the RULE_FAILURES, REVIEWS, REVIEW_COMMENTS, ACTION_PLANS_REVIEWS tables

        Attachments

          Activity

            People

            Assignee:
            simon.brandhof Simon Brandhof (Inactive)
            Reporter:
            freddy.mallet Freddy Mallet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: