title: Room Pre-packaged database has an invalid schema ERROR of Expect type=Integer Found=Boolean
body: <p>I'm a bit lost with this issue.</p>
  <p>The <code>Pre-packaged database has an invalid schema</code> error has the following output:</p>
  <p><strong>Expected</strong></p>
  <pre><code>TableInfo{name='account', columns={client_alt_phone_on_route_sheets=Column{name='client_alt_phone_on_route_sheets', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='0'}, client_titles_on_address_labels=Column{name='client_titles_on_address_labels', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='0'}, client_titles_on_invoices=Column{name='client_titles_on_invoices', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='0'}}, foreignKeys=[], indices=[]}
  </code></pre>
  <p><strong>Found</strong></p>
  <pre><code>TableInfo{name='account', columns={client_alt_phone_on_route_sheets=Column{name='client_alt_phone_on_route_sheets', type='BOOLEAN', affinity='1', notNull=true, primaryKeyPosition=0, defaultValue='FALSE'}, client_titles_on_address_labels=Column{name='client_titles_on_address_labels', type='BOOLEAN', affinity='1', notNull=false, primaryKeyPosition=0, defaultValue='FALSE'}, client_titles_on_invoices=Column{name='client_titles_on_invoices', type='BOOLEAN', affinity='1', notNull=false, primaryKeyPosition=0, defaultValue='FALSE'}}, foreignKeys=[], indices=[]}
  </code></pre>
  <p>I'm ommitting some other columns because they are not the problem and their output matches. The problem is with the columns that expected <code>INTEGER</code> but found <code>BOOLEAN</code>.</p>
  <p>The database schema is as follows:</p>
  <pre><code>CREATE TABLE account
  (
      client_alt_phone_on_route_sheets  BOOLEAN DEFAULT FALSE NOT NULL,
      client_titles_on_address_labels   BOOLEAN DEFAULT FALSE,
      client_titles_on_invoices         BOOLEAN DEFAULT FALSE,
      // Omitted rows
  );
  </code></pre>
  <p>Initially, I did created the <code>account</code> Room <code>@Entity</code> with the <code>BOOLEAN</code> columns of type <code>Boolean</code>:</p>
  <pre><code>@Entity(tableName = &quot;account&quot;)
  data class Account(
      // Omitted data
      // @FIXME
      @ColumnInfo(name = &quot;client_alt_phone_on_route_sheets&quot;, defaultValue = &quot;FALSE&quot;) val routeSheetsClientAltPhone: Boolean,
  
      // @FIXME
      @ColumnInfo(name = &quot;client_titles_on_address_labels&quot;, defaultValue = &quot;FALSE&quot;) val clientTitlesOnAddressLabels: Boolean?,
  
      // @FIXME
      @ColumnInfo(name = &quot;client_titles_on_invoices&quot;, defaultValue = &quot;FALSE&quot;) val clientTitlesOnInvoices: Boolean?,
  )
  </code></pre>
  <p>Then, the first time the error was thrown I did changed the <code>Boolean</code> type columns to <code>Int</code> type:</p>
  <pre><code>@Entity(tableName = &quot;account&quot;)
  data class Account(
      // Omitted data
      // @FIXME
      @ColumnInfo(name = &quot;client_alt_phone_on_route_sheets&quot;, defaultValue = &quot;0&quot;) val routeSheetsClientAltPhone: Int,
  
      // @FIXME
      @ColumnInfo(name = &quot;client_titles_on_address_labels&quot;, defaultValue = &quot;0&quot;) val clientTitlesOnAddressLabels: Int?,
  
      // @FIXME
      @ColumnInfo(name = &quot;client_titles_on_invoices&quot;, defaultValue = &quot;0&quot;) val clientTitlesOnInvoices: Int?,
  )
  </code></pre>
  <p>However, the error kept happening. I tried with <a href="https://stackoverflow.com/a/51130831/13784272">this answer</a> migrating a single column to see if it then matches in the expected/found output.</p>
  <pre><code>        private val MIGRATION_1_2 = object : Migration(1,2) {
              override fun migrate(database: SupportSQLiteDatabase) {
                  database.execSQL(
                      &quot;ALTER TABLE account ADD COLUMN client_alt_phone_on_route_sheets INTEGER NOT NULL DEFAULT(0)&quot;
                  )
              }
          }
  
          private fun buildDatabase(context: Context) = Room.databaseBuilder(
              context.applicationContext,
              Database::class.java,
              Constants.DATABASE_NAME
          ).addMigrations(MIGRATION_1_2).createFromAsset(&quot;database.db&quot;).build()
  </code></pre>
  <p>But apparently migration did not work, nor changed anything in the output because the error is still the same. Also, I'm not sure which one is the Room database and which one is the database from assets. My hunch is that the 'Found' output is the one to match from assets because of the <code>BOOLEAN</code> type, but that's not completely clear. Why does it seems like changing the Room <code>@ColumnInfo</code> value type from Boolean to Int doesn't seem to take effect? If migration above needs to be implemented for every column of type <code>BOOLEAN</code> on my database, what is the proper way to apply migration for multiple tables? (since I have more tables that has this <code>BOOLEAN</code> type, though they're not in the error)</p>