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

Error 1048: Column 'name' cannot be null #2

Closed
kaihendry opened this issue May 15, 2018 · 6 comments
Closed

Error 1048: Column 'name' cannot be null #2

kaihendry opened this issue May 15, 2018 · 6 comments
Assignees

Comments

@kaihendry
Copy link
Contributor

kaihendry commented May 15, 2018

curl -X POST \
  https://unit.dev.unee-t.com/create \
  -d '[{ "id": "foobar" }]'
Error 1048: Column 'name' cannot be null

Shouldn't the error message be something along the lines of bad unit name or something?

@franck-boullier
Copy link
Member

@kaihendry I need to better understand the test you were trying to do to answer that question...
from what I can infer it seem that you are trying to enter a unit id somewhere...
In which table, what do you use to do that is unclear at this point...

@franck-boullier
Copy link
Member

franck-boullier commented May 16, 2018

but if this is in a table which requires the name to be provided, then this seems like a legit error message to me...

@franck-boullier
Copy link
Member

franck-boullier commented May 16, 2018

The information that the API needs to insert in the table 'ut_data_to_create_units' BEFORE calling this SQL script are:

  • mefe_unit_id
  • mefe_creator_user_id (can be omitted)
  • bzfe_creator_user_id
  • classification_id (a valid BZ classification) . If none provided from the MEFE, then the default should be '2'.
  • unit_name (VARCHAR, maximum 47 character long)
  • unit_description_details ((VARCHAR, maximum 500 character long)

image

@kaihendry
Copy link
Contributor Author

After our chat, my understand is that the typical error is mefe_unit_id has been not created in ut_data_to_create_units table in advance by MEFE and that's why it fails.

Furthermore unee-t/frontend#237 needs to completed so the data can be entered, so the rest of the script can work. Much like invites already works.

@franck-boullier
Copy link
Member

After our chat, my understand is that the typical error is mefe_unit_id has been not created in ut_data_to_create_units table in advance by MEFE and that's why it fails.

That is correct!

Furthermore unee-t/frontend#237 needs to completed so the data can be entered, so the rest of the script can work. Much like invites already works.

That is correct too

@franck-boullier
Copy link
Member

Housekeeping: this seems solved to me
@kaihendry feel free to reopen if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants