forked from acearo/base-laravel
Fixed id fields
This commit is contained in:
parent
a4c706f99f
commit
13a6d1547a
4 changed files with 5 additions and 5 deletions
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue