Can no longer create a SQLite database at a relative path

Created on 23 October 2024, 2 months ago

Problem/Motivation

Discovered after bumping from Drush 12 to Drush 13 which started to use Database::convertDbUrlToConnectionInfo

Now the Drupal root is always prepended unless you give an absolute path via a double // in the path. You used to be able to just do sqlite://../db.sql to have a path which lived outside the docroot.

See https://github.com/drush-ops/drush/issues/6142

Steps to reproduce

See these Drupal CMS pipeline builds

drush 12: https://git.drupalcode.org/project/drupal_cms/-/jobs/3114006

$ vendor/bin/drush site:install --yes
 You are about to:
 * Create a sites/default/settings.php file
 * CREATE the 'db.sqlite' database.
 // Do you want to continue?: yes.     

after drush 13: https://git.drupalcode.org/project/drupal_cms/-/jobs/3114570

$ vendor/bin/drush site:install --yes
 You are about to:
 * Create a sites/default/settings.php file
 * CREATE the '/builds/project/drupal_cms/trial/build/web/core/db.sqlite' database.
 // Do you want to continue?: yes.   

See the generated paths, caused by Database::convertDbUrlToConnectionInfo

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

sqlite db driver

Created by

🇺🇸United States mglaman WI, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024