id('movie_id'); $table->timestamps(); $table->addColumn('string', 'movie_name', ['length' => 255]); $table->addColumn('string', 'movie_description', ['length' => 1000]); $table->addColumn('string', 'movie_image', ['length' => 255]); $table->addColumn('integer', 'movie_length'); $table->addColumn('integer', 'movie_year'); $table->addColumn('integer', 'movie_age_limit'); $table->foreignId('genre_id')->constrained('genres', 'genre_id'); $table->unique(['movie_name']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('movies'); } };