Skip to content

Cannot migrate:fresh with SQLite + WAL mode #56357

@stancl

Description

@stancl

Laravel Version

12

PHP Version

8.4

Database Driver & Version

SQLite

Description

Resubmission of #53044 since Laravel now has first-party support for customizing the journal_mode of SQLite (in config/database.php)

Creating a database that uses the WAL journal mode makes artisan migrate:fresh fail with General error: 11 database disk image is malformed

The other linked thread has some more hints as to what might be causing this. #53044 (comment)

Steps To Reproduce

Create a new Laravel app, change the journal_mode for SQLite in config/database.php to 'wal', recreate the DB if needed, run artisan migrate:fresh

https://asciinema.org/a/25CdUhQG836pUPA2XVVglpfIz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions