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

RevEng: varchar column with default null constraint generates warning #3249

Closed
StevenBonePgh opened this issue Sep 28, 2015 · 1 comment
Closed
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@StevenBonePgh
Copy link

The command

Scaffold-DbContext -Connection "<connection string>" -Provider EntityFramework.SqlServer

Generates the following warning

Unable to interpret the string ULL as a SQLServer string literal.
For column [dbo][MyTable][SomeVarchar] unable to convert default value (NULL) into type System.String. Will not generate code setting a default value for the property [dbo][MyTable][SomeVarchar] on entity type [dbo][MyTable].

If [MyTable][SomeVarchar] column is defined as [NullableInt16] [SomeVarchar](6) NULL,
and the following constraint exists

ALTER TABLE [dbo].[MyTable] ADD  CONSTRAINT [DF_MyTable_SomeVarchar]  DEFAULT (NULL) FOR [SomeVarchar]
@lajones
Copy link
Contributor

lajones commented Oct 7, 2015

Fixed with PR #3350

@lajones lajones closed this as completed Oct 7, 2015
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-rc1, 1.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

4 participants