From b7d0cd3b6dd09341e57affc84e021de34306a97c Mon Sep 17 00:00:00 2001 From: Rustem Date: Sat, 1 Mar 2025 13:24:34 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B0=D0=BF=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Sync1cApiController.php | 2 ++ modules/owner_contracts/script.php | 6 ++++++ modules/owners/script.php | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/app/Http/Controllers/Sync1cApiController.php b/app/Http/Controllers/Sync1cApiController.php index 37ae42c..ef2e99d 100644 --- a/app/Http/Controllers/Sync1cApiController.php +++ b/app/Http/Controllers/Sync1cApiController.php @@ -122,6 +122,7 @@ class Sync1cApiController extends Controller 'code' => $value['Код'], ], [ + 'guid' => $value['СсылкаGUID'], 'is_group' => (bool)$value['ЭтоГруппа'], 'name' => $value['Наименование'], 'comments' => $value['Комментарий'], @@ -185,6 +186,7 @@ class Sync1cApiController extends Controller 'code' => $value['Код'], ], [ + 'guid' => $value['СсылкаGUID'], 'is_group' => (bool)$value['ЭтоГруппа'], 'name' => $value['Наименование'], 'comments' => $value['Комментарий'], diff --git a/modules/owner_contracts/script.php b/modules/owner_contracts/script.php index 6025864..d86fb89 100644 --- a/modules/owner_contracts/script.php +++ b/modules/owner_contracts/script.php @@ -48,6 +48,12 @@ return new class extends \A7kz\Platform\Commands\InstallScript { $table->foreign('parent_id')->references('id')->on('pipi_owner_contracts'); }); } + + if (!Schema::connection($segment->connector)->hasColumn('pipi_owner_contracts', 'guid')) { + Schema::connection($segment->connector)->table('pipi_owner_contracts', static function (Blueprint $table) { + $table->string('guid')->unique()->nullable(); + }); + } } } diff --git a/modules/owners/script.php b/modules/owners/script.php index 01095de..12c004c 100644 --- a/modules/owners/script.php +++ b/modules/owners/script.php @@ -55,6 +55,12 @@ return new class extends \A7kz\Platform\Commands\InstallScript { $table->foreign('user_id')->references('id')->on('core_users'); }); } + + if (!Schema::connection($segment->connector)->hasColumn('pipi_owners', 'guid')) { + Schema::connection($segment->connector)->table('pipi_owners', static function (Blueprint $table) { + $table->string('guid')->unique()->nullable(); + }); + } } }