title: Unable to migrate in Laravel
body: <p>I have the following database migration:</p>
  <pre><code>return new class extends Migration {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('metrics', function (Blueprint $table) {
              $table-&gt;id();
  
      });
  }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::create('metrics', function(Blueprint $table)
          {
            $table-&gt;dropIndex(['id']);
          });
      }
  };
  </code></pre>
  <p>when i run the migration then</p>
  <p>I get the following:</p>
  <pre><code>  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'metrics' already exists (SQL: create table `metrics` (`id` bigint unsigned not null auto_increment primary key, `value_string` varchar(255) null, `value_integer` int null, `value_float` double(8, 2) null, `value_date` date null, `value_boolean` tinyint(1) null, `category` varchar(255) not null, `source` varchar(255) not null, `availability` tinyint(1) not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
  
    at vendor/laravel/framework/src/Illuminate/Database/Connection.php:742
      738▕         // If an exception occurs when attempting to run a query, we'll format the error
      739▕         // message to include the bindings with SQL, which will make this exception a
      740▕         // lot more helpful to the developer instead of just the database's errors.
      741▕         catch (Exception $e) {
    ➜ 742▕             throw new QueryException(
      743▕                 $query, $this-&gt;prepareBindings($bindings), $e
      744▕             );
      745▕         }
      746▕     }
  
  </code></pre>
  <p>I am confused as to what is causing the error and how to go about solving it. Thank you.</p>