[openstreetmap/openstreetmap-website] Moderation zones must have `ends_at`, consistent with user blocks (PR #7213)

Pablo Brasero notifications at github.com
Mon Jul 6 15:18:31 UTC 2026


Back at https://github.com/openstreetmap/openstreetmap-website/pull/6713, I introduced Moderation Zones, which in terms of table shape were modeled after User Blocks. However I failed to have `ends_at` be `NOT NULL`. This PR intends to fix that.

This is split from https://github.com/openstreetmap/openstreetmap-website/pull/7148, as it is separate enough from the rest and there were a couple of specific questions about it.

As for the migration split in two, this is as recommended by strong_migrations when [setting NOT NULL on an existing column](https://github.com/ankane/strong_migrations#setting-not-null-on-an-existing-column).
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/7213

-- Commit Summary --

  * Moderation zones must have `ends_at`, consistent with user blocks

-- File Changes --

    M app/models/moderation_zone.rb (3)
    A db/migrate/20260604103822_tweak_moderation_zones_step_one.rb (7)
    A db/migrate/20260604105008_tweak_moderation_zones_step_two.rb (18)
    M db/structure.sql (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/7213.patch
https://github.com/openstreetmap/openstreetmap-website/pull/7213.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7213
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7213 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260706/5c96b1ec/attachment.htm>


More information about the rails-dev mailing list