How to upgrade the DB on a live server when model has changed?

20 views
Skip to first unread message

oldby

unread,
Feb 22, 2012, 3:55:38 AM2/22/12
to RISE
Dear Rise - great software :)

I use the Rise Editor locally
>> generates the code (using code generators: PHPforMySQL.exe & MySQL.exe)
>> saves the file locally
>> uploades the file to the server
>> run the .sql file to install the Database

=> everything works perfect.

My question: this works perfectly in a test environment since the
database is installed each time (when I run the .sql file), how should
I handle the update of the DB when the server is running live?

I cannot reset the database since the data needs to be in the database
after the "update" and it is essential that the database can be
updated since the model has been further developed (new entities,
views and interfaces)?

Best regards.,
Kasper

Joar Swenning

unread,
Feb 22, 2012, 5:28:47 AM2/22/12
to RISE
Hi Kasper,
I'm glad to hear that you like RISE!
You seem to be doing it all right so you can actually just do the same
thing over.

The RISE model file that is created when modeling keeps track of the
evolution of your model. This means that as long as you DO NOT
refactor the model,
re-modeling, generating and running the script would just add whatever
changes have been introduced since last time it was run.

Besides backing-up your database, what is cruicial is that you do not
refactor it. Refactoring would create a new model with the shortest
evolution to the present state rather than the true developed
evolution; making an update impossible.

For more on code generation, see:
http://www.risetobloome.com/Page_1_S.aspx?item=1906

For more on refactoring, see:
http://www.risetobloome.com/Page_1_S.aspx?ITEM=763

Best regards,
Joar

Joar Swenning

unread,
Feb 22, 2012, 6:50:56 AM2/22/12
to RISE
Hi again,
Just a short thing I missed:
Refactoring the model of your already launched solution is a bad idea
if it contains data, as described earlier. Doing it before launch,
however; is usually a good idea. That way you will have your solution
based on the shortest ("cleanest") evolution to the present state
instead of one including every single change from the start of
development.
Best regards,
Joar

Kasper Oldby

unread,
Feb 23, 2012, 4:20:00 AM2/23/12
to RISE
Hi Joar,

That was exactly my next question - thank you very much, your answer
is spot on!

Brgds.,
Kasper
Reply all
Reply to author
Forward
0 new messages