// To drop a column, use the dropColumn method on the schema builder.// Before dropping columns from a SQLite database, you will need to add// the doctrine/dbal dependency to your composer.json file and run the// composer update command in your terminal to install the library:Schema::table('users',function(Blueprint$table){$table->dropColumn('votes');});
Update Table
migrate:fresh Drop all tables and re-run all migrations
migrate:install Create the migration repository
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate:status Show the status of each migration
for specific table
php artisan migrate:refresh --path=/database/migrations/table_name.php
Comment::where('post_id',$id)->delete();// in down migrationpublicfunctiondown(){Schema::table('package_types',function(Blueprint$table){AppModelsPackageType::query()->where('id','gt',1)->delete();});}
<?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