What's the best way to run a the same SQL script on each deployment

I have a SQL script which copies some data to our test DB which needs to be run on each deployment.

I first tried creating a package and a step along the lines of http://octopusdeploy.com/blog/howto/deploy-a-sql-database
which contained the SQL script and a Deploy.ps1 to run it.
That ran OK the first time but after that it doesn’t run again unless I ‘Force redeployment’ which isn’t very satisfactory.

The only other thing I can think to try is putting the SQL script and a Deploy.ps1 in the website package but that, I think, would mean including the SQL script in the website project which I don’t want to do.
I guess I could put the SQL script on a network share or a path on the deployment machine and put the full path to it in Deploy.ps1

If this gets implemented: http://octopusdeploy.uservoice.com/forums/170787-general/suggestions/3721946-ability-to-run-a-powershell-script-once-before, it would be good to be able to run it from there.

Any other ideas?

For reference my Deploy.ps1:
@@@
if ( Get-PSSnapin -Registered | where {$.name -eq ‘SqlServerProviderSnapin100’} )
{
if( !(Get-PSSnapin | where {$
.name -eq ‘SqlServerProviderSnapin100’}))
{
Add-PSSnapin SqlServerProviderSnapin100 | Out-Null
} ;
if( !(Get-PSSnapin | where {$.name -eq ‘SqlServerCmdletSnapin100’}))
{
Add-PSSnapin SqlServerCmdletSnapin100 | Out-Null
}
}
else
{
if( !(Get-Module | where {$
.name -eq ‘sqlps’}))
{
Import-Module ‘sqlps’ –DisableNameChecking
}
}
Invoke-Sqlcmd -server *** -Database *** -Username *** -Password *** -Verbose -InputFile “Reload_Reports.sql” | Write-Host
@@@

By default Octopus will only deploy packages that have changed. If you are using the same package version each time that would explain what you’re seeing.

It looks like the OctopusForcePackageRedeployment variable will do what you want. Set that variable to true for the appropriate step and it’s just like clicking the ‘force redeployment’ box each time.

I haven’t tested this, I’m basing it on the documentation and Paul’s answer to another post. Hopefully this works for you.

Yeah - that works - Thanks!

Only downside is there is a new folder with the same script each time, but I can live with that.

Cheers