sonata-project/sandbox — pull request #313 by rylorin (2014-03-03 18:20:54+00:00)
Title: Update DB connection options for SQLite

This fix is for SQLite databases (database_driver: pdo_sqlite).
SQLite driver is directly accessing databases as files stored in the filesystem. As app/console command line tool and web app do not have the same documents root, the driver path option is required.
Moreover, the app/console command will not work without the "path" option:
create SQLite database -->
$ app/console doctrine:database:create
Created database for connection named "sonata"
$ ls -l
total 512
-rw-r--r-- 1 ronan staff 0 3 mar 19:11 "sonata"
[...]
update database schema -->
$ app/console doctrine:schema:update --force
Updating database schema...
Database schema updated successfully! "134" queries were executed
$ ls -l
total 512
-rw-r--r-- 1 ronan staff 0 3 mar 19:11 "sonata"
[...]
==> no changes made to database file!