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

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

Closed
Akxe opened this issue Dec 8, 2020 · 3 comments · Fixed by #653
Closed

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

Akxe opened this issue Dec 8, 2020 · 3 comments · Fixed by #653
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. kind/regression A reported bug in functionality that used to work before.
Milestone

Comments

@Akxe
Copy link

Akxe commented Dec 8, 2020

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
@janpio
Copy link
Member

janpio commented Dec 8, 2020

Does this refer to the Prisma VSCode extension?
What is happening instead of what you expect?

@Akxe
Copy link
Author

Akxe commented Dec 8, 2020

@janpio yes it does redder to it. When renaming the zaknos the undozaknos will be renamed instead.

Ex renaming zaknos to carrier will rename undozaknos to undocartier instead.

@Akxe
Copy link
Author

Akxe commented Dec 8, 2020

The same applies to renaming of some columns to some names, I am however not sure when this bug occurs.

@janpio janpio transferred this issue from prisma/prisma Dec 9, 2020
@carmenberndt carmenberndt added kind/regression A reported bug in functionality that used to work before. kind/bug A reported bug. labels Dec 10, 2020
@carmenberndt carmenberndt added the bug/2-confirmed Bug has been reproduced and confirmed. label Dec 10, 2020
@carmenberndt carmenberndt self-assigned this Dec 10, 2020
@carmenberndt carmenberndt added this to the 2.14.0 milestone Dec 10, 2020
🌐 Language Tools Issue Categorization automation moved this from Bug to Closed/Done Dec 10, 2020
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. kind/regression A reported bug in functionality that used to work before.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants