Skip to content

A free open source IT asset/license management system

Added migration

snipe5e97ed1c7e89
diff --git a/database/migrations/2024_07_04_103729_add_default_avatar_to_settings.php b/database/migrations/2024_07_04_103729_add_default_avatar_to_settings.php
new file mode 100644
index 0000000000..423f45e9ee
--- /dev/null
+++ b/database/migrations/2024_07_04_103729_add_default_avatar_to_settings.php
@@ -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('settings', function (Blueprint $table) {
+ $table->string('default_avatar')->after('favicon')->default('default.png')->nullable();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('settings', function (Blueprint $table) {
+ $table->dropColumn('default_avatar');
+ });
+ }
+};