title: Room persistence Library Database is getting deleted after every restart
body: <p>I'm currently getting into Android development and wanted to use the Room persistence library as my database.</p>
  
  <p>My current code for my DatabaseHelper looks like this:</p>
  
  <pre><code>public abstract class AppDatabase extends RoomDatabase{
  
  private static AppDatabase INSTANCE;
  
  public static final String DATABASE_NAME = "fitdiary-db";
  public abstract UserDAO userDAO();
  public abstract ExerciseDAO exerciseDAO();
  public abstract ExerciseProgressDAO exerciseProgressDAO();
  public abstract WeightDAO weightDAO();
  
  private final MutableLiveData&lt;Boolean&gt; mIsDatabaseCreated = new MutableLiveData&lt;&gt;();
  
  public static AppDatabase getDatabase(Context context){
  
      if(INSTANCE == null){
          INSTANCE = Room.databaseBuilder(context, AppDatabase.class, DATABASE_NAME)
                  .allowMainThreadQueries()
                  .fallbackToDestructiveMigration()
                  .build();
  
      }
      return INSTANCE;
  }
  public void destroyInstance(){
      INSTANCE = null;
  }
  
  private void updateDatabaseCreated(final Context context) {
      if (context.getDatabasePath(DATABASE_NAME).exists()) {
          setDatabaseCreated();
      }
  }
  
  private void setDatabaseCreated(){
      mIsDatabaseCreated.postValue(true);
  }
  
  
  public LiveData&lt;Boolean&gt; getDatabaseCreated() {
      return mIsDatabaseCreated;
  }
  </code></pre>
  
  <p>so if I start my app why does it always create a new database?</p>