Skip to content

A free open source IT asset/license management system

Added migration

snipe72affd7a5ba7
diff --git a/database/migrations/2024_06_24_130348_add_profile_edit_to_settings.php b/database/migrations/2024_06_24_130348_add_profile_edit_to_settings.php
new file mode 100644
index 0000000000..ee0010e845
--- /dev/null
+++ b/database/migrations/2024_06_24_130348_add_profile_edit_to_settings.php
@@ -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('settings', function (Blueprint $table) {
+ $table->boolean('profile_edit')->nullable()->default(1);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('settings', function (Blueprint $table) {
+ if (Schema::hasColumn('settings', 'profile_edit')) {
+ $table->dropColumn('profile_edit');
+ }
+ });
+ }
+};