Skip to content

Remove foreign key constraints from generated DB schema to allow using PlanetScale DB with Strapi #11775

@benderillo

Description

@benderillo

Feature request

Please describe your feature request

  • I have created my request on the Product Board before I submitted this issue
  • I have looked at all the other requests on the Product Board before I submitted this issue

Summary

PlanetScale is this new amazing database-as-a-service offering from creators of Vitess .

Unfortunately, Strapi users cannot use this service because it does not allow foreign key constraints in the DB schema but Strapi creates the FOREIGN KEY constraints when generates the schema.

They explain why foreign keys are not supported in this article: https://docs.planetscale.com/tutorials/operating-without-foreign-keys

Strapi creates foreign key constraints when creates the db schema from the models, specifically, when creating components but there could be other cases too.

This feature request is to update the code that generates the DB schema to remove the foreign key constraints from it.

Why is it needed?

To allow Strapi users to use PlanetScale and leverage solid, battle-tested, horizontally scaled MySQL clusters conveniently offered as a managed service.

Suggested solution(s)

Update schema generating code in Stripe to not to produce foreign key constraints.

Related issue(s)/PR(s)

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions