title: error crash RoomCaused by: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: products.id (code 1555)
body: <p>Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number. You can simply fix this by increasing the version number.</p>
  
  <p>product.kt</p>
  
  <pre><code>
  package com.store.bamboo.model.room
  
  import androidx.room.ColumnInfo
  import androidx.room.Entity
  import androidx.room.PrimaryKey
  import com.google.gson.annotations.SerializedName
  
  @Entity(tableName = "products")
  data class Product(
      @PrimaryKey(autoGenerate = true)
      @ColumnInfo(name = "id")
      val id: Int,
      @SerializedName("name")
      @ColumnInfo(name = "name")
      var name: String,
      @SerializedName("description")
      @ColumnInfo(name = "description") var description: String,
      @SerializedName("units")
      @ColumnInfo(name = "units") var units:Int,
      @SerializedName("price")
      @ColumnInfo(name = "price") var price: Double,
      @SerializedName("off")
      @ColumnInfo(name = "off") var off: Double,
      @SerializedName("image")
      @ColumnInfo(name = "image") var image: String
  )
  
  </code></pre>
  
  <p>AppDatabase.kt</p>
  
  <pre><code>package com.store.bamboo.model.room
  
  import androidx.room.Database
  import androidx.room.RoomDatabase
  
  @Database(entities = arrayOf(Product::class), version = 1)
  abstract class AppDatabase : RoomDatabase() {
      abstract fun productDao(): ProductDao
  }
  
  </code></pre>
  
  <p>Error Code : 1555 (SQLITE_CONSTRAINT_PRIMARYKEY)
      Caused By : Abort due to constraint violation.
          (UNIQUE constraint failed: products.id (code 1555))
      #################################################################
          at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
          at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
          at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
          at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:281)
          at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
          at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
          at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
          at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
          at java.util.concurrent.FutureTask.run(FutureTask.java:237)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
          at java.lang.Thread.run(Thread.java:762)
       Caused by: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: products.id (code 1555)
      #################################################################
      Error Code : 1555 (SQLITE_CONSTRAINT_PRIMARYKEY)
      Caused By : Abort due to constraint violation.
          (UNIQUE constraint failed: products.id (code 1555))</p>