id('showing_id'); $table->timestamps(); $table->dateTime('showing_start'); $table->dateTime('showing_end'); $table->foreignId('movie_id')->constrained('movies', 'movie_id'); $table->foreignId('room_id')->constrained('rooms', 'room_id'); $table->foreignId('user_id')->constrained('users', 'user_id'); $table->unique(['movie_id', 'room_id', 'showing_start']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('showings'); } };