diff --git a/database/migrations/2023_02_28_200056_add_visible_prop_to_companies_table.php b/database/migrations/2023_02_28_200056_add_visible_prop_to_companies_table.php new file mode 100644 index 000000000000..f600fb6370d0 --- /dev/null +++ b/database/migrations/2023_02_28_200056_add_visible_prop_to_companies_table.php @@ -0,0 +1,41 @@ +cursor()->each(function ($company){ + + $crfs = $company->client_registration_fields; + + foreach($crfs as $key => $crf) + { + $crfs[$key]['visible'] = $crfs[$key]['required']; + } + + $company->client_registration_fields = $crfs; + $company->save(); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + + } +};