Skip to content

Adding a note describing the configuration of SQLite with doctrine #2196

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

Merged
merged 4 commits into from
Feb 11, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,44 @@ for you:
[mysqld]
collation-server = utf8_general_ci
character-set-server = utf8

.. note::

If you want to use SQLite as your database, you need to set the path
where your database file should be stored:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
doctrine:
dbal:
driver: pdo_sqlite
path: "%kernel.root_dir%/sqlite.db"
charset: UTF8

.. code-block:: xml

<!-- app/config/config.xml -->
<doctrine:config
driver="pdo_sqlite"
path="%kernel.root_dir%/sqlite.db"
charset="UTF-8"
>
<!-- ... -->
</doctrine:config>

.. code-block:: php

// app/config/config.php
$container->loadFromExtension('doctrine', array(
'dbal' => array(
'driver' => 'pdo_sqlite',
'path' => '%kernel.root_dir%/sqlite.db',
'charset' => 'UTF-8',
),
));

Creating an Entity Class
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down