Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-13506

bb_label_mapping is missing a primary key constraint

XMLWordPrintable

      Issue Summary

      The bb_label_mapping table should have a primary key constraint on the id field. The downsides of not having a primary key constraint on the id field include:

      • accessing the table via id is slower as there is no index on the id field (which the primary key constraint includes)
      • it's possible for data invariants to be violated by inserting rows with duplicate ids

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Upgrade from Bitbucket prior to 5.12 to Bitbucket 5.12 or newer.

      Expected Results

      The bb_label_mapping table is created with a primary key constraint on the id field.

      Actual Results

      The bb_label_mapping table is created without a primary key constraint on the id field.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available.

              spetrucev Stefan
              spetrucev Stefan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: