<p></p>
<blockquote>
<p>My recommendation for the time being would be to introduce an additional column for the import via plain old Postgresql command line tools:</p>
<p>On psql, execute alter table users add column nearby integer default 50;<br>
Run osmosis osm api db import<br>
Again on psql execute: alter table users drop column nearby;</p>
<p>That would allow you to run osmosis as is, and avoids any additional trouble for production. Also, we don't need any Rails db migration. Trying to keep this simple.<br>
We could add this as a hint in <a href="https://github.com/openstreetmap/openstreetmap-website/blob/34dd2293db85e28b7e5df0889b0b778a685306bb/CONFIGURE.md#populating-the-database">https://github.com/openstreetmap/openstreetmap-website/blob/34dd2293db85e28b7e5df0889b0b778a685306bb/CONFIGURE.md#populating-the-database</a>, mentioning that osmosis doesn't reflect the latest db schema changes.</p>
</blockquote>
<p>I've done this and didn't figure out the error "Unable to insert user with id = -1 into the database." when import a geofabrik data into local osm website database.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2543#issuecomment-599256163">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJNJXKMW7ZP6LARSEDRHUWY7ANCNFSM4KXJGQTQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLPEH6FSLWQEIMVMPBLRHUWY7A5CNFSM4KXJGQT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEO36YYY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2543#issuecomment-599256163",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2543#issuecomment-599256163",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>