Changes
This commit is contained in:
+30
@@ -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();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user