diff --git a/database/migrations/2022_02_08_001417_create_recipes_table.php b/database/migrations/2022_02_08_001417_create_recipes_table.php index 2b8c0b1..e4aa958 100644 --- a/database/migrations/2022_02_08_001417_create_recipes_table.php +++ b/database/migrations/2022_02_08_001417_create_recipes_table.php @@ -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'); diff --git a/database/migrations/2022_02_08_002706_create_recipe_comments_table.php b/database/migrations/2022_02_08_002706_create_recipe_comments_table.php index 34d4a97..78bc5fe 100644 --- a/database/migrations/2022_02_08_002706_create_recipe_comments_table.php +++ b/database/migrations/2022_02_08_002706_create_recipe_comments_table.php @@ -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'); diff --git a/database/migrations/2022_02_08_012614_create_recipe_ingredients_table.php b/database/migrations/2022_02_08_012614_create_recipe_ingredients_table.php index ff4abeb..9e6cccb 100644 --- a/database/migrations/2022_02_08_012614_create_recipe_ingredients_table.php +++ b/database/migrations/2022_02_08_012614_create_recipe_ingredients_table.php @@ -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'); diff --git a/database/migrations/2022_02_12_000441_create_recipe_category_table.php b/database/migrations/2022_02_12_000441_create_recipe_category_table.php index 857f1d8..acabb3f 100644 --- a/database/migrations/2022_02_12_000441_create_recipe_category_table.php +++ b/database/migrations/2022_02_12_000441_create_recipe_category_table.php @@ -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();