[openstreetmap/openstreetmap-website] ERROR: column "nearby" of relation "users" (#2449)

Matt Amos notifications at github.com
Thu Jun 18 13:50:52 UTC 2020


> On my end, still trying to resolve:
> > ERROR: duplicate key value violates unique constraint "users_display_name_idx"

Unfortunately, it seems that loading an extract into a Rails-schema database isn't on a happy path because it isn't something anyone does very frequently. On the downside, this means you're likely to encounter problems, but on the upside you're a pioneer! :wink:

I'm not aware of any better tool than Osmosis to do this, sorry (even taking into account the high likelihood of encountering further problems).

The first item of advice in the mailing list post you referenced is the one I would take if I wanted to load an extract: drop the table constraint, load the data, then repair the data so that the `display_name` fields are unique (e.g: `update users set display_name = 'user_' || id where display_name = ` {whatever the duplicate value is}), then re-create the table constraint so that Rails is happy.

Hope that helps!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2449#issuecomment-646029571
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200618/ea75d5fe/attachment.htm>


More information about the rails-dev mailing list