This commit is contained in:
f4ilji
2025-01-30 00:31:40 +05:00
parent bad611eb84
commit 3385dc5807
60 changed files with 1811 additions and 825 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::table('educational_groups', function (Blueprint $table) {
$table->unsignedBigInteger('education_form_id')->nullable()->after('faculty_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() : void
{
Schema::table('educational_groups', function (Blueprint $table) {
$table->dropColumn('education_form_id');
});
}
};
@@ -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::table('schedules', function (Blueprint $table) {
$table->dropColumn('is_zaoch');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() : void
{
Schema::table('schedules', function (Blueprint $table) {
$table->boolean('is_zaoch')->default(false);
});
}
};
@@ -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::table('main_sliders', function (Blueprint $table) {
$table->timestamp('start_time')->nullable()->after('is_active'); // Дата и время начала действия слайда
$table->timestamp('end_time')->nullable()->after('start_time'); // Дата и время окончания действия слайда
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() : void
{
Schema::table('main_sliders', function (Blueprint $table) {
$table->dropColumn(['start_time', 'end_time']); // Удаление колонок при откате миграции
});
}
};
@@ -0,0 +1,38 @@
<?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->string('title')->nullable()->change();
$table->text('content')->nullable()->change();
$table->dropColumn('link_text');
$table->text('settings')->nullable()->after('link');
$table->text('image')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() : void
{
Schema::table('main_sliders', function (Blueprint $table) {
$table->string('title')->nullable(false)->change();
$table->text('content')->nullable(false)->change();
$table->string('link_text')->nullable(false);
$table->dropColumn('settings');
$table->string('image')->nullable()->change();
});
}
};