Add a subs boolen field to the words table

This commit is contained in:
Leonard Smith 2021-05-01 16:38:20 -05:00
parent efe51610b8
commit c69fbea376
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddSubFieldToWordsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('words', function (Blueprint $table) {
$table->boolean('sub')->default(false)->after('phrase_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('words', function (Blueprint $table) {
$table->dropColumn('sub');
});
}
}