exolnet/laravel-sqlite-fluent-drop-foreign
Provides a workaround for dropping foreign keys on SQLite when using Laravel’s fluent schema builder, so migrations can remove foreign key constraints cleanly despite SQLite’s limited ALTER TABLE support.
if (DB::getDriverName() === 'sqlite')) or duplicated migration files — a recurring tax on every schema change.migrate:fresh reliability. Enables local migrate:rollback / reset workflows that would otherwise fail on SQLite when reversing foreign keys — affects developer loop time, not just correctness.PRAGMA foreign_keys, and data preservation. Buying a small focused package is usually cheaper than owning that logic — but see the maintenance caveat below.Adopt when:
migrate:fresh routinely.Look elsewhere or skip when:
For executives: This is a small, single-purpose dependency that eliminates a known source of test-versus-production drift. Without it, migrations that remove foreign keys silently fail or are skipped on SQLite, so CI passes while production schema changes behave differently — a correctness risk that shows up late and expensively. Cost is one low-footprint package; benefit is a test suite that actually represents production. The trade-off is upgrade coupling: v1.12.0 drops PHP 8.2 and Laravel 11, so adoption should be sequenced with our framework upgrade rather than ahead of it.
For engineering: It patches SQLite's inability to drop foreign keys through Laravel's fluent migration syntax, so dropForeign works on SQLite without hand-rolled table-rebuild logic. v1.12.0 is a breaking change in platform support only — no new features: requires PHP 8.3+ and Laravel 12+, with dependency bumps included. Actions: (1) pin ^1.11 if you're still on Laravel 11/PHP 8.2 and track the upgrade; (2) on Laravel 12, adopt and verify with a rollback test in CI, not just migrate; (3) review the dependency diff in the PR before merging, since transitive constraints are the likeliest source of friction; (4) add a migration rollback step to CI so the package's value is actually exercised rather than assumed.
How can I help you explore Laravel packages today?