laravel 10 showing error Excetption IlluminateDatabaseQueryException
Respected all,
I am using the laravel 10 and i am doing to add a new coloum in the table students using these stedps in terminal command use
Step 1:- php artisan make:migration update_student_table –table=students
Step 2:- in the 2023_08_17_055949_update_student_table.php file add the code
Step 3:- php artisan migrate run this command
Step 4:- in the terminal having the Error.
I try to add the new colum in the table but showing the error
excetion
2
Answers
Use below code
If you look at your 2nd image, when you ran
Then create_students_table migration ran first as the students’ table already exists which throws an exception.
This happens if somehow create_student_table didn’t ran before or entry is deleted from migrations table of your database.
Alternatively for specific migration you can try.