Continuing with the work outlined in this document, we want our inserts to be idempotent and failure resilient, so that any errors that occur during database creation don't break the process completely. One minor change that will be needed to accomplish this is making the insertValueSet function use an UPSERT rather than a true INSERT, so that if duplicate values are created during valueset initialization the DB migration can continue. Follow the syntax here to modify this function to use an INSERT … ON CONFLICT pattern to resolve any duplications in the uniquely identifying OID + Version number field.
Continuing with the work outlined in this document, we want our inserts to be idempotent and failure resilient, so that any errors that occur during database creation don't break the process completely. One minor change that will be needed to accomplish this is making the
insertValueSet
function use anUPSERT
rather than a trueINSERT
, so that if duplicate values are created during valueset initialization the DB migration can continue. Follow the syntax here to modify this function to use anINSERT … ON CONFLICT
pattern to resolve any duplications in the uniquely identifying OID + Version number field.