Delete Column From Migration

[Solved] Delete Column From Migration | Php - Code Explorer | yomemimo.com
Question : laravel migration remove column

Answered by : faithful-fish-4uu3s6wj4zll

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

Source : | Last Update : Thu, 23 Apr 20

Question : Delete column from migration

Answered by : abuzar-munshi

<?php
$forge->dropColumn('table_name', 'column_1,column_2'); // by proving comma separated column names
$forge->dropColumn('table_name', ['column_1', 'column_2']); // by proving array of column names

Source : https://codeigniter.com/user_guide/dbmgmt/forge.html?highlight=modify%20column#modifying-a-column-in-a-table | Last Update : Fri, 22 Jul 22

Answers related to delete column from migration

Code Explorer Popular Question For Php