提供的架构版本1小于React本机中的最后一个版本0

时间:2016-07-30 07:23:02

标签: react-native realm

虽然问题看起来与另一个现有问题重复,但我无法理解。为了更改架构的一个属性的类型,我根据需要添加了invalid = '{"DisplayName":""fat" Tony" Elvis","Time":null,"OverallRank":19,"AgeRank":4}' # strip away { and } tailhead = invalid[1..-2] props = tailhead.split(/,(?=".+"\s*:)/) pairs = props.map {|p| p.split(/:(?=(?:".*"|\d+|null|false|true)$)/i)} escaped = pairs.map do |k,v| # is this a string property? string = v[/^"(.*?)"$/, 1] string ? [k, "\"#{string.gsub(/"/,'\\"')}\""] : [k,v] end valid = '{' + escaped.map {|p| p.join(':')}.join(',') + '}' json_data = JSON.parse(valid) (例如versionSchema,但它显示:

  

提供的架构版本1小于上次设置的版本0

我试图同时删除添加的句子并编辑句子,但它显示了同样的错误,就好像它已经记住它一样。

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:0)

如果您的数据库设置为readOnly,则可能会出现此问题。我将其更改为false并且迁移块开始被调用。

答案 1 :(得分:0)

在AppDelegate.m中:

  query-3.3.1.min.js:2 jQuery.Deferred exception: $$.each is not a 
   function TypeError: $$.each is not a function
        at Object.initialize 
   (http://127.0.0.1:8000/static/js/datatableview.js:20:12)
        at HTMLDocument.<anonymous> (http://127.0.0.1:8000/:17:23)
        at l (https://code.jquery.com/jquery-3.3.1.min.js:2:29375)
        at c (https://code.jquery.com/jquery-3.3.1.min.js:2:29677) 
    undefined
    w.Deferred.exceptionHook @ jquery-3.3.1.min.js:2
    c @ jquery-3.3.1.min.js:2
    setTimeout (async)
    (anonymous) @ jquery-3.3.1.min.js:2
    u @ jquery-3.3.1.min.js:2
    fireWith @ jquery-3.3.1.min.js:2
    fire @ jquery-3.3.1.min.js:2
    u @ jquery-3.3.1.min.js:2
    fireWith @ jquery-3.3.1.min.js:2
    ready @ jquery-3.3.1.min.js:2
    _ @ jquery-3.3.1.min.js:2
    jquery-3.3.1.min.js:2 Uncaught TypeError: $$.each is not a function
        at Object.initialize (datatableview.js:20)
        at HTMLDocument.<anonymous> ((index):17)
        at l (jquery-3.3.1.min.js:2)
        at c (jquery-3.3.1.min.js:2)

///在您的[AppDelegate didFinishLaunchingWithOptions:]

#import <Realm/RLMRealmConfiguration.h>
相关问题