Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-36970

Database Constraint Checker has mismatched definitions for expected nullable and actual non-nullable

    XMLWordPrintable

Details

    Description

      This bug report relates to warnings logged by the Database Constraint Checker which was introduced in Confluence 5.7.

      Cause

      This particular warning occurs because there is a column in the database which should allow null values, but does not.

      This warning has been encountered on these columns:

      • follow_connections.follower
      • follow_connections.followee

      These warnings appear in the logs:

      Column [follower] of table [follow_connections] has mismatched definitions for expected [Column follow_connections.follower varchar(255) nullable] and actual [Column follow_connections.follower varchar(255) non-nullable]
      
      Column [followee] of table [follow_connections] has mismatched definitions for expected [Column follow_connections.followee varchar(255) nullable] and actual [Column follow_connections.followee varchar(255) non-nullable]
      

      Impact

      With a non-nullable column, null values are not permitted. Under normal circumstances, Confluence should not insert null values into these tables.

      However, if Confluence were to insert a null value into one of these tables (and the column is non-nullable), the insert statement would fail. Inserting a null value would have no operational impact on Confluence.

      Resolution

      In many cases these warnings can be ignored. Often, Confluence's code will also be null-safe, which means that it may never attempt to enter a null into these columns. However, there is always a risk of data becoming inconsistent through bugs or manual changes, and these constraints help to guard against that.

      To resolve these warnings, you will need to change the columns of the target table (in our case, follow_connections) and specify that each column displayed in the warnings (follower and followee in our case) to be nullable. The way you would achieve this varies across each database system, so refer to the official documentation for your database.

      Please feel free to contact Support for help with this.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dnorton@atlassian.com Dave Norton
              Votes:
              41 Vote for this issue
              Watchers:
              68 Start watching this issue

              Dates

                Created:
                Updated: