From 32bddeca44afe51c354a72225117077f851bf15d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 20 May 2021 14:13:07 +1000 Subject: [PATCH 1/2] Add client and contacts to ninja migration --- app/Traits/GenerateMigrationResources.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index 22ce9fda4464..fccaace26ec1 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -373,6 +373,8 @@ info("get company"); 'gateway_type_id' => $payment_method->payment_type->gateway_type_id, 'is_default' => $is_default, 'meta' => $this->convertMeta($payment_method), + 'client' => $contact->client->toArray(), + 'contacts' => $contact->client->contacts->toArray(), ]; } From 30c302d1b6746714f107153bbd11422a946c074a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 26 May 2021 07:29:53 +1000 Subject: [PATCH 2/2] Add timestamps to company gateways migration --- app/Traits/GenerateMigrationResources.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index f9239df278eb..ddec49941529 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -1361,6 +1361,9 @@ info("translated gateway_type = {$translated_gateway_type}"); 'custom_value2' => '', 'custom_value3' => '', 'custom_value4' => '', + 'created_at' => $account_gateway->created_at ? Carbon::parse($account_gateway->created_at)->toDateString() : null, + 'updated_at' => $account_gateway->updated_at ? Carbon::parse($account_gateway->updated_at)->toDateString() : null, + 'deleted_at' => $account_gateway->deleted_at ? Carbon::parse($account_gateway->deleted_at)->toDateString() : null, ]; // } }