| Author |
Message |
5QL53rv3r
Joined: 02 Sep 2010 Posts: 2
|
Posted: Thu Sep 02, 2010 3:21 pm Post subject: table rename means a drop table and recreate? |
|
|
Hi,
I am in the process of evaluating SQL source and I have renamed a table & then went to commit the change. I noticed that SQL source wants to drop the table and the create the table with the new name. Is this how this software handles a rename?
Thanks
M |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1079
|
Posted: Thu Sep 02, 2010 6:07 pm Post subject: |
|
|
Yes, for the time being, a rename isn't treated in any special way so it is seen as a drop and the creation of a new object. Is there any reason why this would cause a problem for you?
David Atkinson
Red Gate Software |
|
| Back to top |
|
 |
5QL53rv3r
Joined: 02 Sep 2010 Posts: 2
|
Posted: Mon Sep 06, 2010 9:36 am Post subject: |
|
|
| will data be lost from the tables or is the data copied to temp tables and then inserted into the renamed table. so it looks like sp_rename isn't used. |
|
| Back to top |
|
 |
David Atkinson
Joined: 05 Dec 2005 Posts: 1079
|
Posted: Mon Sep 06, 2010 6:20 pm Post subject: |
|
|
Yes, if you get latest, data will be lost as we don't know that the rename has occurred. This would be a good reason to save the 'intent' of the change alongside it, and use a smart rename rather than a drop/create.
Thanks for bringing this to our attention. In the meantime, instead of using get latest for this change, you'll have to make a manual change locally with your won rename script (you can try using SQL Refactor's smart rename).
David |
|
| 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