drizzle-orm
drizzle-orm copied to clipboard
[BUG]: Xata - drizzle-kit push - identityName.startsWith is not a function
What version of drizzle-orm are you using?
0.33.0
What version of drizzle-kit are you using?
0.24.2
Describe the Bug
After making adjustments to a schema, generating migrations, and attempting to push, I get an error:
Using 'pg' driver for database querying
[⣻] Pulling schema from database...
TypeError: identityName.startsWith is not a function
at /Users/colbyfayock/Code/50reactprojects.com/node_modules/drizzle-kit/bin.cjs:19170:73
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Appears to be related to this line: https://github.com/drizzle-team/drizzle-orm/blob/c8359a16fff4b05aff09445edd63fc65a7430ce9/drizzle-kit/src/serializer/pgSerializer.ts#L1047
This has happened when adding a new column as well as adding a new table (separately).
I'm using Xata Postgres.
I was working with this setup on another project and didn't seem to have this issue, but it was with an earlier version. I did notice there were some changes made recently with the serializer, though unsure if related. I attempted to downgrade to the same version (0.23.0) to see if it was working properly and while it got further, it seems to be pulling a column (unless I messed something up) so avoiding the data loss.
Expected behavior
Successfully adding a new table or new column
Environment & setup
Here's my schema: https://github.com/colbyfayock/50reactprojects.com/blob/refresh%2Bdb/src/db/schema.ts
- Node 20.14.0
- MacOS 13.4.1
- pg: 8.12.0