Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff api - change nullable column to not nullable #6

Closed
ErikEJ opened this issue Dec 5, 2015 · 1 comment
Closed

Diff api - change nullable column to not nullable #6

ErikEJ opened this issue Dec 5, 2015 · 1 comment
Labels
Milestone

Comments

@ErikEJ
Copy link
Owner

ErikEJ commented Dec 5, 2015

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

@ErikEJ ErikEJ added the api label Dec 5, 2015
@ErikEJ ErikEJ added this to the Backlog milestone Dec 8, 2015
@ErikEJ
Copy link
Owner Author

ErikEJ commented Dec 11, 2015

Not so fond of this, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant