Updated validation, switch to string() as db field type
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
+3
-3
@@ -116,9 +116,9 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||
'start_date' => 'nullable|date_format:Y-m-d',
|
||||
'end_date' => 'nullable|date_format:Y-m-d|after_or_equal:start_date',
|
||||
'autoassign_licenses' => 'boolean',
|
||||
'address' => 'max:191|nullable',
|
||||
'city' => 'max:191|nullable',
|
||||
'state' => 'min:2|max:191|nullable',
|
||||
'address' => 'nullable|string|max:191',
|
||||
'city' => 'nullable|string|max:191',
|
||||
'state' => 'nullable|string|max:191',
|
||||
'country' => 'min:2|max:191|nullable',
|
||||
'zip' => 'max:10|nullable',
|
||||
'vip' => 'boolean',
|
||||
|
||||
@@ -14,27 +14,27 @@ return new class extends Migration
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
|
||||
if (!Schema::hasColumn('settings', 'ldap_display_name')) {
|
||||
$table->text('ldap_display_name')->after('ldap_fname_field')->nullable()->default(null);
|
||||
$table->string('ldap_display_name', 191)->after('ldap_fname_field')->nullable()->default(null);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('settings', 'ldap_zip')) {
|
||||
$table->text('ldap_zip')->after('ldap_manager')->nullable()->default(null);
|
||||
$table->string('ldap_zip', 191)->after('ldap_manager')->nullable()->default(null);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('settings', 'ldap_state')) {
|
||||
$table->text('ldap_state')->after('ldap_manager')->nullable()->default(null);
|
||||
$table->string('ldap_state', 191)->after('ldap_manager')->nullable()->default(null);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('settings', 'ldap_city')) {
|
||||
$table->text('ldap_city')->after('ldap_manager')->nullable()->default(null);
|
||||
$table->string('ldap_city', 191)->after('ldap_manager')->nullable()->default(null);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('settings', 'ldap_address')) {
|
||||
$table->text('ldap_address')->after('ldap_manager')->nullable()->default(null);
|
||||
$table->string('ldap_address', 191)->after('ldap_manager')->nullable()->default(null);
|
||||
}
|
||||
|
||||
if (!Schema::hasColumn('settings', 'ldap_mobile')) {
|
||||
$table->text('ldap_mobile')->after('ldap_phone_field')->nullable()->default(null);
|
||||
$table->string('ldap_mobile', 191)->after('ldap_phone_field')->nullable()->default(null);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user