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

Generate db files in hanami new #147

Closed
timriley opened this issue May 24, 2024 · 3 comments · Fixed by #180
Closed

Generate db files in hanami new #147

timriley opened this issue May 24, 2024 · 3 comments · Fixed by #180
Assignees

Comments

@timriley
Copy link
Member

timriley commented May 24, 2024

Include these options will let you tailor the output:

--skip-db to skip DB setup
--database=sqlite to use an sqlite database (the default)
--database=postgres to use a postgres database
--database=mysql to use a mysql database

@cllns
Copy link
Member

cllns commented Jun 14, 2024

How committed to postgres being the default database are you? SQLite is much simpler due to it being file-based, plus there's a growing movement of using SQLite in production so it's not setting people up for failure.

We can turn strict_tables on and generally optimize SQLite in other ways too rails/rails#49349

@timriley
Copy link
Member Author

@cllns Yeah, I'm happy to switch to SQLite as a default. It would make the first-run experience much simpler.

I don't personally have an appetite right now for figuring out all the ways we should tune SQLite for best performance for web-style apps. If you could help figure out a minimal set of things we could do there, that'd be very helpful. Otherwise, we can just live with the defaults and consider improvements in future releases.

@cllns
Copy link
Member

cllns commented Jun 15, 2024

Yea I'm definitely down to figure that out and set up some solid defaults.

FWIW, I think Hanami and SQLite in production may be a particularly good combination since Hanami is so fast and memory efficient. One big server can probably handle a ridiculous amount of traffic. Time will tell!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants