Space import throws a constraint violation error on table "Label"

XMLWordPrintable

    • 10
    • Severity 3 - Minor
    • 2

      Issue Summary

      Sometimes, during space import in cloud instances, the below error occurred 
      ERROR: insert or update on table "label" violates foreign key constraint "fk_label_owner" Detail: Key (owner)=(8a6fc9e9688de83b016895efe5d70060) is not present in table "user_mapping".

      Steps to Reproduce

      1. Make sure that a user has a different user key in source and destination instance and user has added labels in destination instance for any page
      2. Export the space from source instance and 
      3. Import the space in destination instance 

      Expected Results

      Import should be successful

      Actual Results

       ERROR: insert or update on table "label" violates foreign key constraint "fk_label_owner" Detail: Key (owner)=(8a6fc9e9688de83b016895efe5d70060) is not present in table "user_mapping".

      Workaround

      Retry the import
      If retry doesn't work, Copy the user key from destination instance and replace with the user key in  in entities.xml that is causing the issue and reimport the space

            Assignee:
            Unassigned
            Reporter:
            Nitika Arora
            Votes:
            1 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: