Files
firefly-iii/database/migrations/2019_03_11_223700_fixldap.php
Will Rouesnel cb4ff35adb Fix LDAP auth configuration paths.
This commit fixes parameters broken in the latest version of `adldap2`.

Specifically:

* `adldap` auth parameters have changed in the latest version.
  * "usernames" has become `identities` and `discover` has changed to
    `discover_users_by`, `auth` has changed to `bind_users_by`
* Add the missing objectguid field to the users table for adldap2.
  * This is added as a nullable (optional) field at the moment to support
    tracking LDAP users as adldap2 wants to.
2019-03-12 09:12:54 +11:00

44 lines
912 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class ChangesForV4713
*/
class ChangesForV4713 extends Migration
{
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
Schema::table(
'users', function (Blueprint $table) {
$table->dropColumn(['objectguid']);
}
);
}
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
/**
* ADLdap2 appears to require the ability to store an objectguid for LDAP users
* now. To support this, we add the column.
*/
Schema::table(
'users', function (Blueprint $table) {
$table->uuid('objectguid')->nullable()->after('id');
}
);
}
}