HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/limestate-admin/database/migrations/2024_04_12_160000_map_complex_external_id.php
<?php

use App\Models\ExternalServiceRelation;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {

    public function up(): void
    {
        $map = [
            11 => 15977,
            14 => 2145,
            19 => 15557,
            36 => 48737,
            46 => 1944,
            48 => 48220,
            49 => 13507,
            53 => 48182,
            55 => 46511,
            56 => 48385,
            59 => 46076,
            63 => 15100,
            65 => 40325,
            71 => 48503,
            73 => 52595,
            76 => 27329,
            78 => 36527,
            79 => 15534,
            80 => 57026,
            81 => 57054,
            82 => 14915,
            86 => 46325,
            90 => 73130,
            95 => 15334,
            99 => 47526,
            102 => 139991,
            103 => 73314,
            107 => 180828,
            108 => 73070,
            111 => 20500,
            116 => 44686,
            117 => 131651,
            118 => 46766,
            120 => 186341,
            122 => 16157,
            127 => 42872,
            141 => 325111,
            142 => 194050,
            146 => 517146,
            148 => 398408,
            151 => 313337,
            157 => 492438,
            164 => 199545,
            177 => 1634044,
            188 => 39908,
        ];
        foreach ($map as $complexId => $externalId) {
            ExternalServiceRelation::createYandexRelation(ExternalServiceRelation::MODEL_COMPLEX, $complexId, $externalId);
        }
    }

    public function down(): void
    {
        Schema::dropIfExists('external_service_relations');
    }

};