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
Update database schema with more NOT NULL columns #5613
Comments
As pointed out by @cvetkovski98 we do have the Besides this I should write it in here what else shouldn't be NULL in the database. |
Could you take a look for this ? I can then check the production databases for conflicts and we can write the migration and store changes. |
The initial idea was to find more columns which would benefit from having more NOT NULL columns. By going through columns which already have the I went a bit all over the place while working on this, so there are two sections in this comment:
Each section is divided in:
Overall most fields which have @adriansmares I left the queries for the fields (just counting amount of NULLs) for each fields which I believe might have the NULL or zero value on production. There are some questions regarding some specific fields which I would appreciate your take. Notes related to `nullzero`List of fields that could have
|
This requires a migration, therefore I'm moving it to the |
Summary
A number of columns in our database schema allow
NULL
values when in factNULL
s shoud not be possible. We should fix that.Current Situation
Many columns (at least the ones marked as
nullzero
inpkg/identityserver/bunstore
, but there are more) allowNULL
values that are equivalent to empty values in The Things Stack.Desired Situation
We should not allow
NULL
s in those columns. We can set aDEFAULT
forINSERT
compatibility.Code of Conduct
The text was updated successfully, but these errors were encountered: