I am using Sqlite database in Flutter by using sqflite plugin. Following the below mentioned links I am able to successfully create database and perform CRUD operations in it.
Sqflite Tutorial - Youtube Playlist
The problem is, Once the database is created I cannot modify old tables. In order to get a new column in "tabEmployee" table, I must delete the database and recreate it.
void _onCreate(Database db, int newVersion) async {
await db.execute(
"CREATE TABLE tabEmployee($idPk INTEGER PRIMARY KEY, employeeName TEXT)");
}
What should I do in order to modify previously created table in sqflite without deleting database ?