You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to migrate from Prisma to Drizzle, but have hit a weird issue: when trying to execute npx drizzle-kit push, Drizzle seems to either miss a double quote or add a superfluous one... The push command says it will drop and recreate the column, and even if we say yes it generates an error.
Warning Found data-loss statements:
· You're about to change notifications column type from NotificationLists"[] to NotificationLists[] with 1 items
We basically only tried to pull the existing schema and get the initial setup working, but it looks like the mapping doesn't like the fact there is a double quoted enum type (NotificationLists) with an array (note the double quote between NotificationLists and [].
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We are trying to migrate from Prisma to Drizzle, but have hit a weird issue: when trying to execute npx drizzle-kit push, Drizzle seems to either miss a double quote or add a superfluous one... The push command says it will drop and recreate the column, and even if we say yes it generates an error.
We basically only tried to pull the existing schema and get the initial setup working, but it looks like the mapping doesn't like the fact there is a double quoted enum type (NotificationLists) with an array (note the double quote between NotificationLists and [].
In the database, it looks like:
Looking at the schema.ts file, we have:
As a point of reference, in Prisma we had:
Any help to troubleshoot this problem would be greatly appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions