opened 09:32AM - 04 May 18 UTC
type: enhancement
severity: medium
source: core:framework
**Informations**
- **Node.js version**: 9.9.0
- **npm version**: 5.6.0
- **St… rapi version**: 3.0.0-alpha 12.1.2
- **Database**: MySQL
- **Operating system**: Windows 10
**What is the current behavior?**
Deleting a content-type does not drop the database table in MySQL, & when I navigate to roles & permissions, I can still see the deleted content-type and edit its permissions. When i create a new user role however, it only shows the non-deleted content-types. So for some reason, the content-types don't get deleted from the memory of existing user roles
**Steps to reproduce the problem**
1) create content-type
2) add a string field to it
3) save
4) delete content-type
5) content-type is not in the list of content-types anymore but the database table still exists + the reference to the content-type remains in the roles & permissions folder of a user role, when editing permissions.
**What is the expected behavior?**
deleting a content-type should remove all references of this content-type ever existing + drop its database automatically. Dropping the database manually still doesn't make the reference to the content-type in roles & permissions disappear. Dropping the whole database and re-creating it does however fix the problem
**Suggested solutions**
N.A.
- [ x ] I'm sure that this issue hasn't already been referenced
You must have already created this, deleted it, and then recreated it with a different structure. It’s an issue we are aware of and will be fixing in the v4, for now it’s best to open the data.db (sqlite file) in a client like DBeaver and delete the table, then allow Strapi to recreate it on boot.