Skip to content

Commit

Permalink
fix create table ready exists error
Browse files Browse the repository at this point in the history
  • Loading branch information
licong committed Sep 28, 2022
1 parent b46b0e9 commit 552c04f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/db/db_provider.dart
Expand Up @@ -85,13 +85,13 @@ class DBProvider {
return await openDatabase(path, version: 1, onOpen: (db) {},
onCreate: (Database db, int version) async {
print("DBProvider:: onCreate()");
await db.execute("CREATE TABLE Task ("
await db.execute("CREATE TABLE IF NOT EXISTS Task ("
"id TEXT PRIMARY KEY,"
"name TEXT,"
"color INTEGER,"
"code_point INTEGER"
")");
await db.execute("CREATE TABLE Todo ("
await db.execute("CREATE TABLE IF NOT EXISTS Todo ("
"id TEXT PRIMARY KEY,"
"name TEXT,"
"parent TEXT,"
Expand Down

0 comments on commit 552c04f

Please sign in to comment.