mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
DatabaseWriter.erase(): don't mess with internal SQLite objects
This commit is contained in:
1 parent
fee4486d1b
commit
e84b539de2
1 file changed
+1
-1
@@ -122,7 +122,7 @@ extension DatabaseWriter {
|
||||
|
||||
// Remove all database objects, one after the other
|
||||
try db.inTransaction {
|
||||
while let row = try Row.fetchOne(db, "SELECT type, name FROM sqlite_master") {
|
||||
while let row = try Row.fetchOne(db, "SELECT type, name FROM sqlite_master WHERE name NOT LIKE 'sqlite_%'") {
|
||||
let type: String = row["type"]
|
||||
let name: String = row["name"]
|
||||
try db.execute("DROP \(type) \(name.quotedDatabaseIdentifier)")
|
||||
|
||||
Reference in new issue
Block a user