Bugfix: correct realm schema for release

In release 0.9.11 we'll have v13, so we don't want to modify this in develop.
This moves Push notification related changes into a new migration as opposed to
merging them into one.
This commit is contained in:
Oskar Thorén 2017-09-18 15:43:14 +02:00 committed by Roman Volosovskyi
parent d30a14a774
commit 1b0409fdc9
4 changed files with 50 additions and 4 deletions

View File

@ -11,7 +11,9 @@
[status-im.data-store.realm.schemas.account.v10.core :as v10]
[status-im.data-store.realm.schemas.account.v11.core :as v11]
[status-im.data-store.realm.schemas.account.v12.core :as v12]
[status-im.data-store.realm.schemas.account.v13.core :as v13]))
[status-im.data-store.realm.schemas.account.v13.core :as v13]
[status-im.data-store.realm.schemas.account.v14.core :as v14]
))
;; TODO(oskarth): Add failing test if directory vXX exists but isn't in schemas.
@ -54,4 +56,8 @@
:migration v12/migration}
{:schema v13/schema
:schemaVersion 13
:migration v13/migration}])
:migration v13/migration}
{:schema v14/schema
:schemaVersion 14
:migration v14/migration}
])

View File

@ -3,7 +3,7 @@
[status-im.data-store.realm.schemas.account.v1.chat-contact :as chat-contact]
[status-im.data-store.realm.schemas.account.v6.command :as command]
[status-im.data-store.realm.schemas.account.v9.command-parameter :as command-parameter]
[status-im.data-store.realm.schemas.account.v13.contact :as contact]
[status-im.data-store.realm.schemas.account.v7.contact :as contact]
[status-im.data-store.realm.schemas.account.v1.discover :as discover]
[status-im.data-store.realm.schemas.account.v1.kv-store :as kv-store]
[status-im.data-store.realm.schemas.account.v10.message :as message]

View File

@ -1,4 +1,4 @@
(ns status-im.data-store.realm.schemas.account.v13.contact
(ns status-im.data-store.realm.schemas.account.v14.contact
(:require [taoensso.timbre :as log]))
(def schema {:name :contact

View File

@ -0,0 +1,40 @@
(ns status-im.data-store.realm.schemas.account.v14.core
(:require [status-im.data-store.realm.schemas.account.v11.chat :as chat]
[status-im.data-store.realm.schemas.account.v1.chat-contact :as chat-contact]
[status-im.data-store.realm.schemas.account.v6.command :as command]
[status-im.data-store.realm.schemas.account.v9.command-parameter :as command-parameter]
[status-im.data-store.realm.schemas.account.v14.contact :as contact]
[status-im.data-store.realm.schemas.account.v1.discover :as discover]
[status-im.data-store.realm.schemas.account.v1.kv-store :as kv-store]
[status-im.data-store.realm.schemas.account.v10.message :as message]
[status-im.data-store.realm.schemas.account.v12.pending-message :as pending-message]
[status-im.data-store.realm.schemas.account.v1.processed-message :as processed-message]
[status-im.data-store.realm.schemas.account.v1.request :as request]
[status-im.data-store.realm.schemas.account.v1.tag :as tag]
[status-im.data-store.realm.schemas.account.v1.user-status :as user-status]
[status-im.data-store.realm.schemas.account.v5.contact-group :as contact-group]
[status-im.data-store.realm.schemas.account.v5.group-contact :as group-contact]
[status-im.data-store.realm.schemas.account.v8.local-storage :as local-storage]
[status-im.data-store.realm.schemas.account.v13.handler-data :as handler-data]
[taoensso.timbre :as log]))
(def schema [chat/schema
chat-contact/schema
command/schema
command-parameter/schema
contact/schema
discover/schema
kv-store/schema
message/schema
pending-message/schema
processed-message/schema
request/schema
tag/schema
user-status/schema
contact-group/schema
group-contact/schema
local-storage/schema
handler-data/schema])
(defn migration [old-realm new-realm]
(log/debug "migrating v14 account database: " old-realm new-realm))