Skip to content

Commit 37b2d67

Browse files
committed
fix FinalDb:dropDb() exclude sqlite_sequence table
1 parent 640d0a2 commit 37b2d67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/tsz/afinal/FinalDb.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public void dropTable(Class<?> clazz) {
379379
*/
380380
public void dropDb() {
381381
Cursor cursor = db.rawQuery(
382-
"SELECT name FROM sqlite_master WHERE type ='table'", null);
382+
"SELECT name FROM sqlite_master WHERE type ='table' AND name != 'sqlite_sequence'", null);
383383
if (cursor != null) {
384384
while (cursor.moveToNext()) {
385385
// 添加异常捕获.忽略删除所有表时出现的异常:

0 commit comments

Comments
 (0)