public void onCreate(SQLiteDatabase sqlitedatabase)
    {
        super._01_(sqlitedatabase);
        Object obj = DaoFactory.access$000(DaoFactory.getInstance()).WritableDatabase();
        if (((SQLiteDatabase) (obj)).getVersion() == 147)
        {
            DaoMaster.createAllTables(((SQLiteDatabase) (obj)), true);
            DaoSession daosession = (new DaoMaster(sqlitedatabase)).newSession(IdentityScopeType.Session);
            sqlitedatabase = (new DaoMaster(((SQLiteDatabase) (obj)))).newSession(IdentityScopeType.Session).getPedometerMinuteDataDao();
            obj = daosession.getPedometerMinuteDataDao();
            PedometerMinuteData pedometerminutedata;
            for (Iterator iterator = sqlitedatabase.loadAll().iterator(); iterator.hasNext(); ((PedometerMinuteDataDao) (obj)).insertOrReplace(pedometerminutedata))
            {
                pedometerminutedata = (PedometerMinuteData)iterator.next();
                sqlitedatabase.detach(pedometerminutedata);
            }

        }
        DaoMaster.dropAllTables(DaoFactory.access$000(DaoFactory.getInstance()).WritableDatabase(), true);
    }
 public void onUpgrade(SQLiteDatabase sqlitedatabase, int i, int j)
 {
     a.a("DaoFactory", "Upgrading MobileTrackDB schema from version [%s] to [%s]", new Object[] {
         Integer.valueOf(i), Integer.valueOf(j)
     });
     boolean flag;
     try
     {
         flag = MigrationHelper.migrateMobileTrackDB(sqlitedatabase, i, j);
     }
     catch (Throwable throwable)
     {
         a.f("DaoFactory", "Unable to upgrade schema. Trying to recreate whole db", throwable, new Object[0]);
         DaoMaster.dropAllTables(sqlitedatabase, true);
         onCreate(sqlitedatabase);
         return;
     }
     if (flag)
     {
         FitBitApplication.a().c().a(0x7f11000b).a("user_login_eviction", "mobiletrack_migration_error", null, 0);
         com.fitbit.savedstate.d.c(true);
     }
 }