Area of the setup routine for that product I am focusing on installs a database update utility. The utility inspections the present version from the customers database and (if required) executes a number of SQL claims that upgrade the database to the present version.
Two key options that come with this routine:
- Once started, it runs without user interaction
- SQL procedures preserve the integrity from the customers data
The aim would be to keep your setup/database routine as easy as feasible for the consumer (the audience is non-technical). However, I've found that in some instances, both of these features are in odds. For instance, I wish to give a unique index to 1 of my tables - however it's entirely possible that existing data already breaks this rule. I possibly could:
- Quietly choose what's "right" for that user and discard (or archive) data or
- Request the consumer to know exactly what a unique index is and encourage them to choose what data goes where
Neither option sounds attractive to me. I possibly could compromise and never produce a unique index whatsoever, but that will suck. I question what others do in cases like this?
Take a look at SQL Packager from Red-colored-Gate. I haven't personally tried on the extender, however these men make good tools overall which appears to complete what you are searching for. It let us you customize the script to personalize the install: http://www.red-gate.com/products/SQL_Packager/index.htm
You won't ever throw a customers data out. One possible choice is to produce the unique index. When the index creation fails, inform them it unsuccessful, let them know what they desire to analyze, and supply them a script they are able to run when they find there is a data error they decide to repair.