3 lines
562 B
PHP
3 lines
562 B
PHP
<?php
|
|
$p=new PDO('pgsql:host=127.0.0.1;port=55441;dbname=stability_consumers_20261011_084534_test','postgres','',[PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION]);$p->exec('BEGIN READ ONLY');try{echo json_encode(['target'=>$p->query('select current_database()')->fetchColumn(),'legacy'=>$p->query("select count(*) from documents where external_id like 'legacy-tempo-%'")->fetchColumn(),'services'=>$p->query("select code,version from desk_service_versions where status='published' order by version desc")->fetchAll(PDO::FETCH_ASSOC)]);}finally{$p->exec('ROLLBACK');}
|