Skip to content
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
14 changes: 7 additions & 7 deletions doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,6 @@ Whoa! You now have a new ``src/Entity/Product.php`` file::
Confused why the price is an integer? Don't worry: this is just an example.
But, storing prices as integers (e.g. 100 = $1 USD) can avoid rounding issues.

.. note::

If you are using an SQLite database, you'll see the following error:
*PDOException: SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL
column with default value NULL*. Add a ``nullable=true`` option to the
``description`` property to fix the problem.

.. caution::

There is a `limit of 767 bytes for the index key prefix`_ when using
Expand Down Expand Up @@ -323,6 +316,13 @@ The migration system is *smart*. It compares all of your entities with the curre
state of the database and generates the SQL needed to synchronize them! Like
before, execute your migrations:

.. note::

If you are using an SQLite database, you'll see the following error:
*PDOException: SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL
column with default value NULL*. Add a ``nullable=true`` option to the
``description`` property to fix the problem.

.. code-block:: terminal

$ php bin/console doctrine:migrations:migrate
Expand Down
Loading