imin
imin

Reputation: 4578

Is there any way to alter virtual table?

My app was launched few weeks ago. Some of the tables inside the sqlite database are virtual tables (FTS4). Now I need to add several columns to some of the virtual tables. But when I add the query to alter my virtual tables inside onUpgrade, I'll always get this error

android.database.sqlite.SQLiteException: virtual tables may not be altered: bla bla

So is there any workaround to this matter?

Upvotes: 1

Views: 1458

Answers (1)

Actiwitty
Actiwitty

Reputation: 1242

You cannot alter a virtual table.

You will unfortunately have to go through the process of DROPping the current one and reCREATing it.

Hope this helps.

Upvotes: 2

Related Questions