First of all I'm creating a yii2 advanced application, I'm NOT asking how to solve the 1071 error, Im asking how to twerk the migration script to better adjust it to my hosting database limitations
When uploading my site db from my localhost to a production server (shared hosting) i had the following error:
1071 - Specified key was too long; max key length is 767 bytes
So i had to rearrange my migration script with the following parameters:
$this->createTable('{{%user}}', [
'id' => $this->primaryKey(),
'username' => $this->string(60)->notNull()->unique(),
'auth_key' => $this->string(32)->notNull(),
'password_hash' => $this->string(70)->notNull(),
'password_reset_token' => $this->string(70)->unique(),
'email' => $this->string(60)->notNull()->unique(),
'status' => $this->smallInteger()->notNull()->defaultValue(10),
'created_at' => $this->integer()->notNull(),
'updated_at' => $this->integer()->notNull(),
], $tableOptions);
But i had to guess the length of the auth_key, password_hash and password_reset_token fields
Are there recommended lengths for this fields and what are they?
Regards...