title: Android Room populate database with new data after migration?
body: <p>I already published an application in Play Store which pre-populate Room database with data in the <code>onCreate</code> callback. The data is read from a JSON file and put it into the database. Everything works for data into the database (add new records into table) again from a JSON file.</p>
  
  <p>Here is my RoomDatabase <code>create</code> method:</p>
  
  <pre><code>private fun create(context: Context): MyDatabase {
          val MIGRATION_1_2 = object : Migration(1, 2) {
              override fun migrate(database: SupportSQLiteDatabase) {
                  database.execSQL("ALTER TABLE dogs ADD COLUMN language TEXT")
              }
          }
          return Room.databaseBuilder(
              context.applicationContext,
              MyDatabase::class.java,
              DB_NAME
          )
              .addMigrations(MIGRATION_1_2)
              // prepopulate the database after onCreate was called
              .addCallback(object : RoomDatabase.Callback() {
                  override fun onCreate(db: SupportSQLiteDatabase) {
                      super.onCreate(db)
                      GlobalScope.launch {
                          getInstance(context)?.let { DatabaseUtils.prepopulateDatabase(context, it) }
                      }
                  }
              })
              .build()
      }
  </code></pre>
  
  <p>Is there an easy way to do that without to write hundreds SQL requests manually?
  Or if there is a way how to drop the whole database and create a new one with brand new data, maybe also will be an option for me.</p>
  
  <p>Thanks in advance guys ;) </p>