open method
Implementation
Future<Database> open() async {
return openDatabase(
_path,
version: 1,
onCreate: (db, version) async {
///create tables
await db.execute(NetworkHistoryTable.createTable());
},
onUpgrade: (db, oldVersion, newVersion) async {
final batch = db.batch();
await db.execute(NetworkHistoryTable.drop());
await batch.commit();
},
);
}