skip to Main Content

Delete migration In Laravel

Manually delete the migration file under app/database/migrations/my_migration_file_name.php Reset the composer autoload files: composer dump-autoload If you did run the migration (php artisan migrate), you may do this: a) Run migrate:rollback - it is the right way to undo the last migration b) If migrate:rollback does not work, do…

Read More

1071 Specified key was too long

Laravel Migration error: php artisan make:migration SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) As outlined in the Migrations guide to fix this…

Read More
Back To Top