DT
Drizzle TeamRhys
Planetscale swapped the order of Primary Key Relation
Hey, running into this weird issue when using Drizzle push on a staging branch of Planetscale, trying to promote it to production
In the screenshot you can see:
- PRIMARY KEY (
userId
, serverId
),
+ PRIMARY KEY (serverId
, userId
),
Which is causing an issue with the deployment being blocked - Is there any way I can make Drizzle go back to how it was originally doing the relations? I tried reordering the variables but that didn't change anything
ThanksRhys•246d ago
Actually I don't think this is a Drizzle issue, I think this is just the first time I'm pushing with Drizzle to a database that was made before Drizzle
Having some way to control the order of the foregin keys would be helpful though for this scenario - I tried
on a whim and that didn't work
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.4KMembers
View on DiscordWant results from more Discord servers?
More PostsPostgres functions in the ORM?Hello everyone, I'm learning typescript and SQL (with drizzle) and I'm trying to make an api endpoinInferModelFromColumns with columns defined with sql``Let's say I have a select list that looks like this
```ts
const defaultBookFields = {
id: books.Issue with drizzle-zod?Schema
```
export const testinArray = pgTable("testing_array", {
id: varchar("id", { length: 14 Optional One-to-One RelationCurrently it's possible to define only a One-to-One relation (https://orm.drizzle.team/docs/rqb#one-Having Issues Pushing Database SchemaHi I am getting this issue whenever I am trying to push the database schema. Any help would be greatmigration failedcode:
```js
const migrationClient = postgres("postgresql://jer:admin@localhost:5432/test", { max: 1