We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a506e24 commit 5932a8eCopy full SHA for 5932a8e
src/Database/SqliteDatabase.php
@@ -19,10 +19,15 @@ public function dropDatabase()
19
{
20
$iterator = $this->getDbDriver()->getIterator("
21
select
22
- 'drop table ' || name || ';' as command
+ 'drop ' || type || ' ' || name || ';' as command
23
from sqlite_master
24
- where type = 'table'
25
- and name <> 'sqlite_sequence';
+ where name <> 'sqlite_sequence'
+ order by CASE type
26
+ WHEN 'index' THEN 0
27
+ WHEN 'trigger' THEN 1
28
+ WHEN 'view' THEN 2
29
+ ELSE 99
30
+ END;
31
");
32
33
foreach ($iterator as $row) {
0 commit comments