removed ingredient table - ingredient list can inferred rather than explicit

This commit is contained in:
Beth Parker 2022-02-07 18:49:19 -06:00
parent 1820587580
commit c067326af0
2 changed files with 0 additions and 34 deletions

View file

@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIngredientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ingredients', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ingredients');
}
}

View file

@ -16,7 +16,6 @@ class CreateRecipeIngredientTable extends Migration
Schema::create('recipe_ingredient', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('recipe_id');
$table->unsignedInteger('ingredient_id');
$table->string('name');
$table->float('quantity');
$table->string('measurement');
@ -24,7 +23,6 @@ class CreateRecipeIngredientTable extends Migration
$table->timestamps();
$table->foreign('recipe_id')->references('id')->on('recipes');
$table->foreign('ingredient_id')->references('id')->on('ingredients');
});
}