title: Run the Update sql Script on Existing Database using WIX Installer during Upgrade
body: <p>I am creating installer for Creating the databaase using WIX. But I could not able to find a way to run the udate script during Upgrade.</p>
  
  <p>Code for Create DB</p>
  
  <pre><code>&lt;Directory Id="DFDB" Name="DealFoundryDataBase" FileSource="$(var.SolutionDir)DealFoundrySetup/DataBaseScripts"&gt;
            &lt;Component Id='SqlComponent_Files' Guid='{07DB58E6-5AFC-4BB0-84EC-C5EC6B0E5CA7}' KeyPath='yes'&gt;
              &lt;File Id="CreateTable_sql" Name="CreateTable.sql"/&gt;
              &lt;File Id="InsertStatements_sql" Name="InsertStatements.sql"/&gt;
              &lt;File Id="DFCoreScript_sql" Name="DFCoreScript.sql"/&gt;
            &lt;/Component&gt;
  
              &lt;Component Id='SqlComponent' Guid='{C5412828-84FB-4CC5-AC71-AC246B9D09E8}' KeyPath='yes'&gt;
                &lt;Condition&gt;&lt;![CDATA[NOT OLDER_VERSION_FOUND]]&gt; &lt;/Condition&gt;
                &lt;sql:SqlDatabase Id='SqlDatabase' Database='[PRO_DFDATABASE_NAME]' User='SQLUser' Server='[PRO_DFDATABASE_SOURCE]'
                  CreateOnInstall='yes' DropOnUninstall='yes' ContinueOnError='yes'&gt;
                  &lt;sql:SqlScript Id='CreateTable' BinaryKey='CreateTable' ExecuteOnInstall='yes' /&gt;
                  &lt;!--&lt;sql:SqlScript Id='InsertStatements' BinaryKey='InsertStatements' ExecuteOnInstall='yes'/&gt;--&gt;
                &lt;/sql:SqlDatabase&gt;
              &lt;/Component&gt;
  
  
  
          &lt;/Directory&gt;
  
   &lt;Binary Id ='CreateTable' SourceFile='$(var.SolutionDir)DealFoundrySetup/DataBaseScripts/DFCoreScript.sql'/&gt;
      &lt;Binary Id ='InsertStatements' SourceFile='$(var.SolutionDir)DealFoundrySetup/DataBaseScripts/InsertStatements.sql'/&gt;
      &lt;Binary Id ='MasterData' SourceFile='$(var.SolutionDir)DealFoundrySetup/DataBaseScripts/MasterData.sql'/&gt;
      &lt;util:User Id='SQLUser' Name='[PRO_DFDATABASE_USERID]' Password='[PRO_DFDATABASE_PASSWORD]' /&gt;
  </code></pre>
  
  <p>The above lines of code is working fine for creting the DB on Install, but I want to run the update script during upgrade on Existing DB
  Plz Help me.
  Thanks in Advance. </p>