```No cast exists, the column would be dropped and...
# orm-help
r
Copy code
No cast exists, the column would be dropped and recreated, which cannot be done since the column is required and there is data in the table.
Is there no way I can just get it to add the column, but fill out a default value to fulfill the requirements?
āœ… 1
n
Hey @Rob šŸ‘‹ Which Prisma version and database are you using? Can you share the schema file and elaborate on what your exact use case is? Do you want to rename a column?
r
Hi @Nurul, I appreciate your response. I am using "4.1.1". I'm not too sure what happened, I believe I added a column to a pre-existing schema and had a requirement flag on it. I believe I made it an enum value as well:
Copy code
model test {
  id               Int    @id @default(autoincrement())
  type             typeEnum
}
Here's the full error:
Copy code
• Step 1 Changed the type of `type` on the `test` table. No cast exists, the column would be dropped and recreated, which cannot be done since the column is required and there is data in the table.
I went ahead and did db push and everything works now..
But for the future I'd like to use migrate to not have to remove everything from my DB
n
Hey @Rob Glad to hear that the issue is resolved. šŸ™Œ
I’d like to use migrate to not have to remove everything from my DB
We have received this feedback from the community and are actively working to tackle this issue.