Initial Commit; base feats
This commit is contained in:
commit
9732135e90
137 changed files with 13856 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('movies', function (Blueprint $table) {
|
||||
$table->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');
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue