More in this section

Forums / General Discussions / How to upgrade database using fluent mappings

How to upgrade database using fluent mappings

2 posts, 0 answered
  1. Anton Mernov
    Anton Mernov avatar
    110 posts
    03 Dec 2008
    13 May 2011
    Link to this post
    Hi there,

    I faced with a problem when I need to upgrade my tables in the database using a model that has been extended.
    I used this blog post to declare my model. I made some changes in the custom classes and now I'm trying to upgrade database but without any success...  no changes, no errors... I just updated the declaration of fluent mappings but now I guess it was a wrong way...

    How can I achieve this using the fluent mappings?

    Thanks in advance,
  2. Nikolay Datchev
    Nikolay Datchev avatar
    87 posts
    01 Nov 2016
    19 May 2011
    Link to this post
    Hello Anton ,

    Not sure what is the exact problem, but generally the data provider is not upgraded until it is used for the first time. So it might get upgraded when you navigate to some page where the mapped data is retrieved. Also in order for the upgrade to take place - your module build number has to be bigger than the previous one used to create the db structure (we keep this in some log table), so if your module doesn't have auto incrementing build numbers - we cannot recognize the mapping has changed. This is because we don't want to test the whole db structure is up-to date every time some data provider is initialized -since this is quite slow. If neither of these explanations help's you - you can try to send us the project and the non-upgraded database to test what's going on.

    Nikolay Datchev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered