@@ -14,7 +14,7 @@ use Tempo\Finance\GeneralLedger\LedgerSchema;
|
||||
|
||||
require __DIR__.'/../../vendor/autoload.php';
|
||||
$app = require __DIR__.'/../../bootstrap/app.php';
|
||||
if (in_array($argv[2] ?? '', ['prepare-native-review', 'read-office-purchase'], true)) {
|
||||
if (in_array($argv[2] ?? '', ['prepare-native-review', 'read-office-purchase', 'describe-private-audit-schema'], true)) {
|
||||
$privateRoot = realpath(getenv('SGC_REQUISITION_QA_ROOT') ?: '');
|
||||
$boundary = realpath(__DIR__.'/../../storage/framework/testing');
|
||||
$databaseName = getenv('DB_DATABASE') ?: '';
|
||||
@@ -42,6 +42,21 @@ if ($mode === 'prepare-native-review') {
|
||||
echo json_encode(requisitionAccountsNativeReviewFixture(getenv('RQ01_LEDGER_INTEGRATED_SCHEMA') === '1', getenv('RQ01_NATIVE_OFFICE_JOURNEY') === '1'), JSON_THROW_ON_ERROR);
|
||||
exit;
|
||||
}
|
||||
if ($mode === 'describe-private-audit-schema') {
|
||||
$columns = DB::transaction(function () {
|
||||
DB::statement('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ READ ONLY');
|
||||
$schema = DB::getSchemaBuilder();
|
||||
$result = [];
|
||||
foreach ($schema->getTableListing() as $table) {
|
||||
$result[$table] = $schema->getColumnListing($table);
|
||||
}
|
||||
ksort($result);
|
||||
|
||||
return $result;
|
||||
});
|
||||
echo json_encode(['schema_only' => true, 'no_business_values' => true, 'tables' => $columns], JSON_THROW_ON_ERROR);
|
||||
exit;
|
||||
}
|
||||
if ($mode === 'read-office-purchase') {
|
||||
if (getenv('RQ01_NATIVE_OFFICE_JOURNEY') !== '1') {
|
||||
throw new LogicException('Office HTTP assertions require their explicit synthetic composition.');
|
||||
|
||||
Reference in New Issue
Block a user