Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel migration delete column

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');
          });
      }
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #migration #delete #column
ADD COMMENT
Topic
Name
8+5 =