Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Mason 20 posts 40 karma points
    Nov 15, 2012 @ 03:35
    Peter Mason
    0

    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.

  • Mark Bennett 199 posts 375 karma points
    Nov 15, 2012 @ 10:37
    Mark Bennett
    0

    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.

  • Peter Mason 20 posts 40 karma points
    Nov 15, 2012 @ 23:21
    Peter Mason
    0

    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?

  • Peter Mason 20 posts 40 karma points
    Nov 16, 2012 @ 00:02
    Peter Mason
    0

    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);

  • Mark Bennett 199 posts 375 karma points
    Nov 16, 2012 @ 10:11
    Mark Bennett
    0

    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.

     

  • Peter Mason 20 posts 40 karma points
    Nov 19, 2012 @ 02:15
    Peter Mason
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft