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: Option to ignore DEFAULT constraints #10881

Open
Tracked by #22948
bricelam opened this issue Feb 5, 2018 · 4 comments
Open
Tracked by #22948

RevEng: Option to ignore DEFAULT constraints #10881

bricelam opened this issue Feb 5, 2018 · 4 comments

Comments

@bricelam
Copy link
Contributor

bricelam commented Feb 5, 2018

We should consider adding a flag that will cause reverse engineering to ignore column defaults when defining the EF model. However, some thought needs to go into how this would interact with update-from-database.

@kmh0237
Copy link

kmh0237 commented Mar 2, 2018

+1 to this. This has caused a lot of issues for us - accounting for a null value that we never plan to use is extremely annoying.

@ajcvickers
Copy link
Member

Note from triage: T4 template can now be edited to allow this.

@motohead400
Copy link

Note from triage: T4 template can now be edited to allow this.

So how do we do this so that default constraints in the database are ignored? I'm working with a database that has default constraints, but the bit values are not null. I do not want my entities to have bool? for fields that will NEVER be null. I'm mindblown there's not a flag to simply ignore the database default option.

@bricelam bricelam removed their assignment Jun 16, 2023
@ErikEJ
Copy link
Contributor

ErikEJ commented Oct 25, 2023

@motohead400 EF Core Power Tools has the "flag" you are asking for I believe.

@ajcvickers ajcvickers removed their assignment Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants