ci(database): upgrade smoke-test for migrations (SQLite + MySQL)#94
Conversation
New .github/workflows/upgrade-smoke.yml (adapted from Pinakes, extended to dual-DB). On PRs touching database/** or version.json it: - resolves a baseline schema — the latest release's cimaise-*.zip database/schema.<db>.sql when present, else the branch schema; - applies every branch migrate_*_<db>.sql in semantic-version order via the native sqlite3 / mysql clients (which handle trigger and DELIMITER blocks themselves — independent of the PHP runner), tolerating only idempotent errors (already-exists / duplicate); - verifies the objects the migrations add (collections tables, the 1.2.0 analytics indexes, the 1.2.0/1.3.0 marker settings). Runs as a [sqlite, mysql] matrix. Untrusted-input-free: release URLs and schema paths are passed via env, not interpolated into run:.
|
Warning Review limit reached
More reviews will be available in 49 minutes and 26 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Summary
Second updater-parity workstream (ported from Pinakes'
ci-upgrade-smoke.yml, extended to dual-DB). A CI safety net that catches the class of bug a per-PR review misses: a migration that doesn't actually apply on a real engine, or that silently regresses against a previous release's schema..github/workflows/upgrade-smoke.ymlruns on PRs touchingdatabase/**orversion.json:cimaise-*.zipdatabase/schema.<db>.sqlwhen present (a real old-production state), else the branch schema (a fresh install — the migrations then act as an idempotency check against the current structure).migrate_*_<db>.sqlin semantic-version order via the nativesqlite3/mysqlclients (which parse triggerBEGIN...ENDandDELIMITERblocks themselves, so this is independent of the PHP migration runner). Only idempotent errors (already exists/ duplicate) are tolerated; anything else fails the job.collections/collection_imagestables, the 1.2.0 analytics indexes, the 1.2.0/1.3.0 marker settings.Runs as a
[sqlite, mysql]matrix. Release URLs and resolved schema paths are passed throughenv:, never interpolated intorun:(no injection surface).Testing
actionlintclean.database/schema.sqlite.sql+ the three branch migrations: all apply cleanly, verify reportscollections/collection_imagespresent and the marker settings seeded.