Skip to content

Deleting/Updating content-type doesn't drop/migrate the database #1114

@piere129

Description

@piere129

Informations

  • Node.js version: 9.9.0
  • npm version: 5.6.0
  • Strapi 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: enhancementIssue suggesting an enhancement to an existing featureseverity: mediumIf it breaks the basic use of the product but can be worked aroundsource: core:strapiSource is core/strapi package

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions