forked from acearo/base-laravel
removed ingredient table - ingredient list can inferred rather than explicit
This commit is contained in:
parent
1820587580
commit
c067326af0
2 changed files with 0 additions and 34 deletions
|
@ -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');
|
||||
}
|
||||
}
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue