-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update guidance on development environment seed data. #721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Relates to [this proposal][1] for Suspenders. > We have relied on [`dev:prime`][2] for loading data necessary for users to view most of the features of the app in development. > > However, there were a few areas of improvement. > > First, rename `dev` namespace to `development`, and rename [`prime`][1] task to `seed` for improved clarity. > > The, introduces `development:seed:replant` take to create parity with the existing `db:seed:replant` task. [1]: thoughtbot/suspenders#1251 [2]: https://thoughtbot.com/blog/priming-the-pump
@@ -43,7 +43,7 @@ | |||
- Validate the associated `belongs_to` object (`user`), not the database column | |||
(`user_id`). | |||
- Use `db/seeds.rb` for data that is required in all environments. | |||
- Use `dev:prime` rake task for development environment seed data. | |||
- Use `development:seed` rake task for development environment seed data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idea (non-blocking): What would you think about using development:db:seed
?
- This would mirror the
db:seed
rake task, but append the environment context to the front. - would leave room for things like
development:redis:seed
note - mentioned this in slack already, adding here for posterity
Does this rename blur what seeds actually are? I guess everyone is already confused about the distinction between dev data and seeds. Maybe this is an "if you can't beat them, join them" solution? |
I personally think it's more clear than I just can't think of the better name for what we're doing other than "seed". |
I think it's fine to use I could also see other variants working as well:
|
Relates to this proposal for Suspenders.