first commit
Some checks failed
Build / run (push) Has been cancelled

This commit is contained in:
maher
2025-10-29 11:42:25 +01:00
commit 703f50a09d
4595 changed files with 385164 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
<?php
use Common\Database\Traits\AddsIndexToExistingTable;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddIndexes extends Migration
{
use AddsIndexToExistingTable;
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('actors_titles', function (Blueprint $table) {
$this->addIndexIfDoesNotExist($table, 'actor_id');
$this->addIndexIfDoesNotExist($table, 'title_id');
});
Schema::table('episodes', function ($table) {
$this->addIndexIfDoesNotExist($table, 'season_id');
$this->addIndexIfDoesNotExist($table, 'episode_number');
$this->addIndexIfDoesNotExist($table, 'season_number');
});
Schema::table('seasons', function ($table) {
$this->addIndexIfDoesNotExist($table, 'title_id');
$this->addIndexIfDoesNotExist($table, 'title_tmdb_id');
});
Schema::table('reviews', function ($table) {
$this->addIndexIfDoesNotExist($table, 'title_id');
});
Schema::table('images', function ($table) {
$this->addIndexIfDoesNotExist($table, 'title_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}