Skip to content

Add postgis to all dev rails databases#839

Merged
tomhughes merged 1 commit into
openstreetmap:masterfrom
gravitystorm:dev_postgis
Mar 5, 2026
Merged

Add postgis to all dev rails databases#839
tomhughes merged 1 commit into
openstreetmap:masterfrom
gravitystorm:dev_postgis

Conversation

@gravitystorm
Copy link
Copy Markdown
Contributor

This is in anticipation of the upcoming "moderation zones" feature.

openstreetmap/openstreetmap-website#6713


I've tested this using the following config in test-kitchen.yml:

       dev:
         rails:
           postgresql_cluster: 17/main
+          sites:
+            master:
+              repository: "https://github.com/pablobm/openstreetmap-website.git"
+              revision: "geoblock-notes"
   - name: devices

It confirms that we can create the extension using a superuser (e.g. the postgres user) and the migrations work fine when run as a non-superuser, since the migration uses CREATE EXTENSION IF NOT EXISTS

I thought it was best to create this PR just for the dev cookbook, and then I'm happy to make a separate follow-on PR for doing the same for the main production db. I expect we'll want to test this on dev and iron out any kinks first.

Note that the dev recipe currently fails in CI (and in test-kitchen), since it picks up the new "dummy" user from the databags and then tries to access node[:accounts][:users] but this attribute does not exist for the dev cookbook currently. I worked around that by commenting out that section of the recipe. I'm happy to wait for that to be fixed and then rebase this PR, if that makes life any easier.

This is in anticipation of the upcoming "moderation zones" feature.

openstreetmap/openstreetmap-website#6713
@tomhughes
Copy link
Copy Markdown
Member

Looks good to me, thanks.

@tomhughes tomhughes merged commit d4339aa into openstreetmap:master Mar 5, 2026
139 of 142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants