Migration: 2021_07_07_155535_allow_null_for_item_id_in_recipes_table.php
This commit is contained in:
parent
8038a538dc
commit
b7ccc4a657
1 changed files with 20 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AllowNullForItemIdInRecipesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('recipes', function (Blueprint $table) {
|
||||
$table->foreignId('item_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in a new issue