Bug à l'installation avec mariadb (et non mysql)#544
Conversation
WalkthroughA database migration file's driver check is expanded to treat both MySQL and MariaDB identically when determining which foreign keys to drop from the controls table. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
database/migrations/2024_06_27_123923_add_control_measure_table.php (1)
67-67: Typo in comment."Wokrs" should be "Works".
- // Wokrs only if DB is empty + // Works only if DB is empty
🧹 Nitpick comments (1)
database/migrations/2024_06_27_123923_add_control_measure_table.php (1)
29-29: Approved: Fix correctly handles MariaDB driver.This change properly addresses the MariaDB installation bug by treating MariaDB the same as MySQL for foreign key operations, which is correct since Laravel reports MariaDB connections with driver name 'mariadb'.
Consider using
===instead of==for type-safe string comparison:- if (DB::getDriverName() == 'mysql' || DB::getDriverName() == 'mariadb') + if (DB::getDriverName() === 'mysql' || DB::getDriverName() === 'mariadb')
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
database/migrations/2024_06_27_123923_add_control_measure_table.php(1 hunks)
|
Merci ! |
|
@dbarzin je suis repassé sur "mysql" post-installation, car j'avais d'autres erreurs dans l'interface. Initialement, j'ai changé la valeur de "mysql" à "mariadb" parce que j'avais une erreur à l'installation à cause de l'avertissement : A méditer ;) |
Fix mariadb usage with 2024_06_27_123923_add_control_measure_table.php
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.