[#2] content ratings

This commit is contained in:
2025-01-08 01:50:31 +02:00
parent 929954ebd9
commit 60ee3bb759
5 changed files with 112 additions and 0 deletions
@@ -0,0 +1,30 @@
<?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('content_ratings', function (Blueprint $table) {
$table->id();
$table->json('descriptors')->default(null);
$table->string('iso_3166', 10)->default(null);
$table->string('rating', 50)->default(null);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('content_ratings');
}
};
@@ -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('show_content_ratings', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('show_id');
$table->unsignedBigInteger('content_rating_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('show_content_ratings');
}
};