Migración de Laravel eliminar columna
public function up()
{
Schema::table('table', function($table) {
$table->dropColumn('column_name');
});
}
Faithful Fish
public function up()
{
Schema::table('table', function($table) {
$table->dropColumn('column_name');
});
}
$table->string('foo')->nullable(false)->change();
Schema::rename($currentTableName, $newTableName);
php artisan make:migration rename_author_id_in_posts_table --table=posts
public function up()
{
Schema::table('posts', function (Blueprint $table) {
$table->renameColumn('author_ID', 'user_id');
});
}
php artisan make:migration alter_your_table --table=your_table