How can we help you today? How can we help you today?
jheidt
Andras wrote: Well, this is a rather interesting problem. You set up a default value, and no longer allow nulls. But the table itself contains nulls [image] IMHO null data in such tables should be updated first to the new desired value, which may or may not be the new default value. It is difficult to decide automatically whether the nullability has been changed by mistake, or what the new value for the nullable column should be. While I would say that doing the data change automatically would corrupt the database, not everyone is as paranoid as I am, and I can see your point that such behaviour could be useful in certain cases. Therefore I've added this feature to SQL Compare. We will use the DRI default with ISNULL if a colum is changed from nullable to not nullable and a DRI default is already set up on the non nullable side, but not on the column that allows nulls. Also, in the first iteration we will not allow automatic reverting to the default value if the datatype has changed in any way. Assuming this feature will not bring unforseen problems in our tests it will be available in the next major release of SQL Compare (SQL Compare 7, scheduled for release in Q3). There will be a high priority warning accompanying such automatic data mangling. Regards, Andras Indeed, it could cause unintended values to be inserted to the column, a perfect example would be DateUpdated or DateCreated columns with default values, would then get bad data. I am aware of that situation, but the problem is that we can't use SQL Compare to automate our schema deployments even though thats exactly why we purchased it, and it's a bit frustrating - various versions of our schema exist on our customers side and the nullability thing is really a show stopper. It's unfortunate, but I guess I'll have to wait for v7. Is there an extensibility model I can plug into and write some code for? This is going to really backburner our planned roll-out, and SQL Compare is pretty much the only game in town, and I dont want to hand-roll the code to avoid this situation. Any suggestions? / comments
Andras wrote: Well, this is a rather interesting problem. You set up a default value, and no longer allow nulls. But the table itself contains nulls IMHO null data in such tables should be upda...
0 votes
Couldn't you just put the value you wanted as the default value for the column, run the synch, remove the default value, and then resynch? / comments
Couldn't you just put the value you wanted as the default value for the column, run the synch, remove the default value, and then resynch?
0 votes