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

Update documentation to include database version #4

Open
cosmicdreams opened this issue Oct 20, 2024 · 7 comments
Open

Update documentation to include database version #4

cosmicdreams opened this issue Oct 20, 2024 · 7 comments

Comments

@cosmicdreams
Copy link

By using the default version number for the maria db instance, the installation process fails. You must first update the DB to 10.6 or higher in order to be compatible with version 11 (the version you documentation suggests to use).

Please considering adding a command line argument to declare the version of database that is needed.

@rfay
Copy link
Contributor

rfay commented Oct 21, 2024

Ddev's default is mariadb 10.11 though...

@cosmicdreams
Copy link
Author

The test I did today was from a new computer using the Drupal project type. The config declared it's use of 10.4

@TravisCarden
Copy link
Owner

This add-on doesn't directly control config details at that level. The config command from DDEV itself does--and it already has an option to specify the database: https://ddev.readthedocs.io/en/stable/users/usage/commands/#config. In this case, you would just modify the ddev config command in the README like this:

ddev config --project-type=drupal --php-version=8.3 --docroot=web --database=mariadb:10.11

I hate to hard-code that detail in the documentation. And since it seems, per @rfay, it's already supposed to default to the correct version, I'm inclined to close this issue until someone else reports having the problem. Does the above code solve the problem for you?

@cosmicdreams
Copy link
Author

cosmicdreams commented Oct 21, 2024 via email

@rfay
Copy link
Contributor

rfay commented Oct 21, 2024

I don't know how you got a mariadb 10.4, would love you to look at recreating it.

MariaDB 10.11 became the default with DDEV v1.23.0 (April 2024), well before the drupal project type was introduced. So if you used a current DDEV version, it takes some applied effort to get 10.4.

I don't think people are likely to get 10.4 any way I know.

Your suggestion

ddev config --project-type=drupal --php-version=8.3 --docroot=web --database=mariadb:10.11

has essentially been out of date since the drupal project type was introduced. With the introduction of that, there's supposed to be a ddev config --update after the composer install is done. See https://ddev.readthedocs.io/en/stable/users/quickstart/#drupal

The idea is to not have to have a new drupal version all the time with different defaults, and instead to inspect the code and do the right thing.

The reality is that if you to a plain vanilla php installation with a drupal/recommended-project composer install and no other hints, ddev config --update will find the docroot, the drupal version, the php version required, and all.

@TravisCarden
Copy link
Owner

@rfay does that mean I should do this to the README?

diff --git a/README.md b/README.md
index 950846b..8e284c5 100644
--- a/README.md
+++ b/README.md
@@ -27,12 +27,16 @@ cd ~/Sites/xb-dev
 # Configure the new DDEV project.
 ddev config --project-type=drupal --php-version=8.3 --docroot=web
 
 # Create the Drupal project.
 ddev composer create drupal/recommended-project:^11.x-dev --no-install
 
+# Update project settings based on detection and project-type overrides.
+ddev config --update
+ddev restart
+
 # Install the add-on.
 ddev get TravisCarden/ddev-drupal-xb-dev
 
 # Perform one-time setup operations.
 ddev xb-setup

@rfay
Copy link
Contributor

rfay commented Nov 4, 2024

That's would be what I would recommend, but it has nothing to do with this issue, which happened some other way. DDEV has had mariadb:10.11 as default since v1.23.0.

However, you're doing a --no-install, so the ddev config --update won't work yet :) ddev config --update uses the laid-down code to figure out the specifics of the version.

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

No branches or pull requests

3 participants