Renaming pgEnum results in truncation?
I've been using drizzle with MySQL for a while, but I'm new to PG. I encountered an error where I had two different enums with the same column name
status
on two different tables, and Drizzle just chose one of the enums for the migration and didn't include the other. I was able to solve this by just changing the column names to project_status
and comment_status
(which might be better anyways, so its fine). But when pushing that migration I got a new warning saying that changing the column datatype from status
to project_status
would truncate the table, even though neither the enum datatype itself nor the default value had changed at all. Just the name.
So I guess I'm just wondering if anyone has encountered anything similar, and if you were able to find a solution, or if this might be worth opening issue over. Or rather if I just clearly have a misunderstanding of how PG works, please let me know lol. Thanks in advance!1 Reply
If you are using push command - this is how it will behave
For push command of type was changed(if enum is renamed it means type name was changed) kit will clear the table to be sure that it can migrate