fixing wireframe issue
This commit is contained in:
@@ -40,14 +40,17 @@ class DatabaseHelper {
|
||||
|
||||
var openDb = await openDatabase(
|
||||
path,
|
||||
version: 1,
|
||||
onCreate: (db, version) => _createDatabaseTables(db),
|
||||
// OLD: version: 1,
|
||||
version: 2,
|
||||
// OLD: onCreate: (db, version) => _createDatabaseTables(db),
|
||||
onCreate: (db, version) async => await _createDatabaseTables(db),
|
||||
onUpgrade: (db, int oldversion, int newversion) async {
|
||||
if (oldversion < newversion) {
|
||||
print("Version Upgrade");
|
||||
// OLD: print("Version Upgrade");
|
||||
await _createDatabaseTables(db);
|
||||
}
|
||||
},
|
||||
);
|
||||
); // fix version upgrade + await table creation - by Azmat on 23-sep
|
||||
|
||||
// Check if the table exists
|
||||
// var tableResult = await openDb.query('sqlite_master',
|
||||
@@ -71,7 +74,8 @@ class DatabaseHelper {
|
||||
}
|
||||
|
||||
Future<void> _createDatabaseTables(Database db) async {
|
||||
tablequery.createOtherTable(db);
|
||||
// OLD: tablequery.createOtherTable(db);
|
||||
await tablequery.createOtherTable(db); // await table creation before queries run - by Azmat on 23-sep
|
||||
}
|
||||
|
||||
// create other table
|
||||
|
||||
Reference in New Issue
Block a user