From 359b22e17af2c78c84cb95c3f77217342a77503a Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 27 Dec 2021 13:22:47 -0800 Subject: [PATCH] Applies #10470 to develop Signed-off-by: snipe --- app/Models/Supplier.php | 4 +-- ..._151849_change_supplier_address_length.php | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 database/migrations/2021_12_27_151849_change_supplier_address_length.php diff --git a/app/Models/Supplier.php b/app/Models/Supplier.php index a96fdacdb..c8c9618d8 100755 --- a/app/Models/Supplier.php +++ b/app/Models/Supplier.php @@ -17,8 +17,8 @@ class Supplier extends SnipeModel protected $rules = [ 'name' => 'required|min:1|max:255|unique_undeleted', - 'address' => 'max:50|nullable', - 'address2' => 'max:50|nullable', + 'address' => 'max:250|nullable', + 'address2' => 'max:250|nullable', 'city' => 'max:255|nullable', 'state' => 'max:32|nullable', 'country' => 'max:3|nullable', diff --git a/database/migrations/2021_12_27_151849_change_supplier_address_length.php b/database/migrations/2021_12_27_151849_change_supplier_address_length.php new file mode 100644 index 000000000..db31b9b3a --- /dev/null +++ b/database/migrations/2021_12_27_151849_change_supplier_address_length.php @@ -0,0 +1,36 @@ +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(); + }); + } +}