Skip to content

Update doctrine.rst #10325

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

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 4 additions & 2 deletions doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ Woh! You now have a new ``src/Entity/Product.php`` file::

.. caution::

MySQL sets a `limit of 767 bytes for the index key prefix`_. When using
``utf8mb4``, string columns with 255 character length surpass that limit.
There is a `limit of 767 bytes for the index key prefix`_ for InnoDB table on MySQL 5.6
and priort version. In MySQL version 5.7 and upwards this limit has been increased
Copy link
Contributor

Choose a reason for hiding this comment

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

Priort -> prior

to 3072 bytes. If you are using MySQL version prior to 5.7 please take this into account:
When using ``utf8mb4``, string columns with 255 character length surpass that limit.
This means that any column of type ``string`` and ``unique=true`` must
set its maximum ``length`` to ``190``. Otherwise, you'll see this error:
*"[PDOException] SQLSTATE[42000]: Syntax error or access violation:
Expand Down