Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to change widget action #1960

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add database entry
  • Loading branch information
Peketr committed Mar 18, 2024
commit 745ef6ac4aff8a5d78cb077cc3868f79374b7718
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ package org.isoron.uhabits.core

const val DATABASE_FILENAME = "uhabits.db"

const val DATABASE_VERSION = 25
const val DATABASE_VERSION = 26
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ class HabitRecord {
@field:Column
var uuid: String? = null

@field:Column
var increment: Double? = 0.0

fun copyFrom(model: Habit) {
id = model.id
name = model.name
Expand All @@ -114,6 +117,7 @@ class HabitRecord {
reminderMin = reminder!!.minute
reminderDays = reminder.days.toInteger()
}
increment = model.increment
}

fun copyTo(habit: Habit) {
Expand All @@ -137,5 +141,6 @@ class HabitRecord {
WeekdayList(reminderDays!!)
)
}
habit.increment = increment!!
}
}
1 change: 1 addition & 0 deletions uhabits-core/src/jvmMain/resources/migrations/26.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table Habits add column increment;
Loading