forked from acearo/base-laravel
changed quantity to float to allow for fractions and added recipe maintainer
This commit is contained in:
parent
d4391bd5ec
commit
1820587580
2 changed files with 4 additions and 2 deletions
|
@ -16,13 +16,15 @@ class CreateRecipesTable extends Migration
|
||||||
Schema::create('recipes', function (Blueprint $table) {
|
Schema::create('recipes', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
|
$table->unsignedInteger('maintainer');
|
||||||
$table->string('author');
|
$table->string('author');
|
||||||
$table->unsignedInteger('servings');
|
$table->unsignedInteger('servings');
|
||||||
$table->datetime('date_entered');
|
$table->datetime('date_entered');
|
||||||
$table->datetime('date_modified');
|
$table->datetime('date_modified');
|
||||||
$table->longtext('instructions');
|
$table->longtext('instructions');
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('maintainer')->references('id')->on('users');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class CreateRecipeIngredientTable extends Migration
|
||||||
$table->unsignedInteger('recipe_id');
|
$table->unsignedInteger('recipe_id');
|
||||||
$table->unsignedInteger('ingredient_id');
|
$table->unsignedInteger('ingredient_id');
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->unsignedInteger('quantity');
|
$table->float('quantity');
|
||||||
$table->string('measurement');
|
$table->string('measurement');
|
||||||
$table->longText('special_notes');
|
$table->longText('special_notes');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
Loading…
Add table
Reference in a new issue