Check for existing phpList schema before applying migration#383
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds an idempotency check to the MySQL initial-schema migration (skips if migrations table exists), declares inverse sides on two Doctrine many-to-one relations, and adds a CI step that runs ChangesDatabase Initialization Idempotency
Doctrine inverse-side mappings
CI: Doctrine schema validation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Migrations/Version20251028092901MySqlInit.php`:
- Around line 32-36: The skip check in Version20251028092901MySqlInit.php is
looking for Doctrine's internal table (`doctrine_migration_versions`) so your
migration is skipped prematurely; update the check to look for a table that
initial_schema.sql actually creates (e.g. `phplist_admin`) by changing the call
on $schemaManager->tablesExist(...) used inside the migration (the block that
calls $this->skipIf(...)) to reference 'phplist_admin' instead of
'doctrine_migration_versions' so the migration only skips when the phpList
schema is present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e6e91279-b27c-499f-b94b-acf2d5003ff5
📒 Files selected for processing (1)
src/Migrations/Version20251028092901MySqlInit.php
Summary by CodeRabbit
Thanks for contributing to phpList!