One of the challenges that will be faced by most of the database application developers is updating the program. When a new version is released, updating the program with new features will need to ensure that data entered in the earlier version database is intact. Considering this need, Kushal has a feature, which allows you to port data smoothly to the new version database when the database design gets modified.
You have to follow these simple steps
1. Maintain Version for the database (Different from the program Version). Whenever you make changes in the database, please increment the version. Future applications derived from Kushal will check the version of the database and upgrade it to the latest version.
2. Follow some basic Rules for database Change: Don’t drop any field, (If the whole table is not required, then drop it). Whenever you add a new field, add it at the end of the database.
3. Write Upgrade SQL Statements: Whenever you make database version changes, write few lines of SQL Statement, modify the database as per the new changes.
Open Version Controller.
Open Sample Solution file
In Solution Explorer, Select VersionController.cs
You can see the code of the version controller and the database update statements.
To Create Version Controller in your application, Click on Version Control in Tools
Version Controller window opens.
Enter new Version number of the application.
Enter the SQL statement
Note: If you have more SQL statements use different version numbers for each statement.
And ensure that the version number is greater than the previous.
|<< Previous||Next >>|