[openstreetmap/openstreetmap-website] Add moderation zones where anonymous notes are not allowed (PR #6713)
Andy Allan
notifications at github.com
Thu Feb 5 13:54:09 UTC 2026
@gravitystorm commented on this pull request.
> @@ -0,0 +1,40 @@
+# frozen_string_literal: true
+
+# == Schema Information
+#
+# Table name: moderation_zones
+#
+# id :bigint not null, primary key
+# name :string not null
+# reason :string not null
+# reason_format :enum default("markdown")
+# zone :st_geometry not null, geometry, 0
> I don't think I have much choice here, as it's automatically generated.
I've just checked, and the migration syntax supports adding `srid: 4326`
> However: doesn't 4326 imply geography?
No, the geometry vs geography stuff ("straight lines vs great circles" or Cartesian vs Spherical coords) is separate from the projection stuff ("what exactly does 10.7, 5.0 mean"). But the question is only whether we want a srid of 0 ("unknown") or 4326 (lat/lon roughly speaking). Using 0 is often OK but can cause issues if we do more complex things in future, so perhaps we should stick with 4326.
One final note - do we want to constrain the types of objects in the table? At the moment we have "geometry", which supports all the postgis types (e.g. point, linestring, polygon and their multi- variants). Should we make this instead a POLYGON (or MULTIPOLYGON?) column? @pnorman any thoughts?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6713#discussion_r2769305854
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6713/review/3757276615 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260205/bf8047e0/attachment-0001.htm>
More information about the rails-dev
mailing list