-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Any reasons why doesn't bakery create the db? #767
Comments
To my understanding, the built in database drivers connect directly to the database, as opposed to the system that runs the instances. If its possible though, I reckon its worth considering. |
It doesn't look like Eloquent has any built-in support for creating databases; we'd have to implement our own raw queries for each type of database. Raw queries would also be needed to add the necessary db user permissions, and we'd have to get admin credentials from the installing user so that the database could be created and permissions could be applied. One way this could work is:
Would be a bit of work. |
...for what benefits? I'm still not convinced why this is an issue. If it where, Laravel would support it. It's not necessary for tests anyway. |
Well, the benefit would be that it reduces the complexity of the install process, which is critical to new user onboarding. |
As I see bakery should not be using any external libraries before composer is run.
All 3 items can be done by bakery in that order if it was written to do so. Thats my tuppence worth put in :) |
Actually, Bakery can't run Composer because Bakery is autoloaded by Composer. We'd have to have a precompiled distribution of Bakery in order for that to work. |
Yep bakery relies on symfony - cli too |
Plus Bakery requires Symfony dependencies to work. But Composer can run bakery commands. RE the database... while it could be easier for noobs, it’s still IMO part of the server setup process. Like installing PHP and setting up Apache VHost. This is probably historically related to Shared Hosting where you had to create the db in cpanel (and where you where limited in the number of db you could have...). Also keep in mind if noobs uses Vagrant/Docker, the db will already be created. Even *ammp will create the dbs... Maybe there’s an existing Composer package to do this? Otherwise, it could make a good “up for grabs” issue since it’s low priority. |
Well, Bakery couldn't run Composer, but bakery can! There already is an |
Actually, if we had a distribution repository (see #830 (comment)), then Bakery wouldn't need to run Composer. |
Yes, it would. Bakery takes commands from Sprinkles, which in turn can call on their own dependencies. |
Adding |
Not a fan of messing with I do have an alternative though. Composer scripts can call other commands, including |
FYI, Bakery Previously, the issue was because
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bakery probably should have an option to create a db during setup possibly with a one time root login for the purpose.
The text was updated successfully, but these errors were encountered: