Create indexes in database

This commit is contained in:
2016-04-03 05:10:13 -04:00
parent 4cec7d7367
commit 7f009e2365
2 changed files with 5 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ android {
minSdkVersion 15
targetSdkVersion 23
buildConfigField "Integer", "databaseVersion", "12"
buildConfigField "Integer", "databaseVersion", "13"
buildConfigField "String", "databaseFilename", "\"uhabits.db\""
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View File

@@ -0,0 +1,4 @@
create index idx_score_habit_timestamp on score(habit, timestamp);
create index idx_checkmark_habit_timestamp on checkmarks(habit, timestamp);
create index idx_repetitions_habit_timestamp on repetitions(habit, timestamp);
create index idx_streak_habit_end on streak(habit, end);