27 lines
741 B
PHP
27 lines
741 B
PHP
<?php
|
|||
|
|
|
||
|
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
|
||
|
|
return new class extends Migration
|
||
|
|
{
|
||
|
|
public function up(): void
|
||
|
|
{
|
||
|
|
Schema::create('videos', function (Blueprint $table) {
|
||
|
|
$table->id();
|
||
|
|
$table->unsignedBigInteger('igdb_id')->unique();
|
||
|
|
$table->foreignId('game_id')->constrained()->onDelete('cascade');
|
||
|
|
$table->string('name');
|
||
|
|
$table->string('video_id');
|
||
|
|
$table->string('url');
|
||
|
|
$table->string('checksum')->nullable();
|
||
|
|
$table->timestamps();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public function down(): void
|
||
|
|
{
|
||
|
|
Schema::dropIfExists('videos');
|
||
|
|
}
|
||
|
|
};
|