Fixed #10469 - increased size of supplier address field

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-12-27 12:28:02 -08:00
parent 11524d0f7d
commit 8588e9ebf1
2 changed files with 38 additions and 2 deletions

View file

@ -14,8 +14,8 @@ class Supplier extends SnipeModel
protected $rules = array( protected $rules = array(
'name' => 'required|min:1|max:255|unique_undeleted', 'name' => 'required|min:1|max:255|unique_undeleted',
'address' => 'max:50|nullable', 'address' => 'max:250|nullable',
'address2' => 'max:50|nullable', 'address2' => 'max:250|nullable',
'city' => 'max:255|nullable', 'city' => 'max:255|nullable',
'state' => 'max:32|nullable', 'state' => 'max:32|nullable',
'country' => 'max:3|nullable', 'country' => 'max:3|nullable',

View file

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ChangeSupplierAddressLength extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('suppliers', function (Blueprint $table) {
//
$table->string('address', 250)->nullable()->change();
$table->string('address2', 250)->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('suppliers', function (Blueprint $table) {
//
$table->text('address', 50)->nullable()->default(null)->change();
$table->text('address2', 50)->nullable()->default(null)->change();
});
}
}