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

Improve error message for not existing column #24083

Closed
ocram1095 opened this issue Nov 12, 2020 · 3 comments · Fixed by #24055
Closed

Improve error message for not existing column #24083

ocram1095 opened this issue Nov 12, 2020 · 3 comments · Fixed by #24055
Assignees
Labels
3. to review Waiting for reviews enhancement
Milestone

Comments

@ocram1095
Copy link

Hello guys,
while upgrading from 17.0.1.10.1 to 18.0.10.2 the following error message occured.

For context:
Occured error: "InvalidArgumentException: Column name \"iqmUw_flow_operations\".\"entity\" is NotNull, but has empty string or null as default."

It happens here:

throw new \InvalidArgumentException('Column name "' . $table->getName() . '"."' . $thing->getName() . '" is NotNull, but has empty string or null as default.');

After a look in the source code i found that the real reason for this error is a missing column not else.
I think it would be a good improvement to change this message to:

Column <column> with <type> in <table> not found

I was able to solve my mistake on my own, but it would certainly be helpful for the future if the message were more meaningful.

Thanks.

Marco

@kesselb
Copy link
Contributor

kesselb commented Nov 13, 2020

Sounds good to me. Mind to send a pull request?

cc @nickvergessen @MorrisJobke

@kesselb kesselb added 1. to develop Accepted and waiting to be taken care of enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in. labels Nov 13, 2020
@nickvergessen
Copy link
Member

already part of #24055

@nickvergessen
Copy link
Member

Or well my PR adjusts the error message a bit. The error happens before the column is created and in this case can't be created.

@nickvergessen nickvergessen added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of good first issue Small tasks with clear documentation about how and in which place you need to fix things in. labels Nov 16, 2020
@MorrisJobke MorrisJobke modified the milestones: Nextcloud 21, Nextcloud 22 Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants