Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Remove warning about schema dumps and in-memory SQLite databases. #9312

Merged

Conversation

patrickcarlohickman
Copy link
Contributor

The docs have a warning in the "Squashing Migrations" section that schema dumps may not be restored to in-memory SQLite database. However, I believe this issue was resolved in PR #45375, which was released in v9.45.1.

To test this, I ran the following steps in a project that had existing migrations:

  1. Place an sqlite schema at: database/schema/sqlite-schema.dump
CREATE TABLE IF NOT EXISTS "migrations" ("id" integer not null primary key autoincrement, "migration" varchar not null, "batch" integer not null);
  1. Update the .env file with the following values:
DB_CONNECTION=sqlite
DB_DATABASE=:memory:
  1. Run the migration (php artisan migrate) and see them all succeed.

According to a previous issue #35162, this normally would have failed with all the migration files stating "SQLSTATE[HY000]: General error: 1 no such table: migrations". However, it appears to be working fine now.

@taylorotwell taylorotwell merged commit 96594e4 into laravel:10.x Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants