From 6c0c0d9372b4359dfcf3303b00139d9a02b4f5e1 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 3 Apr 2023 07:30:56 +1000 Subject: [PATCH] Set null for company tax_data --- ...3_03_24_054758_add_client_is_exempt_from_taxes.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/database/migrations/2023_03_24_054758_add_client_is_exempt_from_taxes.php b/database/migrations/2023_03_24_054758_add_client_is_exempt_from_taxes.php index 5f03420d594c..ee59526750af 100644 --- a/database/migrations/2023_03_24_054758_add_client_is_exempt_from_taxes.php +++ b/database/migrations/2023_03_24_054758_add_client_is_exempt_from_taxes.php @@ -1,8 +1,9 @@ dropColumn('tax_all_products'); }); + Company::query() + ->cursor() + ->each(function ($company) { + $company->tax_data = null; + $company->save(); + }); } /**