.*?);/s', (string) $schema, $matches ) === 1) { $settingBlock = (string) $matches['body']; } $assert($settingBlock !== '', 'setting indexes are missing'); $assert( substr_count($settingBlock, 'UNIQUE KEY') === 1, 'setting must have exactly one unique key index' ); $assert( str_contains($settingBlock, 'UNIQUE KEY `uniq_setting_key` (`key`)'), 'setting unique key index must use the canonical name' ); $assert( !str_contains((string) $schema, 'idx_setting_'), 'legacy duplicate setting indexes must not remain in fresh schema' ); $expectedAnalytics = '*/5 * * * * /usr/bin/php ' . '/home/virt-cloud/web/xcat siteAnalyticsJob 2 ' . '>> /home/virt-cloud/web/storage/logs/site_analytics.log 2>&1'; $assert( str_contains((string) $crontab, $expectedAnalytics), 'site analytics must retain the original five-minute cron schedule' ); $assert( !str_contains((string) $crontab, '/home/www/virt-cloud'), 'crontab must use the documented deployment root' ); echo "Log schema and crontab contract test passed\n";