Green Dao onUpdate. How can I add new columns to old tables?
问题 When using green dao there is some code customisation needed for updating from one schema to the next. For my earlier needs it was sufficient to add any new tables using code like this in DaoMaster.java: if(oldVersion==SCHEMA_VERSION_OLD_VERSION&& newVersion==SCHEMA_VERSION){ Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by adding language & checklist table"); boolean ifNotExists = true; NewTableDao.createTable(db, ifNotExists); NewTable2Dao