how to drop a column in mysql laravel stackoverflow

Solutions on MaxInterview for how to drop a column in mysql laravel stackoverflow by the best coders in the world

showing results for - "how to drop a column in mysql laravel stackoverflow"
Jonathan
03 May 2016
1 Class RemoveCommentViewCount extends Migration
2  {
3      public function up()
4      {
5          Schema::table('articles', function($table) {
6             $table->dropColumn('comment_count');
7             $table->dropColumn('view_count');
8          });
9      }
10
11      public function down()
12      {
13          Schema::table('articles', function($table) {
14             $table->integer('comment_count');
15             $table->integer('view_count');
16          });
17      }
18  }
19
similar questions