Skip to content

A free open source IT asset/license management system

Sets the `ldap_default_group` field to nullable and default null

snipe685cc86d714b
diff --git a/database/migrations/2022_12_20_171851_fix_nullable_migration_for_settings.php b/database/migrations/2022_12_20_171851_fix_nullable_migration_for_settings.php
new file mode 100644
index 0000000000..aaffd88c4e
--- /dev/null
+++ b/database/migrations/2022_12_20_171851_fix_nullable_migration_for_settings.php
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class FixNullableMigrationForSettings extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('settings', function (Blueprint $table) {
+ $table->string('ldap_default_group')->nullable()->default(null)->change();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ // nothing to do here - this is a hotfix
+ }
+}