Answers for "how to delete table form database using laravel migration down"

PHP
0

Laravel Drop All Tables & Migrate

php artisan migrate:fresh

php artisan migrate:fresh --seed
Posted by: Guest on May-04-2021
1

drop column migration laravel

Class RemoveCommentViewCount extends Migration
  {
      public function up()
      {
          Schema::table('articles', function($table) {
             $table->dropColumn('comment_count');
             $table->dropColumn('view_count');
          });
      }

      public function down()
      {
          Schema::table('articles', function($table) {
             $table->integer('comment_count');
             $table->integer('view_count');
          });
      }
  }
Posted by: Guest on March-19-2020

Code answers related to "how to delete table form database using laravel migration down"

Browse Popular Code Answers by Language