visual studio 2012 - How does SQL Server Database Project: Publish decide when to recreate a table? -
i have sql server database project in i've made several changes schema i've changed column data types numeric (18,0)
int
. we're trying normalize data type used primary keys, it's 50/50 mix.
when generate publish script, of tables recreated in script:
create table [dbo].[tmp_xyz] insert table [dbo].[tmp_xyz] select ... [dbo].[xyz] drop table [dbo].[xyz] sp_rename n'[dbo].[tmp_xyz]', n'xyz';
but other tables updated via alter
statements
alter table [dbo].[abc] alter column [abcid] int null;
is there rule dictates when table recreated, , when it's altered in place ?
probably best way right click on object name , choose script ... have options create or alter if couldn't find alter ,you can go design view, right click , choose generate change script ... find alter statement.
Comments
Post a Comment