increments('id'); $table->integer('calendar_id')->unsigned()->nullable(); $table->foreign('calendar_id')->references('id')->on('calendars'); $table->integer('home_team_id')->unsigned()->nullable(); $table->foreign('home_team_id')->references('id')->on('teams'); $table->integer('away_team_id')->unsigned()->nullable(); $table->foreign('away_team_id')->references('id')->on('teams'); $table->datetime('date'); $table->integer('day'); $table->string('type'); $table->integer('home_goals')->nullable(); $table->integer('away_goals')->nullable(); $table->integer('home_points')->nullable(); $table->integer('away_points')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('calendar_games'); } }