From 0be37ec173f462715c22453a4f21c2db4d928137 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 11 Jun 2019 07:07:58 +0000 Subject: [PATCH] Database migration debugprints --- lib/src/Store.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/Store.dart b/lib/src/Store.dart index 82bc77b..ee8b981 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -52,11 +52,12 @@ class Store { _init() async{ var databasePath = await getDatabasesPath(); String path = p.join(databasePath, "FluffyMatrix.db"); - _db = await openDatabase(path, version: 2, + _db = await openDatabase(path, version: 3, onCreate: (Database db, int version) async { await createTables(db); }, onUpgrade: (Database db, int oldVersion, int newVersion) async{ + print("Migrate databse from version $oldVersion to $newVersion"); if (oldVersion != newVersion) { await db.execute("DROP TABLE IF EXISTS Rooms"); await db.execute("DROP TABLE IF EXISTS Participants");