<p></p>
<p>We should have a way to separate out two concepts:</p>
<ul>
<li>The first is seed data, as defined in most of the documentation that I can find, meaning data that you will want in the database on any/all deployments. The usual example is a list of states or countries, and in our context that would include the languages table I guess. I would maybe put an iD editor registration in there, but not development data.</li>
<li>The second is "development data", like this PR covers. The kind of stuff that shouldn't appear in a production database. I'm wary of putting this in seeds.rb without at least an <code>environment</code> guard.</li>
</ul>
<p>For the development data, I would like to see this myself! Adding stuff to an empty database is no fun for new developers. But:</p>
<ul>
<li>It should be idempotent. When you add the next thing (e.g. traces) and I re-run it, I don't want to see more and more diary entries every time I run the script.</li>
<li>I would consider using FactoryBot to generate the data, as we use for the tests, along with something like Faker to generate the boilerplate.</li>
<li>We should consider making this a separate rake task, to isolate it from the db:seed functionality entirely.</li>
</ul>
<p>I wrote all that, and then I found these posts which probably explain it better than me!</p>
<ul>
<li><a href="https://medium.com/@henrytabimagiraldo_41792/stop-using-the-seed-file-to-populate-your-dev-data-in-rails-bb241130c7da" rel="nofollow">https://medium.com/@henrytabimagiraldo_41792/stop-using-the-seed-file-to-populate-your-dev-data-in-rails-bb241130c7da</a></li>
<li><a href="https://thoughtbot.com/blog/priming-the-pump" rel="nofollow">https://thoughtbot.com/blog/priming-the-pump</a></li>
</ul>

<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/pull/3030#issuecomment-755458958">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLQMJVSKQ5W4RENVNLSYSP5HANCNFSM4VRIV36Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLOPOYNYCCSD525VOG3SYSP5HA5CNFSM4VRIV362YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFUDWHDQ.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/pull/3030#issuecomment-755458958",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3030#issuecomment-755458958",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>