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 could also rename usages in code #1363

Open
janpio opened this issue Jan 19, 2023 · 2 comments
Open

Renaming could also rename usages in code #1363

janpio opened this issue Jan 19, 2023 · 2 comments
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. topic: rename

Comments

@janpio
Copy link
Member

janpio commented Jan 19, 2023

Currently renaming a model in the schema only renames it there. All my usages of the old model name in my code afterwards are invalid. The extension could maybe (optionally) also take care of that rename so my code keeps working automatically.

@Druue Druue added kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. topic: rename labels Mar 15, 2023
@Druue
Copy link
Contributor

Druue commented Mar 15, 2023

Just to clarify, you're referring to e.g.:
rename model in schema.prisma foo -> bar
all references to foo in typescript are then updated to bar?

@janpio
Copy link
Member Author

janpio commented Mar 15, 2023

Yes.

(Very far out there feature again, not in the core area of the extension)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. topic: rename
Projects
None yet
Development

No branches or pull requests

2 participants