How To Upgrade Database With Sugar Orm?
I have a simple entity: public class MyEntity extends SugarRecord { String name; int value; public MyEntity() { //empty ctr for sugar orm } public
Solution 1:
Whilst it's not an ideal solution, using an upgrade file to manually alter the table should allow the insert / replace to work.
AFAIK, the VERSION value is only used to identify if patches should be run.
In your case, it would be a case of adding a file called "2.sql" into your assets/sugar_upgrades/
folder, containing:
ALTERTABLE my_entity ADDCOLUMN another_value int;
Source: SugarORM
Post a Comment for "How To Upgrade Database With Sugar Orm?"