Fixed id fields

This commit is contained in:
Beth Parker 2022-02-12 23:32:09 -06:00
parent a4c706f99f
commit 13a6d1547a
4 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ class CreateRecipesTable extends Migration
public function up()
{
Schema::create('recipes', function (Blueprint $table) {
$table->id();
$table->increments('id');
$table->string('name');
$table->unsignedInteger('user_id');
$table->string('author');

View file

@ -14,12 +14,12 @@ class CreateRecipeCommentsTable extends Migration
public function up()
{
Schema::create('recipe_comments', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->increments('id');
$table->unsignedInteger('recipe_id');
$table->unsignedInteger('user_id');
$table->datetime('date_posted');
$table->longtext('comment');
$table->timestamps();
$table->foreign('recipe_id')->references('id')->on('recipes');
$table->foreign('user_id')->references('id')->on('users');

View file

@ -14,7 +14,7 @@ class CreateRecipeIngredientsTable extends Migration
public function up()
{
Schema::create('recipe_ingredients', function (Blueprint $table) {
$table->id();
$table->increments('id');
$table->unsignedInteger('recipe_id');
$table->unsignedInteger('order');
$table->boolean('alternative');

View file

@ -14,7 +14,7 @@ class CreateRecipeCategoryTable extends Migration
public function up()
{
Schema::create('recipe_categories', function (Blueprint $table) {
$table->id();
$table->increments('id');
$table->unsignedInteger('recipe_id');
$table->string('name');
$table->timestamps();