1. #1
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    145
    Answers
    6
    Vote Rating
    2
    kworam is on a distinguished road

      0  

    Default Answered: Best practice for data migration in localstorage

    Answered: Best practice for data migration in localstorage


    I have a model that I store in 'localstorage'. The model started out with 4 fields (call it version 1) but over the course of development, I added a couple more fields to it (version 2). I now need to code for the situation where version 2 code encounters version 1 records in 'localstorage'. I refer to this as data migration. What is the best practice to handle this situation in Sencha Touch 2?

  2. It should ignore those fields and next time you sync you would likely loose that data.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,672
    Answers
    3354
    Vote Rating
    748
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Technically it should just work. I don't see any reason why it wouldn't.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    145
    Answers
    6
    Vote Rating
    2
    kworam is on a distinguished road

      0  

    Default adding new fields requires no code changes.

    adding new fields requires no code changes.


    Sounds like appending new fields and keeping the existing fields works with no code change needed. That's good to hear. I guess I haven't encountered a situation yet where I delete one of the existing fields in a record. Will the framework also handle that situation with no code change needed?

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,672
    Answers
    3354
    Vote Rating
    748
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It should ignore those fields and next time you sync you would likely loose that data.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha Premium Member
    Join Date
    Mar 2008
    Posts
    145
    Answers
    6
    Vote Rating
    2
    kworam is on a distinguished road

      0  

    Default thanks

    thanks


    thanks for the info.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar