public override void UpgradeToTargetVersion(IConnection connection) { var dao = new ImageDao(TargetVersion.GetType()); dao.CurrentConnection = connection; dao.CreateTableIfNotExists(); ++ModifiedCount; dao.CreateIndexIfNotExists(); ++ModifiedCount; if (dao.CountAll() > 0) { dao.Delete(new Dictionary <string, object>()); } dao.UpgradeTable(new VersionChangeUnit(typeof(VersionOrigin), TargetVersion.GetType())); }