You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*** applying m190417_133209_init
> create table {{%User}} ... done (time: 0.291s)
> create unique index idx_User_email on {{%User}} (email) ...Exception: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
The SQL being executed was: ALTER TABLE User ADD UNIQUE INDEX idx_User_email
...
*** failed to apply m190417_133209_init (time: 0.293s)
0 from 1 migrations were applied.
Migration failed. The rest of the migrations are canceled.
Script @php yii migrate/up --interactive=0 handling the 304952f34c6bafa760b525408c8f0c941565000511 event returned with error code 1
Script presentator\api\base\Starter::postCmd handling the post-install-cmd event terminated with an exception
The fix is easy, just apply the following options to your mysql database (global, you will need root access to your database):
Set global innodb_file_format=Barracuda;
Set global innodb_large_prefix=1;
Set global innodb_default_row_format=dynamic;
@ganigeorgiev maybe you should mention this in the installation instructions 😄
The text was updated successfully, but these errors were encountered:
@MDXDave Thanks, for reporting the issue, but I'm unable to reproduce it (just tested it with the default configurations for MariaDB 10.2 and MySQL 5.7).
In order to reproduce it locally, could you please post what SQL database you are using, including the version and the db collation.
@MDXDave It seems that the 767 bytes limit is the default for MySql up to 5.6 and MariaDB up to 10.1. In MySQL 5.7+ and MariaDB 10.2+ this limit is increased (~3000 bytes) and the error should not occur.
The fix is easy, just apply the following options to your mysql database (global, you will need root access to your database):
@ganigeorgiev maybe you should mention this in the installation instructions 😄
The text was updated successfully, but these errors were encountered: