Skip to content

A free open source IT asset/license management system

Make the LDAP Client-side certificate fields Nullable

Brady Wetherington2d578a986417
diff --git a/database/migrations/2021_07_28_031345_add_client_side_l_d_a_p_cert_to_settings.php b/database/migrations/2021_07_28_031345_add_client_side_l_d_a_p_cert_to_settings.php
index aff442cce4..9c5646a2c6 100644
--- a/database/migrations/2021_07_28_031345_add_client_side_l_d_a_p_cert_to_settings.php
+++ b/database/migrations/2021_07_28_031345_add_client_side_l_d_a_p_cert_to_settings.php
@@ -14,7 +14,7 @@ class AddClientSideLDAPCertToSettings extends Migration
public function up()
{
Schema::table('settings', function (Blueprint $table) {
- $table->text('ldap_client_tls_cert');
+ $table->text('ldap_client_tls_cert')->nullable();
});
}
@@ -26,7 +26,7 @@ class AddClientSideLDAPCertToSettings extends Migration
public function down()
{
Schema::table('settings', function (Blueprint $table) {
- $table->dropColumn('ldap_client_tls_cert');
+ $table->dropColumn('ldap_client_tls_cert')->nullable();
});
}
}
diff --git a/database/migrations/2021_07_28_040554_add_client_side_l_d_a_p_key_to_settings.php b/database/migrations/2021_07_28_040554_add_client_side_l_d_a_p_key_to_settings.php
index 1cd9bd363a..a94d06e0ab 100644
--- a/database/migrations/2021_07_28_040554_add_client_side_l_d_a_p_key_to_settings.php
+++ b/database/migrations/2021_07_28_040554_add_client_side_l_d_a_p_key_to_settings.php
@@ -14,7 +14,7 @@ class AddClientSideLDAPKeyToSettings extends Migration
public function up()
{
Schema::table('settings', function (Blueprint $table) {
- $table->text("ldap_client_tls_key");
+ $table->text("ldap_client_tls_key")->nullable();
});
}
@@ -26,7 +26,7 @@ class AddClientSideLDAPKeyToSettings extends Migration
public function down()
{
Schema::table('settings', function (Blueprint $table) {
- $table->dropColumn("ldap_client_tls_key");
+ $table->dropColumn("ldap_client_tls_key")->nullable();
});
}
}
diff --git a/database/migrations/2021_08_24_124354_make_ldap_client_certs_nullable.php b/database/migrations/2021_08_24_124354_make_ldap_client_certs_nullable.php
new file mode 100644
index 0000000000..64cef2f243
--- /dev/null
+++ b/database/migrations/2021_08_24_124354_make_ldap_client_certs_nullable.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class MakeLdapClientCertsNullable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('settings', function (Blueprint $table) {
+ //
+ $table->text('ldap_client_tls_cert')->nullable()->change();
+ $table->text('ldap_client_tls_key')->nullable()->change();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('settings', function (Blueprint $table) {
+ //
+ });
+ }
+}