Commit bfddb506 authored by Lucio Maciel's avatar Lucio Maciel

Update database

parent bfe320af
...@@ -7,7 +7,7 @@ import chat.rocket.android.db.model.UserEntity ...@@ -7,7 +7,7 @@ import chat.rocket.android.db.model.UserEntity
@Database( @Database(
entities = [UserEntity::class, ChatRoomEntity::class], entities = [UserEntity::class, ChatRoomEntity::class],
version = 2, version = 3,
exportSchema = true exportSchema = true
) )
abstract class RCDatabase : RoomDatabase() { abstract class RCDatabase : RoomDatabase() {
......
...@@ -5,7 +5,7 @@ import androidx.room.Index ...@@ -5,7 +5,7 @@ import androidx.room.Index
import androidx.room.PrimaryKey import androidx.room.PrimaryKey
@Entity(tableName = "users", @Entity(tableName = "users",
indices = [(Index(value = ["username"], unique = true))]) indices = [Index(value = ["username"])])
data class UserEntity( data class UserEntity(
@PrimaryKey override val id: String, @PrimaryKey override val id: String,
var username: String? = null, var username: String? = null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment