mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
actor sync
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use App\Database\Database;
|
||||
|
||||
class AddAspectRatioFields extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$capsule = Database::getCapsule();
|
||||
|
||||
// Add aspect_ratio field to games table
|
||||
$capsule->schema()->table('games', function (Blueprint $table) {
|
||||
$table->decimal('cover_aspect_ratio', 4, 3)->nullable()->after('cover_image');
|
||||
$table->decimal('image_aspect_ratio', 4, 3)->nullable()->after('image_url');
|
||||
});
|
||||
|
||||
// Add aspect_ratio field to adult_videos table
|
||||
$capsule->schema()->table('adult_videos', function (Blueprint $table) {
|
||||
$table->decimal('poster_aspect_ratio', 4, 3)->nullable()->after('poster_url');
|
||||
$table->decimal('backdrop_aspect_ratio', 4, 3)->nullable()->after('backdrop_url');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$capsule = Database::getCapsule();
|
||||
|
||||
// Remove aspect_ratio fields from games table
|
||||
$capsule->schema()->table('games', function (Blueprint $table) {
|
||||
$table->dropColumn(['cover_aspect_ratio', 'image_aspect_ratio']);
|
||||
});
|
||||
|
||||
// Remove aspect_ratio fields from adult_videos table
|
||||
$capsule->schema()->table('adult_videos', function (Blueprint $table) {
|
||||
$table->dropColumn(['poster_aspect_ratio', 'backdrop_aspect_ratio']);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user