[openstreetmap/openstreetmap-website] Use the db:seed task to load languages (#2864)

Andy Allan notifications at github.com
Wed Sep 30 13:44:48 UTC 2020


I'm sure that it does, but I'm not entirely sure that it should! 

Most developers wouldn't expect seed data to be added as a side effect of the migrations, and wouldn't rely on it either. It starts getting more complex/flakey when setting up the database with e.g. `db:structure:load`, which of course only has the structure and not this language data. I think it's best to have it in the seeds file, where it belongs. But I'm happy to leave the migration stuff untouched.

As implemented I don't foresee any problems, since Language.load can be run multiple times without errors.

-- 
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/pull/2864#issuecomment-701400168
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200930/2efa120d/attachment.htm>


More information about the rails-dev mailing list