Skip to content

[6.x] Add SQLite production support#19149

Merged
brandonkelly merged 21 commits into
6.xfrom
feature/sqlite-production-support
Jun 24, 2026
Merged

[6.x] Add SQLite production support#19149
brandonkelly merged 21 commits into
6.xfrom
feature/sqlite-production-support

Conversation

@riasvdv

@riasvdv riasvdv commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

We've had SQLite running the full Unit & Feature suite alongside MySQL and Postgres for a bit now, this brings SQLite support to the remaining parts of the codebase like the installer.

I'd still consider it experimental support, but this at least allows people to experiment with it

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands Craft CMS 6’s SQLite support beyond the test suite into production-facing flows (installer, setup commands, requirement checks), by centralizing SQLite-specific connection normalization and DSN/requirements-checker configuration.

Changes:

  • Added ConnectionConfig to normalize SQLite connection configs (paths, pragmas, env-var cleanup, DSN generation) and to configure RequirementsChecker.
  • Updated installer + CLI DB credential flows to support SQLite (including creating the DB file when appropriate and removing server-only env vars).
  • Updated install UI to allow selecting SQLite/MariaDB and to use driver-specific defaults.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
yii2-adapter/tests/unit/helpers/FileHelper/FileHelperTest.php Adjusts a Windows path test case to align with updated absolute-path handling.
tests/Unit/Database/ConnectionConfigTest.php Adds unit coverage for SQLite config normalization, path normalization, and DSN generation.
tests/Unit/Console/DatabaseCredentialsCommandTest.php Adds a test ensuring SQLite credentials don’t persist server env vars.
tests/TestCase.php Normalizes configured DB connections in tests and ensures SQLite DB files exist when needed.
tests/Feature/Http/Controllers/InstallControllerTest.php Expands installer tests for SQLite defaults, validation, and file creation behavior.
src/Utility/Utilities/SystemReport.php Switches requirements DSN/config generation to ConnectionConfig::requirementsChecker().
src/Support/File.php Treats lowercase Windows drive letters as absolute paths.
src/Http/Middleware/CheckRequirements.php Uses ConnectionConfig::requirementsChecker() instead of manually building DSNs.
src/Http/Controllers/Updates/UpdaterController.php Uses ConnectionConfig::requirementsChecker() for server checks.
src/Http/Controllers/InstallController.php Adds SQLite to supported drivers; adds driver defaults; validates/creates SQLite DB files; writes SQLite-appropriate env vars; handles db2 behavior for SQLite.
src/Database/DatabaseServiceProvider.php Normalizes configured DB connections at registration; routes SQLite bulk ops to the default connection via ConnectionConfig.
src/Database/ConnectionConfig.php New helper for SQLite normalization, path handling, DB file creation, requirements checker setup, and db2 bulk-ops wiring.
src/Console/Commands/Setup/DatabaseCredentialsCommand.php Adds SQLite support to db-creds setup flow (prompts/env writing/testing/db2 handling).
src/Console/Commands/Install/InstallCommand.php Uses the migration command class when invoking initial migrations.
resources/js/pages/install/Install.vue Updates install form model to use driver defaults and pass them to DB fields.
resources/js/modules/install/components/InstallingScreen.vue Switches install request to usePost + uses server-provided redirect URL.
resources/js/modules/install/components/DbFields.vue Adds SQLite/MariaDB drivers and driver-specific field visibility/placeholders.
CHANGELOG.md Notes addition of SQLite database support.

Comment thread resources/js/modules/install/components/DbFields.vue
Comment thread src/Http/Controllers/InstallController.php
@riasvdv riasvdv marked this pull request as ready for review June 23, 2026 18:30
@riasvdv riasvdv requested a review from brandonkelly June 23, 2026 18:30
@brandonkelly brandonkelly merged commit 49228db into 6.x Jun 24, 2026
@brandonkelly brandonkelly deleted the feature/sqlite-production-support branch June 24, 2026 01:08
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.

3 participants