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
Renaming a content type causes Strapi to crash #2482
Comments
Hello! I'm not able to reproduce your issue. Did you have an error log in your terminal ? |
Having a similar issue. In my case, what i debugged through it was that :
|
Hello @connectwithub, I don't understand what you explain. |
@lauriejim All I am saying that renaming a field creates another column in Mysql which is created with null values. The previous data is left in the field with the previous name. And if we make that field required or if its required field beforehand then as there ain't any data in the database corresponding to that field this leads to a throwing up of error in the cli that I have mentioned above. My suggested solution was that if we update the content type name from cli or ui then either the original column be renamed or atleast the data from that column be copied to the new column or the default data be added to the column so that no error is thrown. Being a developer myself I feel that this is possible and if you could point me to right file for this I would be more than happy to open a pull request for this. |
Ho okay I see! Thank you for your feedback. |
• Node.js version: 11.4.0
• NPM version: 6.4.1
• Strapi version: 3.0.0-alpha.16
• Database: MySQL 5.7
• Operating system: Ubuntu 18.04
What is the current behavior?
Created content type was originally called Approval which was renamed to Status.
Steps to reproduce the problem
What is the expected behavior?
Expected behavior is for Strapi to rename all the relevant fields in the database and not crash
Suggested solutions
If there is no way to fix this for now implement validation or disable field editing to avoid this from happening for now.
The text was updated successfully, but these errors were encountered: