laravelのマイグレーションについて、お聞きしたい点があります。
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateReservationsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('reservations', function (Blueprint $table) { $table->mediumIncrements('id'); $table->dateTime('reservation_date'); $table->integer('tal'); $table->string('other',256); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('reservations'); } }
マイグレーションファイルを「php artisan migrate」とした後に、$table->integer('tal');ここの部分のスペルミスに気づき「tel」としたかった際に、単純にこの部分を書き換え、phpMyAdminなどで、カラム名を変更するだけで良いのでしょうか?
それとも「migrate:refresh」とし、テーブルを再構築しなければならないのでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。