lets add some advanced values to Tasks too, wont be used initially
This commit is contained in:
parent
5d781d1f7c
commit
b6d21c1b4a
|
@ -112,7 +112,7 @@ abstract class EventsDatabase : RoomDatabase() {
|
||||||
private val MIGRATION_5_6 = object : Migration(5, 6) {
|
private val MIGRATION_5_6 = object : Migration(5, 6) {
|
||||||
override fun migrate(database: SupportSQLiteDatabase) {
|
override fun migrate(database: SupportSQLiteDatabase) {
|
||||||
database.apply {
|
database.apply {
|
||||||
execSQL("CREATE TABLE IF NOT EXISTS `tasks` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `start_ts` INTEGER NOT NULL, `title` TEXT NOT NULL, `description` TEXT NOT NULL, `import_id` TEXT NOT NULL, `time_zone` TEXT NOT NULL, `flags` INTEGER NOT NULL, `event_type` INTEGER NOT NULL, `last_updated` INTEGER NOT NULL, `source` TEXT NOT NULL, `color` INTEGER NOT NULL)")
|
execSQL("CREATE TABLE IF NOT EXISTS `tasks` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `start_ts` INTEGER NOT NULL, `title` TEXT NOT NULL, `description` TEXT NOT NULL, `reminder_1_minutes` INTEGER NOT NULL, `reminder_2_minutes` INTEGER NOT NULL, `reminder_3_minutes` INTEGER NOT NULL, `repeat_interval` INTEGER NOT NULL, `repeat_rule` INTEGER NOT NULL, `repeat_limit` INTEGER NOT NULL, `repetition_exceptions` TEXT NOT NULL, `import_id` TEXT NOT NULL, `time_zone` TEXT NOT NULL, `flags` INTEGER NOT NULL, `event_type` INTEGER NOT NULL, `last_updated` INTEGER NOT NULL, `source` TEXT NOT NULL, `color` INTEGER NOT NULL)")
|
||||||
execSQL("CREATE UNIQUE INDEX IF NOT EXISTS `index_tasks_id` ON `tasks` (`id`)")
|
execSQL("CREATE UNIQUE INDEX IF NOT EXISTS `index_tasks_id` ON `tasks` (`id`)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,13 @@ data class Task(
|
||||||
@ColumnInfo(name = "start_ts") var startTS: Long = 0L,
|
@ColumnInfo(name = "start_ts") var startTS: Long = 0L,
|
||||||
@ColumnInfo(name = "title") var title: String = "",
|
@ColumnInfo(name = "title") var title: String = "",
|
||||||
@ColumnInfo(name = "description") var description: String = "",
|
@ColumnInfo(name = "description") var description: String = "",
|
||||||
|
@ColumnInfo(name = "reminder_1_minutes") var reminder1Minutes: Int = REMINDER_OFF,
|
||||||
|
@ColumnInfo(name = "reminder_2_minutes") var reminder2Minutes: Int = REMINDER_OFF,
|
||||||
|
@ColumnInfo(name = "reminder_3_minutes") var reminder3Minutes: Int = REMINDER_OFF,
|
||||||
|
@ColumnInfo(name = "repeat_interval") var repeatInterval: Int = 0,
|
||||||
|
@ColumnInfo(name = "repeat_rule") var repeatRule: Int = 0,
|
||||||
|
@ColumnInfo(name = "repeat_limit") var repeatLimit: Long = 0L,
|
||||||
|
@ColumnInfo(name = "repetition_exceptions") var repetitionExceptions: ArrayList<String> = ArrayList(),
|
||||||
@ColumnInfo(name = "import_id") var importId: String = "",
|
@ColumnInfo(name = "import_id") var importId: String = "",
|
||||||
@ColumnInfo(name = "time_zone") var timeZone: String = "",
|
@ColumnInfo(name = "time_zone") var timeZone: String = "",
|
||||||
@ColumnInfo(name = "flags") var flags: Int = 0,
|
@ColumnInfo(name = "flags") var flags: Int = 0,
|
||||||
|
|
Loading…
Reference in New Issue