Creating update scripts through Packager API
AvonWyss
Posts: 35
I'm trying to write a small tool (to be used on our build server) which should create a migration script for two different versions of a database.
However, I would like to get the update scripts only; I'm not looking for a C# or EXE type project. Basically, I'm looking to get the same scripts one can review when using the UI during the packaging process.
Since the packaging API is quite small, I'm afraid that this functionality has not been exposed through the packaging API. So how can I do this? If the packaging API does not expose it, is there some Compare API and Data Compare API which can be used to achieve this?
However, I would like to get the update scripts only; I'm not looking for a C# or EXE type project. Basically, I'm looking to get the same scripts one can review when using the UI during the packaging process.
Since the packaging API is quite small, I'm afraid that this functionality has not been exposed through the packaging API. So how can I do this? If the packaging API does not expose it, is there some Compare API and Data Compare API which can be used to achieve this?
Comments
Redgate Software
Anyways, I still do not get a script file... here's my code snippet I'm using for testing (only schema migration, no data):
I'm sorry about the problem with the API.
BTW, your code seems to be missing a step - you need a line that looks a bit like:
after your line which looks like:
Redgate Software
Thanks for the hint, I'll try that.
Even worse, this message box is opened by the API, not by my code, which may make the application hang if run on a server without GUI (such as a buld server...) - that should certainly not happen in a non-visible API!
Can you please provide me a working sample to generate the SQL update scripts?