Merge branch 'develop' into add-display-name-to-users-fixed

This commit is contained in:
snipe
2025-08-25 15:28:20 +01:00
committed by GitHub
46 changed files with 19958 additions and 1191 deletions
@@ -1,32 +0,0 @@
<?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('users', function (Blueprint $table) {
if (!Schema::hasColumn('users', 'display_name')) {
$table->text('display_name')->after('last_name')->nullable()->default(null);
}
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
if (Schema::hasColumn('users', 'display_name')) {
$table->dropColumn('display_name');
}
});
}
};
@@ -0,0 +1,59 @@
<?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('categories', function (Blueprint $table) {
$table->index(['deleted_at']);
});
Schema::table('accessories', function (Blueprint $table) {
$table->index(['deleted_at','category_id']);
});
Schema::table('consumables', function (Blueprint $table) {
$table->index(['deleted_at','category_id']);
});
Schema::table('components', function (Blueprint $table) {
$table->index(['deleted_at','category_id']);
});
Schema::table('licenses', function (Blueprint $table) {
$table->index(['deleted_at','category_id']);
});
Schema::table('models', function (Blueprint $table) {
$table->index(['deleted_at','category_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('categories', function (Blueprint $table) {
$table->dropIndex(['deleted_at']);
});
Schema::table('accessories', function (Blueprint $table) {
$table->dropIndex(['deleted_at','category_id']);
});
Schema::table('consumables', function (Blueprint $table) {
$table->dropIndex(['deleted_at','category_id']);
});
Schema::table('components', function (Blueprint $table) {
$table->dropIndex(['deleted_at','category_id']);
});
Schema::table('licenses', function (Blueprint $table) {
$table->dropIndex(['deleted_at','category_id']);
});
Schema::table('models', function (Blueprint $table) {
$table->dropIndex(['deleted_at','category_id']);
});
}
};
@@ -1,82 +0,0 @@
<?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('settings', function (Blueprint $table) {
if (!Schema::hasColumn('settings', 'ldap_display_name')) {
$table->string('ldap_display_name', 191)->after('ldap_fname_field')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_zip')) {
$table->string('ldap_zip', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_state')) {
$table->string('ldap_state', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_city')) {
$table->string('ldap_city', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_address')) {
$table->string('ldap_address', 191)->after('ldap_manager')->nullable()->default(null);
}
if (!Schema::hasColumn('settings', 'ldap_mobile')) {
$table->string('ldap_mobile', 191)->after('ldap_phone_field')->nullable()->default(null);
}
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_display_name')) {
$table->dropColumn('ldap_display_name');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_zip')) {
$table->dropColumn('ldap_zip');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_address')) {
$table->dropColumn('ldap_address');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_city')) {
$table->dropColumn('ldap_city');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_state')) {
$table->dropColumn('ldap_state');
}
});
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('settings', 'ldap_mobile')) {
$table->dropColumn('ldap_mobile');
}
});
}
};
@@ -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('models', function (Blueprint $table) {
$table->index(['created_at']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('models', function (Blueprint $table) {
$table->dropIndex(['created_at']);
});
}
};