File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -151,8 +151,10 @@ can automatically generate an empty ``test_project`` database for you:
151
151
152
152
.. caution ::
153
153
154
- MySQL sets a `limit of 767 bytes for the index key prefix `_. When using
155
- ``utf8mb4 ``, string columns with 255 character length surpass that limit.
154
+ There is a `limit of 767 bytes for the index key prefix `_ for InnoDB table on MySQL 5.6
155
+ and priort version. In MySQL version 5.7 and upwards this limit has been increased
156
+ to 3072 bytes. If you are using MySQL version prior to 5.7 please take this into account:
157
+ When using ``utf8mb4 ``, string columns with 255 character length surpass that limit.
156
158
This means that any column of type ``string `` and ``unique=true `` must
157
159
set its maximum ``length `` to ``190 ``. Otherwise, you'll see this error:
158
160
*"[PDOException] SQLSTATE[42000]: Syntax error or access violation:
You can’t perform that action at this time.
0 commit comments