Database PDO Driver
PDO connection backend with explicit SQL dialect selection for schema and identifier behavior.
Provider responsibility
PdoDatabaseServiceProvider registers PdoConnection, PdoDatabaseDriver and the pdo driver factory. For schema grammar it selects a concrete grammar by DatabaseConfig::dialect(): mysql uses MysqlSchemaGrammar, sqlite uses SqliteSchemaGrammar.
Driver versus dialect
PDO is only the connection backend. The dialect tells the framework which SQL grammar and identifier escaping rules to use. Supported PDO schema dialects are mysql and sqlite. A missing or unsupported dialect fails schema grammar resolution.
SQLite config
SQLite uses driver pdo and dialect sqlite. Do not use DB_DRIVER=sqlite because sqlite is not a Driver enum value. The DSN must start with sqlite: for sqlite grammar resolution.
DB_DRIVER=pdo
DB_DIALECT=sqlite
DB_DSN=sqlite:storage/skeleton.sqlite
PDO MySQL config
PDO can also connect to MySQL when dialect is mysql and the DSN has a mysql: prefix or is resolved as a MySQL DSN by the PDO DSN resolver.
DB_DRIVER=pdo
DB_DIALECT=mysql
DB_DSN=mysql:host=127.0.0.1;port=3306;dbname=app;charset=utf8mb4
DB_USER=root
DB_PASS=
SQLite runtime requirements
SQLite requires pdo_sqlite and sqlite3 extensions in the PHP runtime that opens the database. CLI and web PHP can use different php.ini files. If the SQLite file lives in storage, make sure the parent directory exists.
Schema behavior
PDO mysql dialect uses MySQL schema grammar. PDO sqlite dialect uses SQLite schema grammar, including multi-statement table creation when plain indexes must be created after CREATE TABLE.