I couldn\'t find any information how to annotate a SQL - \"DEFAULT\" value while looking into the @ColumnInfo docs for the new Android Persistence Library.
Does Room
With the release of room persistence 2.2.0, there's a new property added to @ColumnInfo annotation which can be used to specify the default value of a column. See documentation.
@Entity(tableName = "users")
data class User(
@PrimaryKey val id: Long,
@ColumnInfo(name = "user_name", defaultValue = "temp") val name: String
@ColumnInfo(name = "last_modified", defaultValue = "CURRENT_TIMESTAMP" ) val lastModified: String
)