[openstreetmap/openstreetmap-website] Rename database tables (Issue #5619)
Nenad Vujicic
notifications at github.com
Wed Feb 5 22:47:45 UTC 2025
> > So my proposal is to rename the tables to match the model names.
>
> Have you also evaluated the other way around, i.e. change the model names to match the db table names? Assuming that's feasible, that's significantly less risk and effort for anything non-Rails (planetdump-ng, osmdbt, cgimap, changeset replication).
Honestly, changing the model names seems like a much better option than altering the database table names in this case, as it improves readability. For example, `current_nodes` (with the model name Node vs CurrentNode) contains only the latest **(the current)** versions of nodes, while `nodes` (with the model name OldNode vs Node) includes **all** versions of node definitions. I believe this falls under the category of `naming things` (like #5539) and is highly subjective, so opinions will vary.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5619#issuecomment-2638208318
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/5619/2638208318 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250205/8bd92c3b/attachment-0001.htm>
More information about the rails-dev
mailing list