What's Changed
- MySQL Migration Fix Fixes #172:
- Fixed installation failure on MySQL databases
- Error:
SQLSTATE[42000]: Cannot truncate a table referenced in a foreign key constraint - Root Cause: Migration
2025_10_13_000001_remove_translatable_fields_from_blog_posts_table.phpusedtruncate()which fails on MySQL when tables have foreign key constraints - Solution: Replaced
DB::table('blog_posts')->truncate()withDB::table('blog_posts')->delete() - Impact: Blogr now installs correctly on MySQL, PostgreSQL, SQLite, and other databases. The
delete()method works across all database engines regardless of foreign key constraints. - Tests Added: 4 new tests in
MigrationWithForeignKeysTest.phpverify:- Migration executes successfully with
delete()instead oftruncate() delete()works on empty tables (fresh installation scenario)- Migration rollback works correctly
- Database compatibility across SQLite, MySQL, PostgreSQL
- Migration executes successfully with
- Test Coverage: 764 tests, 2226 assertions (all passing)
Full Changelog: v0.15.7...v0.15.8