Профиль хирургии

This commit is contained in:
brusnitsyn
2026-03-25 17:37:32 +09:00
parent 52a80ccd3b
commit f566ab96df
75 changed files with 3841 additions and 1009 deletions

View File

@@ -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('sessions', function (Blueprint $table) {
$table->foreignIdFor(\App\Models\Role::class, 'role_id')
->nullable()
->constrained();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('sessions', function (Blueprint $table) {
$table->dropColumn('role_id');
});
}
};

View File

@@ -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('reports', function (Blueprint $table) {
$table->index(['rf_department_id', 'created_at'], 'idx_reports_dept_created');
$table->index('created_at', 'idx_reports_created_at');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('reports', function (Blueprint $table) {
//
});
}
};

View File

@@ -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('medical_history_snapshots', function (Blueprint $table) {
$table->index(['rf_report_id', 'patient_type'], 'idx_snapshots_report_patient');
$table->index('rf_medicalhistory_id', 'idx_snapshots_medicalhistory');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('medical_history_snapshots', function (Blueprint $table) {
//
});
}
};

View File

@@ -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('user_departments', function (Blueprint $table) {
$table->integer('order')->default(0);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('user_departments', function (Blueprint $table) {
$table->dropColumn('order');
});
}
};

View File

@@ -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('user_departments', function (Blueprint $table) {
$table->string('user_name')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('user_departments', function (Blueprint $table) {
$table->dropColumn('user_name');
});
}
};

View File

@@ -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('department_metrika_defaults', function (Blueprint $table) {
$table->dateTime('date_end')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('department_metrika_defaults', function (Blueprint $table) {
$table->dropColumn('date_end');
});
}
};