Skip to content

[BUG]: drizzle kit does not push compound keys #4022

@da1z

Description

@da1z

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

^0.38.4

What version of drizzle-kit are you using?

^0.30.2

Other packages

No response

Describe the Bug

pushed table does not have compound key.
i am using this schema:

export const verificationTokens = pgTable(
  "verificationToken",
  {
    identifier: text("identifier").notNull(),
    token: text("token").notNull(),
    expires: timestamp("expires", { mode: "date" }).notNull(),
  },
  (vt) => [
    {
      compositePk: primaryKey({
        columns: [vt.identifier, vt.token],
      }),
    },
  ],
);

this is table pushed with latest drizzle-kit

Image

this is table with same schema from my other project pushed with kit version ^0.21.1

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions