Project

General

Profile

Bug #11339

parameter unique index migration should account for duplicate data

Added by Justin Sherrill almost 7 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Category:
DB migrations
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

20140805114754_add_unique_index_to_parameter.rb adds a unique migration but does not account for non-unique data. A previous bug related to host group cloning (we believe) led to a situation where duplicate data could be added to the db.


Related issues

Related to Foreman - Bug #6695: Adding two OS parameters with same name doesn't raise any error when values are differentClosed2014-07-20

Associated revisions

Revision fe501072 (diff)
Added by Justin Sherrill almost 7 years ago

Fixes #11339 - ensure unique parameters before adding uniq index

Revision 10a9a917 (diff)
Added by Justin Sherrill almost 7 years ago

Fixes #11339 - ensure unique parameters before adding uniq index

(cherry picked from commit fe5010723b86f26018fc7fb4ee054c734173b5a2)

History

#1 Updated by Justin Sherrill almost 7 years ago

Error in question:

PGError: ERROR: could not create unique index "index_parameters_on_type_and_reference_id_and_name"
DETAIL: Key (type, reference_id, name)=(GroupParameter, 2, kt_org) is
duplicated.

#2 Updated by The Foreman Bot almost 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2600 added
  • Pull request deleted ()

#3 Updated by Justin Sherrill almost 7 years ago

  • Bugzilla link set to 1213000

#4 Updated by Dominic Cleal almost 7 years ago

  • Related to Bug #6695: Adding two OS parameters with same name doesn't raise any error when values are different added

#5 Updated by Dominic Cleal almost 7 years ago

  • Legacy Backlogs Release (now unused) set to 72

#6 Updated by Justin Sherrill almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF