php artisan migrate fails with error 1071
I am testing spark on MAMP. After I ran the installer and created the database, I ran
php artisan migrate This fails with the following error: [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table
announcementsadd pri mary keyannouncements_id_primary(id))
[PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
How can I prevent this? I created the database in phpMyAdmin with these commands:
CREATE USER 'homestead'@'%' IDENTIFIED WITH mysql_native_password;GRANT ALL PRIVILEGES ON . TO 'homestead'@'%' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;SET PASSWORD FOR 'homestead'@'%' = '*'; CREATE DATABASE IF NOT EXISTS
homestead;GRANT ALL PRIVILEGES ONhomestead. TO 'homestead'@'%';GRANT ALL PRIVILEGES ONhomestead\_%. TO 'homestead'@'%';
Please or to participate in this conversation.