Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the best way to process database upgrades in Windows and Web App?
    text
    copied!<p>I know how to create scripts, but it's knowing how I implement these scripts within a windows app or web application?</p> <p>Focusing on a web app, I have all upgrade scripts in a folder like: \install\upgrade_1.4.99.sql, upgrade_1.4.101.sql etc</p> <p>C# code checks current code database version with c# version and loops through each sql script in order and runs the script.</p> <p>If the user is not an administrator, display appropriate message stating an upgrade is imminent... something similar (logs out user). Administrators (us) are redirected to upgrade webpage and runs the scripts displaying failure or success for each script. A Failure rolls back the SQL Transaction.</p> <p>We basically have several instances of one web application and frustrated with the manual upgrades we use to manage.</p> <p>The most prominent issue we had was data upgrades... always missing essential data transfers like static data (configuration settings etc). So we use RedGate for schema and data upgrade scripting.</p> <p>So is my method above of upgrading websites the best way to go about this? Can I assume the same process for windows applications? </p> <p>Also I'm certain my method of reading the script file could be improved. We simply read each line of text in the sql file and wait for a "GO" and save this string into an array before processing them all. (I didn't write this code). The process involves one big Begin and Commit Trans... just not sure if this right or not.</p> <p>Sorry not sure if there are too many questions here.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload