onUpgrade property
Executes when the database has been opened previously, but the last access happened at a different GeneratedDatabase.schemaVersion. Schema version upgrades and downgrades will both be run here.
Implementation
final OnUpgrade onUpgrade;