1

Closed

Diff api - change nullable column to not nullable

description

I changed a nullable column to non nullable and compared the dbs. The generated script looks like this:
-- Script Date: 05.05.2011 11:31 - Generated by ExportSqlCe version 3.5.0.11
ALTER TABLE [TABLE] ALTER COLUMN [COLUMN] nvarchar(4000) NOT NULL
GO
 
I think the generated script should look like this (in this case the default value is '')
UPDATE [TABLE] SET [COLUMN]='' WHERE [COLUMN] IS NULL
GO
ALTER TABLE [TABLE] ALTER COLUMN [COLUMN] nvarchar(4000) NOT NULL
GO
 
Best regards
Matthias
Closed Dec 5, 2015 at 12:10 PM by ErikEJ
Moved to github

comments