{"issue":{"state":"open","pull_request":{"diff_url":"https://github.com/mozilla/kuma/pull/48.diff","html_url":"https://github.com/mozilla/kuma/pull/48","patch_url":"https://github.com/mozilla/kuma/pull/48.patch"},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/2377f34a68801b861c3e54e1301f0dce?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2377f34a68801b861c3e54e1301f0dce","url":"https://api.github.com/users/lmorchard","login":"lmorchard","id":21687},"assignee":null,"updated_at":"2011-11-15T02:42:43Z","labels":[],"closed_at":null,"comments":2,"url":"https://api.github.com/repos/mozilla/kuma/issues/48","body":"Looks like `unique=true` was left out of the previous South migration for actioncounters. This commit adds it.\r\n\r\nHowever, that doesn't help the current situation. Doesn't seem like South has an easy way to add a new unique constraint, and especially not where there are already duplicates in the table.\r\n\r\nSo, there's also a schematic migration which deletes the duplicate rows and then adds the unique index to the table.\r\n\r\nI have one concern about this, and it's that the schematic migration may fail on a new install where the new South migration is run and the unique index gets correctly added. I'm not sure how to address that, or if it's a big deal.","html_url":"https://github.com/mozilla/kuma/issues/48","title":"700673 actioncounterunique","number":48,"id":2234638,"created_at":"2011-11-14T19:10:00Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/2377f34a68801b861c3e54e1301f0dce?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2377f34a68801b861c3e54e1301f0dce","url":"https://api.github.com/users/lmorchard","login":"lmorchard","id":21687},"updated_at":"2011-11-15T02:42:43Z","url":"https://api.github.com/repos/mozilla/kuma/issues/comments/2740200","body":"I'm not sure how you got that first unique key, but it's missing in production - that's the problem.\r\n\r\nI added it to the South migration, but that should have long since run on staging and production. I don't think this will create a duplicate on either\r\n","id":2740200,"created_at":"2011-11-15T02:42:43Z"}}