-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11.x] Fix SQLite schema dumps missing most tables (#52275)
* Update test to make sure all expected tables are present in dump * Fix removal of sqlite internal tables
- Loading branch information
1 parent
45a42f9
commit 5979519
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,8 @@ public function testSchemaDumpOnSqlite() | |
$connection = DB::connection(); | ||
$connection->getSchemaBuilder()->createDatabase($connection->getConfig('database')); | ||
|
||
$connection->statement('CREATE TABLE users(id integer primary key autoincrement not null, email varchar not null, name varchar not null);'); | ||
$connection->statement('CREATE TABLE IF NOT EXISTS migrations (id integer primary key autoincrement not null, migration varchar not null, batch integer not null);'); | ||
$connection->statement('CREATE TABLE users (id integer primary key autoincrement not null, email varchar not null, name varchar not null);'); | ||
$connection->statement('INSERT INTO users (email, name) VALUES ("[email protected]", "Taylor Otwell");'); | ||
|
||
$this->assertTrue($connection->table('sqlite_sequence')->exists()); | ||
|
@@ -60,6 +61,7 @@ public function testSchemaDumpOnSqlite() | |
$connection->getSchemaState()->dump($connection, database_path('schema/sqlite-schema.sql')); | ||
|
||
$this->assertFileContains([ | ||
'CREATE TABLE migrations', | ||
'CREATE TABLE users', | ||
], 'database/schema/sqlite-schema.sql'); | ||
$this->assertFileNotContains([ | ||
|