Skip to content

DB seed script for development#6432

Merged
tomhughes merged 4 commits intoopenstreetmap:masterfrom
pablobm:seed-script
Feb 23, 2026
Merged

DB seed script for development#6432
tomhughes merged 4 commits intoopenstreetmap:masterfrom
pablobm:seed-script

Conversation

@pablobm
Copy link
Contributor

@pablobm pablobm commented Oct 7, 2025

In order:

  1. Extract the code of the oauth:register_apps task into a method, to allow reuse.
  2. Use this to create initial users, including an admin.

This takes inspiration from @mmd's https://gist.github.com/mmd-osm/a3a0b5a8799a333e7fae578038aa7a93 and @gravitystorm's #3101 (which it would replace). We can think about adding more in the future.

@tomhughes
Copy link
Member

If we're going to use db:seed to set things up then do we still need oauth:register_apps as well?

@pablobm
Copy link
Contributor Author

pablobm commented Oct 8, 2025

I think that oauth:register_apps is still useful for people who don't through the bin/setup route, or if something goes wrong and the rake task still needs to be run.

@pablobm pablobm force-pushed the seed-script branch 7 times, most recently from b95aa58 to f530c15 Compare February 5, 2026 10:19
@pablobm
Copy link
Contributor Author

pablobm commented Feb 5, 2026

I have revisited this now, simplifying, moving the bin/yarn part out (will go in a separate PR), and putting it in a separate task dev:populate.

@pablobm
Copy link
Contributor Author

pablobm commented Feb 5, 2026

Hm, I can't rename the PR (it still says "DB seed"). The "edit" button is missing. Has there been a recent change in permissions?

@tomhughes
Copy link
Member

We haven't changed anything as far as I know but github might have done...

Copy link
Member

@tomhughes tomhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the inline comments I think there's probably scope here for tidying up the commit history as there seem to be cases here where later commits are fixing up earlier ones?

Copy link
Contributor Author

@pablobm pablobm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the comments now 👍

@tomhughes tomhughes merged commit f7ec36b into openstreetmap:master Feb 23, 2026
14 checks passed
@pablobm pablobm changed the title DB seed script DB seed script for development Feb 24, 2026
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.

3 participants