Merge lp:~karni/telegram-app/telegram-app-db-upgrade-support into lp:telegram-app/app

Proposed by Michał Karnicki
Status: Merged
Merged at revision: 38
Proposed branch: lp:~karni/telegram-app/telegram-app-db-upgrade-support
Merge into: lp:telegram-app/app
Diff against target: 30 lines (+13/-0)
1 file modified
telegram.qml (+13/-0)
To merge this branch: bzr merge lp:~karni/telegram-app/telegram-app-db-upgrade-support
Reviewer Review Type Date Requested Status
Roberto Mier Escandon (community) Approve
Review via email: mp+231921@code.launchpad.net

Description of the change

Support for db upgrades.

To post a comment you must log in.
Revision history for this message
Roberto Mier Escandon (rmescandon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'telegram.qml'
--- telegram.qml 2014-08-21 14:49:21 +0000
+++ telegram.qml 2014-08-22 15:52:35 +0000
@@ -136,6 +136,13 @@
136 }136 }
137137
138 Settings {138 Settings {
139 id: appConfig
140 category: "config"
141
142 property int databaseVersion: 0
143 }
144
145 Settings {
139 // TODO Update Qt.application.domain to fix this path:146 // TODO Update Qt.application.domain to fix this path:
140 // ~/.config/qt-project.org/com.ubuntu.telegram.conf147 // ~/.config/qt-project.org/com.ubuntu.telegram.conf
141 id: sessionSettings148 id: sessionSettings
@@ -157,6 +164,12 @@
157 id: telegramClient164 id: telegramClient
158 configPath: "~/.config/" + applicationName165 configPath: "~/.config/" + applicationName
159 publicKeyFile: "telegram.pub"166 publicKeyFile: "telegram.pub"
167 databaseVersion: appConfig.databaseVersion
168
169 onDatabaseVersion: {
170 console.log("Upgraded db to version " + databaseVersion);
171 appConfig.databaseVersion = databaseVersion;
172 }
160173
161 onError: {174 onError: {
162 // TODO Replace these with constants.175 // TODO Replace these with constants.

Subscribers

People subscribed via source and target branches