📜  如何在 mysql laravel stackoverflow 中删除一列 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:12.529000             🧑  作者: Mango

代码示例1
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');
          });
      }
  }