Uploaded image for project: 'ONE'
  1. ONE
  2. ONE-31898

Jira Backup creates tables without primary key causes the restore to crash

    XMLWordPrintable

Details

    • Yes
    • Tree
    • BigPicture, BigGantt
    • JIRA server
    • 104
    • 104
    • $i18n.getText("admin.common.words.hide")
      $i18n.getText("admin.common.words.show")
      var cfToHide1 = document.getElementById("rowForcustomfield_18501"); if(cfToHide1){cfToHide1.style.display="none";} var cfToHide2 = document.getElementById("rowForcustomfield_18502"); if(cfToHide2){cfToHide2.style.display="none";} var cfToHide3 = document.getElementById("rowForcustomfield_19700"); if(cfToHide3){cfToHide3.style.display="none";} var cfToHide4 = document.getElementById("rowForcustomfield_18400"); if(cfToHide4){cfToHide4.style.display="none";}
    • Sprint 2021/11
    • PI2021/4
    • Inevitable
    • Inevitable
    • 1 week, 3 hours, 26 minutes, 23 seconds
    • 8 weeks, 5 days, 11 hours, 43 minutes, 40 seconds
    • 0
    • 0
    • 42 minutes, 40 seconds
    • 8 hours, 36 minutes, 57 seconds
    • 5 weeks, 4 days, 1 hour, 20 minutes, 40 seconds

    Description

      Prerequisites:
      N/A

      Reproduction steps:

      1. Create the backup from Jira.
      2. Restore Jira from backup

      Actual result:

      Restore will be failed on tables t_core_task or t_core_field_val.

      Expected result:

      Restore will not failed on tables t_core_task or t_core_field_val
       
      Workaround:
      AO_0456E7_ - for BigPicture
      AO_8AC478_ - for BigGantt

      Option 1 - changes in the source database

      • PostgreSQL
        alter table "AO_8AC478_T_CORE_TASK" add primary key ("SURROGATE_ID");
        alter table "AO_8AC478_T_CORE_FIELD_VAL" drop constraint u_ao_8ac478_t_core_109484842;--unque constraint name on TECH_UNIQUENESS
        alter table "AO_8AC478_T_CORE_FIELD_VAL" add primary key ("TECH_UNIQUENESS");
        
      • MySQL
        alter table AO_8AC478_T_CORE_TASK add constraint primary key (SURROGATE_ID);
        alter table AO_8AC478_T_CORE_FIELD_VAL drop constraint u_ao_8ac478_t_core_109484842;--unque constraint name on TECH_UNIQUENESS
        alter table AO_8AC478_T_CORE_FIELD_VAL add constraint primary key (TECH_UNIQUENESS);
        

      Option 2 - changes in XML backup
      for AO_8AC478_T_CORE_FIELD_VAL, column TECH_UNIQUENESS, primaryKey="true"

        <table name="AO_8AC478_T_CORE_FIELD_VAL">
          <column name="CREATE_DATE" primaryKey="false" autoIncrement="false" sqlType="93" precision="29" scale="6"/>
          <column name="TASK_FIELD_DEF_ID" primaryKey="false" autoIncrement="false" sqlType="4" precision="10"/>
          <column name="TASK_ID" primaryKey="false" autoIncrement="false" sqlType="4" precision="10"/>
          <column name="TECH_UNIQUENESS" primaryKey="true" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="UPDATE_DATE" primaryKey="false" autoIncrement="false" sqlType="93" precision="29" scale="6"/>
          <column name="VALUE" primaryKey="false" autoIncrement="false" sqlType="12" precision="450"/>
        </table>
      

      for AO_8AC478_T_CORE_TASK, column SURROGATE_ID, primaryKey="true"

        <table name="AO_8AC478_T_CORE_TASK">
          <column name="CREATE_DATE" primaryKey="false" autoIncrement="false" sqlType="93" precision="29" scale="6"/>
          <column name="EXTPLATFORM_ID" primaryKey="false" autoIncrement="false" sqlType="4" precision="10"/>
          <column name="EXTPLATFORM_TASK_ID" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="SURROGATE_ID" primaryKey="true" autoIncrement="false" sqlType="4" precision="10"/>
          <column name="TASK_KEY" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="TECH_UNIQUENESS" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="UPDATE_DATE" primaryKey="false" autoIncrement="false" sqlType="93" precision="29" scale="6"/>
        </table>
      

      Attachments

        Activity

          People

            sebastian.janda Sebastian Janda
            albert.cieslak Albert Cieślak
            piotr.rozdeba Piotr Rozdeba , grzegorz.duzy Grzegorz Duży , rafal.zalewski Rafał Zalewski (Inactive) , monika.bialucha Monika Białucha , marta.gniadek Marta Gniadek (Inactive) , pawel.guz Pawel Guz , adam.biedruna Adam Biedruna , kamila.kornatko Kamila Kornatko , lukasz.michalak Łukasz Michalak , piotr.zadora Piotr Zadora , mateusz.solowianiuk Mateusz Sołowianiuk , katarzyna.rajchert Katarzyna Rajchert , sebastian.janda Sebastian Janda , jakub.zygmunt Jakub Zygmunt , maciej.bukrewicz Maciej Bukrewicz (Inactive) , dariusz.dudek Dariusz Dudek , kamil.sus Kamil Sus , anna.kicior Anna Kicior , system.gerrit Gerrit , aneta.wojcik Aneta Wójcik , martyna.turowska Martyna Turowska , evgeny.frolov Evgeny Frolov (Inactive) , marcin.koman Marcin Koman , albert.cieslak Albert Cieślak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: