[openstreetmap/openstreetmap-website] Models in migrations (#2320)
Andy Allan
notifications at github.com
Wed Jul 17 10:48:48 UTC 2019
> Frankly I'm astonished that those minimal models even work - some of our migrations do pretty extreme things and I'm surprised none of them are relying on the details of the models.
>
> I rather suspect that maybe they only work with an empty database, and that some of the ones that try and mutate existing data might fail if there was any data to change?
Oh almost certainly. But to be honest I'm not going to spend any time on that. If the migrations now work for an empty database, and are more robust to future changes, so much the better.
>From a broader perspective, we should really ditch our old migrations. I'd be happy replacing everything before e.g. 2017 with one migration called "2017010101_current_structure" since they are full of dodgy stuff regarding segments and c extensions and whatnot that literally nobody needs to use in 2019. If anyone is truly interested in how they worked, then there's a git history. Otherwise we need to keep maintaining them for no gain.
--
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/2320#issuecomment-512203521
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190717/18a8dfcf/attachment.html>
More information about the rails-dev
mailing list