From 0489dc39e0bed7ba7d8ca7a966e45e8d29ca9197 Mon Sep 17 00:00:00 2001 From: Rechee Date: Mon, 6 Jan 2020 12:46:05 -0800 Subject: [PATCH] updating db version and adding migration for question column --- .../src/main/java/org/isoron/uhabits/core/Config.java | 2 +- android/uhabits-core/src/main/resources/migrations/23.sql | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 android/uhabits-core/src/main/resources/migrations/23.sql diff --git a/android/uhabits-core/src/main/java/org/isoron/uhabits/core/Config.java b/android/uhabits-core/src/main/java/org/isoron/uhabits/core/Config.java index ffb05939f..286755a33 100644 --- a/android/uhabits-core/src/main/java/org/isoron/uhabits/core/Config.java +++ b/android/uhabits-core/src/main/java/org/isoron/uhabits/core/Config.java @@ -22,5 +22,5 @@ package org.isoron.uhabits.core; public class Config { public static final String DATABASE_FILENAME = "uhabits.db"; - public static int DATABASE_VERSION = 22; + public static int DATABASE_VERSION = 23; } diff --git a/android/uhabits-core/src/main/resources/migrations/23.sql b/android/uhabits-core/src/main/resources/migrations/23.sql new file mode 100644 index 000000000..d61b4d454 --- /dev/null +++ b/android/uhabits-core/src/main/resources/migrations/23.sql @@ -0,0 +1,5 @@ +alter table Habits add column question text; + +update Habits set question = description + +update Habits set description = null \ No newline at end of file