Skip to content
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

Provide sample config/db/seeds.rb to guide people #220

Closed
wants to merge 1 commit into from

Conversation

francois
Copy link
Contributor

Without the file, developers are left wondering where the seed should
live, and what should go in it. This guides the developer for the next
step.

Without the file, developers are left wondering where the seed should
live, and what should go in it. This guides the developer for the next
step.
@francois
Copy link
Contributor Author

I didn't see any specs to check the contents of a new application. I did run rm -rf bookshelf && bundle exec exe/hanami new bookshelf and it correctly created the seed file.

I'd like to mention: the file is called seeds.rb, but the command is hanami db seed. Rails uses the same terminology, so maybe it's not a big surprise.

If the app has slices, I imagine we'd want to add seeds to the slices? This isn't taken into account in this PR, but happy to add, with some guidance. The guide needs some information about seeds as well. There are currently no database sections in the guides.

@timriley
Copy link
Member

Hi @francois! Thanks very much for putting this together. I had also made some recent changes in this direction, but your PR here made included aspects that I hadn't, such as more examples in the seeds file, and printing notices if the expected seeds files could not be found.

I incorporated these in #256 and included you as a co-committer. Thank you again! (And sorry for the delay)

@timriley timriley closed this Oct 28, 2024
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