This commit is contained in:
f4ilji
2025-03-11 15:52:42 +05:00
parent 3385dc5807
commit 2fa59350cf
14 changed files with 279 additions and 81 deletions
@@ -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::table('main_sliders', function (Blueprint $table) {
$table->unsignedBigInteger('slidable_id')->nullable(); // Поле для идентификатора
$table->string('slidable_type')->nullable(); // Поле для типа модели
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('main_sliders', function (Blueprint $table) {
$table->dropColumn(['slidable_id', 'slidable_type']);
});
}
};
@@ -0,0 +1,28 @@
<?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::table('pages', function (Blueprint $table) {
$table->longText('settings')->nullable()->after('sub_section_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('pages', function (Blueprint $table) {
$table->dropColumn('settings');
});
}
};
@@ -0,0 +1,28 @@
<?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::table('pages', function (Blueprint $table) {
$table->dropColumn('template');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('pages', function (Blueprint $table) {
$table->string('template')->nullable();
});
}
};