Add unique constraint to `software_licenses.name` column.
The following discussion from !19598 (merged) should be addressed:
-
@mbobin started a discussion: (+4 comments) safe_find_or_create_by!requires a unique index onnameto work and it seems that we don't have it.
Additional information:
safe_find_or_create_by is used to create a new software license record using the name as the unique identifier for the record. However, the software_licenses.name column does not have a unique constraint.
Implementation Plan
Backend - Done @xlgmokha
-
Check if we have any name collisions in any of our environments. -
Check to see if it is safe to add a unique constraint to the software_licenses.namecolumn without disruption.
Documentation - person
-
User Documentation (is this needed?)
Edited by mo khan