It's great that you can click on a package and it simply installs, but how can you know what files have been introduced to your project, what changes to existing files have been made, and what changes have been made to the database?
Is there a meta file with all this information?
Just thinking about source control, and migrating the content for the installed package from a development environment to a production environment.
"The only part that can get a little tricky is if you need to update the database, or one of the config files. The way to do this is to create a custom usercontrol, and this usercontrol gets fired at the last step of the package installation (you need to set this up in the package.xml file)."
To execute SQL, use the following code in the user control:
StreamReader reader = new StreamReader(base.Server.MapPath(“/umbraco/plugins/nibble/demo/installer/demo.sql”));
You could also put a trace on the database (if you have access) and that will provide you with all the SQL that is being run as part of a package install.
To migrate from dev to production though you would just run the same package install on both environments wouldn't you? Why would you need to know what database scripts are being run?
Installing Packages - what actually happens?
It's great that you can click on a package and it simply installs, but how can you know what files have been introduced to your project, what changes to existing files have been made, and what changes have been made to the database?
Is there a meta file with all this information?
Just thinking about source control, and migrating the content for the installed package from a development environment to a production environment.
Peter,
You could extract the package .zip file and take a look at the files and you should see a package.xml that gives you details on the files.
Mark.
Mark,
Thanks for the reply.
What about if there is a database update as part of the install?
How would I identify what had been done?
Would a .sql file be included in the installer package?
If anyone else needs this info... found this article. If anyone knows a better updated method, please let us know.
http://www.nibble.be/?p=31
"The only part that can get a little tricky is if you need to update the database, or one of the config files. The way to do this is to create a custom usercontrol, and this usercontrol gets fired at the last step of the package installation (you need to set this up in the package.xml file)."
To execute SQL, use the following code in the user control:
StreamReader reader = new StreamReader(base.Server.MapPath(“/umbraco/plugins/nibble/demo/installer/demo.sql”));
string sqlStatement = reader.ReadToEnd();
reader.Close();
SqlHelper.ExecuteNonQuery(GlobalSettings.DbDSN, CommandType.Text, sqlStatement);
Peter,
You could also put a trace on the database (if you have access) and that will provide you with all the SQL that is being run as part of a package install.
To migrate from dev to production though you would just run the same package install on both environments wouldn't you? Why would you need to know what database scripts are being run?
Mark.
Mark,
Yeah, just running the installer is one way of deploying a package to a live environment (albeit a high risk one IMHO).
It's just nice to know what's happening (or about to happen) to your live system is all.
is working on a reply...