Home > Software design >  laravel 8 manually deleted tables cant be generated from migration
laravel 8 manually deleted tables cant be generated from migration

Time:09-30

I manually deleted my all tables now i want ot re-migrate my tables. but it shows this error

Base table or view not found: 1146 Table 'mymedia.categories' doesn't exist (SQL: select * from categories where categories.deleted_at is null order by id asc)

I tried these functions php artisan migrate php artisan migrate --force php artisan migrate:reset php artisan migrate:refresh

but problem does not solve! please help me

CodePudding user response:

But for now try this

php artisan migrate:fresh

CodePudding user response:

Run this command when you are in localhost and don't need data

php artisan migrate:fresh

If you have seeder then run

php artisan migrate:fresh --seed

Don't use these commands in live server when you have some data in live database

  • Related