Answer the question
In order to leave comments, you need to log in
How to update one column when migrating in laravel?
I study Lara and database migrations in it. Faced a problem with updating columns in the database (ALTER TABLE)
Let's say I have a blog migration
in function up a simple table
Schema::create('blog', function (Blueprint $table) {
$table->id();
$table->char('title', 150);
$table->timestamps();
});
php artisan migrate
Schema::table('blog', function (Blueprint $table) {
$table->text('description');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question