Rename your current database, create new database with the same name mzad-web and run php artisan migrate command.
Hope this will resolved your issue.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi I am facing an issue where I am trying to run php artisan migrate:refresh and every time I run my migration it gives me an error
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'mzad-web.adv_filter_categories' (SQL: drop table `adv_filter_categories`)
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'mzad-web.adv_filter_categories'
But when I go and check in the adminer I could see the tables have been dropped. After that If i run php artisan migrate it migrates the tables back again. The only issue is when I try to run php artisan migrate:refresh it gives me this error. Please assist
my migration files I have only two migration files -:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdvFilterCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('adv_filter_categories', function (Blueprint $table) {
$table->increments('id');
$table->integer('category_id')->unsigned();
$table->string('category_name_english');
$table->string('category_name_arabic');
$table->boolean('active')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('adv_filter_categories');
}
}
Please assist I am stuck with it for such a long time and not able to understand why tis happening.
Thank you
Please or to participate in this conversation.