Skip to content

Ensure we run generate after db push and migrate dev even if the changes result in no database schema changes #6055

@albertoperdomo

Description

@albertoperdomo

Problem

If you change the name of a relation field in the data model, this will not trigger a change in the database schema, so it is a no-op in migrate dev and db push, and the client generation will not be triggered.

This might be unexpected since your client will now keep operating with the old names until you manually run prisma generate or another migrate action that actually results in a change to the database schema.

The same can happen if a team member has pushed a change to the schema that results in no database schema but a change in the relation names and you are pulling the changes from the repo. migrate dev will indicate there are no new migrations and not trigger client generation.

Solution

We will trigger generation on every execution of db push and migrate dev, even if no changes are triggered.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions