Ajoute le champs commentaire & la mise à jour

Fix #3
This commit is contained in:
2020-07-23 15:33:48 +02:00
parent 82ec35ab4e
commit f853cf72c7
7 changed files with 188 additions and 9 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateHomesWithComment extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('homes', static function (Blueprint $table) {
$table->text('comment')->nullable()->comment('User comment');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('homes', static function (Blueprint $table) {
$table->dropColumn('comment');
});
}
}