📜  laravel 迁移删除列 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:39.848000             🧑  作者: Mango

代码示例6
Class RemoveCommentViewCount extends Migration
  {
      public function up()
      {
          Schema::table('table', function($table) {
             $table->dropColumn('coulmn_name');
          });
      }

      public function down()
      {
          Schema::table('table', function($table) {
             $table->integer('column_name');
          });
      }
  }