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

referentialIntegrity/relationMode preview feature (referentialIntegrity = "prisma"): Make NoAction a synonym/alias of Restrict for the emulation, for all databases except PostgreSQL & SQLite. #15655

Closed
3 tasks done
Tracked by #11441
Jolg42 opened this issue Oct 4, 2022 · 1 comment
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. team/schema Issue for team Schema. tech/engines Issue for tech Engines. topic: referentialIntegrity/relationMode
Milestone

Comments

@Jolg42
Copy link
Member

Jolg42 commented Oct 4, 2022

More details in https://www.notion.so/prismaio/How-do-we-GA-the-referentialIntegrity-preview-feature-8a656fe445ae4a69ad19c5000e5c7191#66d361e2770c4bedb619a2a3052f884c

We decided that for Prisma's emulation we want to make NoAction an alias of Restrict except for PostgreSQL and SQLite, where we want to make it invalid and have a validation error like NoAction is not implemented for PostgreSQL and SQLite, you could try using Restrict, which behaves the same if you do not need to defer constraint checks in a transaction, see docs at

When using referentialIntegrity = "prisma":

Current situation

  • NoAction does nothing. Which is "broken".

What we want

  • NoAction does the same as Restrict
  • NoAction is valid for all databases except PostgreSQL and SQLite
  • NoAction is invalid for PostgreSQL and SQLite with a validation error message

After the engines part is done, we want to validate with prisma/prisma tests based on #14221

TODOs:

@Jolg42 Jolg42 added tech/engines Issue for tech Engines. team/schema Issue for team Schema. team/client Issue for team Client. topic: referentialIntegrity/relationMode labels Oct 4, 2022
@Jolg42 Jolg42 added this to the 4.5.0 milestone Oct 4, 2022
@Jolg42 Jolg42 mentioned this issue Oct 4, 2022
35 tasks
@Jolg42 Jolg42 changed the title referentialIntegrity/relationMode preview feature: Make NoAction a synonym/alias of Restrict for all databases except PostgreSQL & SQLite. referentialIntegrity/relationMode preview feature: Make NoAction a synonym/alias of Restrict for the emulation, for all databases except PostgreSQL & SQLite. Oct 4, 2022
@millsp millsp added the kind/improvement An improvement to existing feature and code. label Oct 6, 2022
@jkomyno jkomyno self-assigned this Oct 7, 2022
@Jolg42 Jolg42 added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. and removed kind/improvement An improvement to existing feature and code. labels Oct 12, 2022
@janpio janpio modified the milestones: 4.5.0, 4.6.0 Oct 17, 2022
@jkomyno
Copy link
Contributor

jkomyno commented Oct 21, 2022

Closed as all related tasks are done.

@jkomyno jkomyno closed this as completed Oct 21, 2022
@janpio janpio changed the title referentialIntegrity/relationMode preview feature: Make NoAction a synonym/alias of Restrict for the emulation, for all databases except PostgreSQL & SQLite. referentialIntegrity/relationMode preview feature (referentialIntegrity = "prisma"): Make NoAction a synonym/alias of Restrict for the emulation, for all databases except PostgreSQL & SQLite. Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. team/schema Issue for team Schema. tech/engines Issue for tech Engines. topic: referentialIntegrity/relationMode
Projects
None yet
Development

No branches or pull requests

4 participants