Uploaded image for project: 'mod-finance-storage'
  1. mod-finance-storage
  2. MODFISTO-83

Migration script improvement to support transition of non-unique index to unique one

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 4.2.0
    • ACQ Sprint 82, ACQ Sprint 83, ACQ Sprint 84
    • 2
    • Thunderjet

    Description

      Initially issue comes from Q3.2 ->Q4 data migration for budget@name:

      POST request for mod-finance-storage-4.1.1 /_/tenant failed with [ " CREATE UNIQUE INDEX IF NOT EXISTS budget_name_idx_unique ON diku_mod_finance_storage.budget ( lower(f_unaccent(jsonb->>'name')) ) ;" ]
      

      This happens because unique index was introduced for initially non-unique field:

      ERROR:  could not create unique index “budget_name_idx_unique”
      DETAIL:  Key (lower(f_unaccent(jsonb ->> ‘name’::text)))=(gifts-one-time-fy19) is duplicated.
      SQL state: 23505.
      

      One need to improve migration script to rename duplicates when migrate from non-unique indexes to unique one for budget@name.

      Acceptance Criteria:
      1) Common mechanism to migrate non-unique values to unique ones implemented and documented (https://wiki.folio.org/display/FOLIJET/Spike%3A+Investigate+data+migration+strategies)
      2) Q3.2 ->Q4 data migration for budget@name fixed

      TestRail: Results

        Attachments

          1. screenshot-1.png
            screenshot-1.png
            76 kB
          2. screenshot-2.png
            screenshot-2.png
            74 kB
          3. screenshot-3.png
            screenshot-3.png
            12 kB
          4. screenshot-4.png
            screenshot-4.png
            6 kB
          5. screenshot-5.png
            screenshot-5.png
            6 kB

          Issue Links

            Activity

              People

                cmcnally Craig McNally
                khandramai Viachaslau Khandramai
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases