| Author |
Message |
andy.c
Joined: 02 Aug 2007 Posts: 8
|
Posted: Thu Jan 03, 2008 1:00 am Post subject: Overwriting object scripts in a scripts folder. |
|
|
Hi,
Is there a way to set the script save behaviour in the Database.SaveToFolder method so that the object scripts can be overwritten instead of a new script file being created with a version number appended to the file name?
Thanks,
Andy |
|
| Back to top |
|
 |
andy.c
Joined: 02 Aug 2007 Posts: 8
|
Posted: Thu Jan 03, 2008 11:24 pm Post subject: Something even stranger... |
|
|
I have found some strange behaviour with the SQL Tookit which would like to get some clarification on.
When comparing one scripts folder to anther scripts folder I am getting some inconsistent behaviour.
If I update a source proc and then compare to the destination object and execute the script actions against the destination then the script file is updated as expected.
But if I delete a source proc and do the comparison and execution on the destination scripts folder the destination script file is emptied out (0 bytes) instead of being deleted.
Also if I restore the deleted source proc and then compare and execute on the destination scripts folder, the destination script file is not updated with the restored proc. Instead the file remains a 0 byte file and a new script file is created with the number 1 appended to the file name.
Is this behaviour by design?
This behaviour makes it difficult to build some kind of automated check in with source control (Subversion in this case).
I am using SQL Toolkit 6.
Thanks,
Andy |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Fri Jan 04, 2008 10:42 am Post subject: |
|
|
Hi Andy,
I think that the script to file engine works this way on purpose, specifically for the reason of source control. If it deletes the script file, it will appear in the source control as MISSING, which may lead people to the conclusion that SQL Compare ate the file. If it's replaced by a zero-length file instead, then you won't waste time trying to figure out why you have a missing file. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
Michelle Taylor
Joined: 30 Oct 2006 Posts: 519 Location: Red Gate Software
|
Posted: Tue Jan 08, 2008 12:38 pm Post subject: |
|
|
| I have added a feature request to the SQL Compare project for SQL Compare to write objects into zero-length files instead of treating them like other pre-existing files that might have something important in and need to be preserved. Does this cover the behaviour you were looking for? |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group