firstly I create a migration and in cmd, I run php artisan migrate but it didn't create a new table. it's showing this message. Do you have any answer, Senior Developers! please help me. Thanks a lot
1 Answer
Laravel Documentation for Migration
If you want to run the migration without saving any data in database you can :
php artisan migrate:fresh
// Refresh the database and run all database seeds...
php artisan migrate:fresh --seed
7 Comments
May
Thanks Romain Seite. after I run -php artisam migrate and error show like- 'base table or view already exist:1050 table 'password_resets' already exits(SQL: create table 'password_resets' ('email' varchar(255) not null, 'token' varchar(255) not null
Saromase
try the php artisan migrate:fresh
May
I tried as you told and it show -'dropped all tables successfully' with migration
Saromase
And if you check your database, did you have new table ?
May
oh! now not occur error and it is ok .thanks a lot Romain Seite
|