Skip to content

Renaming models in schema.prisma may break whole file #652

@Akxe

Description

@Akxe

Bug description

If renaming model that has a name, that occurs in other models name it will rename the first model it encounters.

How to reproduce

With schema bellow:

model undozaknos {
  idUndo   Int
  idObdobi Int
  ncis     Int
}

model zaknos {
  idObdobi Int
  ncis     Int
}
  1. Rename model zaknos

Expected behavior

Expect it to work

Prisma information

Schema needed is abowe

Environment & setup

  • OS: Windows
  • Database: MySQL
  • Node.js version: v12.16.1
@prisma/cli          : 2.12.1
@prisma/client       : 2.12.1
Current platform     : windows
Query Engine         : query-engine cf0680a1bfe8d5e743dc659cc7f08009f9587d58 (at node_modules\@prisma\engines\query-engine-windows.exe)
Migration Engine     : migration-engine-cli cf0680a1bfe8d5e743dc659cc7f08009f9587d58 (at node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core cf0680a1bfe8d5e743dc659cc7f08009f9587d58 (at node_modules\@prisma\engines\introspection-engine-windows.exe)        
Format Binary        : prisma-fmt cf0680a1bfe8d5e743dc659cc7f08009f9587d58 (at node_modules\@prisma\engines\prisma-fmt-windows.exe)
Studio               : 0.322.0

Metadata

Metadata

Assignees

Labels

bug/2-confirmedBug has been reproduced and confirmed.kind/bugA reported bug.kind/regressionA reported bug in functionality that used to work before.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions