This commit is contained in:
2024-12-30 22:41:34 +02:00
parent 6abcbe2a84
commit e60058c1c0
11 changed files with 264 additions and 5 deletions
@@ -14,9 +14,11 @@ return new class extends Migration
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->boolean('is_dummy_account')->default(0);
$table->rememberToken();
$table->timestamps();
});
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('media_lists', function (Blueprint $table) {
$table->id();
$table->text('description')->nullable();
$table->integer('favorites_count')->default(0);
$table->unsignedBigInteger('tmdb_id');
$table->integer('item_count')->default(0);
$table->string('iso_639_1', 2);
$table->string('iso_3166_1', 2);
$table->string('list_type', 15);
$table->string('name', 550);
$table->string('poster_path', 550);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('media_lists');
}
};
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('user_media_lists', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('media_list_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user_media_lists');
}
};
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('media_list_items', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('media_list_id');
$table->unsignedBigInteger('item_id');
$table->enum('item_type', ['movie', 'show']);
$table->unsignedBigInteger('tmdb_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('media_list_items');
}
};