Currently we rename the filename with .sql extension if there are any changes into it and we want it to be deployed to destination sql server database.
If we dont rename it, the changes do not reflect after deployment, because the file is matched with the content of SchemaVersions table which maintains the records of already executed files and it does not rerun. Can you please suggest any recommeneded approach so that we dont need to rename the filename if there are any changes into its contents.
We are currently using 0.6.4 and upgrading it to 0.9.1 versions of dbops module. The structure of SchemaVersions table has been changed from 0.6.4 to 0.9.1 versions of dbops. However, when we switch from 0.6.4 to 0.9.1 in existing database for deployment, then the structure of this table remains same.
Currently we are using following commands to create the package:
New-DBOPackage -Path C:\Temp\DummyRepo.zip -Build DummyRepo -ScriptPath C:\Repos\DummyRepo\Scripts -Match .*.sql -force -PreScriptPath C:\Repos\DummyRepo\Prescripts -PostScriptPath C:\Repos\DummyRepo\Postscripts
And using following command to deploy it:
Install-DBOPackage -Path C:\Temp\DummyRepo.zip -SqlInstance .\sql2019 -Database DummyDB1 -CreateDatabase -Verbose
Currently we rename the filename with .sql extension if there are any changes into it and we want it to be deployed to destination sql server database.
If we dont rename it, the changes do not reflect after deployment, because the file is matched with the content of SchemaVersions table which maintains the records of already executed files and it does not rerun. Can you please suggest any recommeneded approach so that we dont need to rename the filename if there are any changes into its contents.
We are currently using 0.6.4 and upgrading it to 0.9.1 versions of dbops module. The structure of SchemaVersions table has been changed from 0.6.4 to 0.9.1 versions of dbops. However, when we switch from 0.6.4 to 0.9.1 in existing database for deployment, then the structure of this table remains same.
Currently we are using following commands to create the package:
New-DBOPackage -Path C:\Temp\DummyRepo.zip -Build DummyRepo -ScriptPath C:\Repos\DummyRepo\Scripts -Match .*.sql -force -PreScriptPath C:\Repos\DummyRepo\Prescripts -PostScriptPath C:\Repos\DummyRepo\Postscripts
And using following command to deploy it:
Install-DBOPackage -Path C:\Temp\DummyRepo.zip -SqlInstance .\sql2019 -Database DummyDB1 -CreateDatabase -Verbose