language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Expand Rename Code Actions to help generate correct (renaming) migrations

Open do4gr opened this issue 3 years ago • 0 comments

We are already offering Code Actions to ease the renaming of schema entities. eg. Renaming a Model from Post to PrivatePost will change it in the relations it is used elsewhere in the datamodel.

When you then run migrate dev or push the information that this was a rename is lost however. We will instead drop and recreate the Model and it's relations, thereby potentially deleting data.

If we could use the information from the Quick Action and pass it to migrate we could instead use rename statements and keep the data.

do4gr avatar Feb 17 '22 10:02 do4gr