So I have an app with a database with one table. I am wanting to put out a big update that includes a new table in the database.
I successfully used the onUpgrade method to create the new table in the old database by doing "db.execSQL(SQL_CREATE_STRING" in the onUpgrade method.
My question might not be a great one... but it's a question I can't find the answer for.
What happens next time I upgrade the database? Before I added the table the database's version was 2, after the new table the database version is 3. What happens if later down the road I want to add yet another table? Do I leave the current "db.execSQL(SQL_CREATE_STRING" in the onUpgrade or would I have to first remove it?
The SQL_CREATE_STRING starts with "CREATE TABLE IF NOT EXISTS", so I'm assuming I could just leave it in the onUpgrade method, correct? Since if it sees the table already it already exists, it wont try to make another one.
I'm just trying to confirm this thinking.
Thanks!