-
Notifications
You must be signed in to change notification settings - Fork 57
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
NOT_NULL validation incorrect with sqlite database #142
Comments
Hi @duncanmorris The linked issue is indeed closely related to what you are reporting. So it's basically a "shortcut" for now to consider it invalid since the linter should generally prefer to be pessimistic and rather have false positive than omiting a potential dangerous case. An quick and dirty fix could be adding to add a warning in these cases for sqlite. |
I would appreciate that fix |
To make creating a dev environment as easy as possible we use sqlite, but this causes issues with the linter, where it falsely warns about NOT_NULL
I think this is due to the issue identified in this comment , but that issue has now been closed so I thought a new issue was appropriate.
If I add the following to an existing model
The the linter wrongly identifies this as an invalid migrations
I believe this is caused by this line which just checks for
NOT NULL
.I've put the SQL below that shows that the sqlite backend implements the new column by creating a new table (that happens to have a
NOT NULL
field (in this case the PRIMARY KEY)The sql generated is:
The text was updated successfully, but these errors were encountered: