error "Cannot read properties of undefined (reading 'endsWith') at defaultForColumn"

after running npx drizzle-kit push
can anyone help please?
my versions
"drizzle-orm": "^0.32.0",
"drizzle-kit": "^0.23.0",

this is my schema
import {
  boolean,
  integer,
  jsonb,
  pgTable,
  text,
  timestamp,
} from "drizzle-orm/pg-core";

export const userTable = pgTable("user", {
  // id: integer("id").notNull().primaryKey({ autoIncrement: true }),
  id: text("id").notNull().primaryKey(),
  username: text("username").notNull().unique(),
  password_hash: text("password_hash").notNull(),
  notifications_count: integer("notifications_count").notNull().default(0),
  emailAddress: text("emailAddress").notNull().unique(),
});

export const sessionTable = pgTable("session", {
  id: text("id").primaryKey(),
  userId: text("user_id")
    .notNull()
    .references(() => userTable.id),
  expiresAt: timestamp("expires_at", {
    withTimezone: true,
    mode: "date",
  }).notNull(),
});

export const spendingTable = pgTable("spending", {
  id: integer("id").primaryKey(),
  date: timestamp("date", { mode: "date" }).notNull(),
  description: text("description").notNull(),
  category: text("category").notNull(),
  amount: integer("amount").notNull(),
});

export const webhookEvents = pgTable("webhookEvent", {
  id: integer("id").primaryKey(),
  createdAt: timestamp("createdAt", { mode: "date" }).notNull().defaultNow(),
  eventName: text("eventName").notNull(),
  processed: boolean("processed").default(false),
  body: jsonb("body").notNull(),
  processingError: text("processingError"),
});

export type NewWebhookEvent = typeof webhookEvents.$inferInsert;
export type Spending = typeof spendingTable.$inferInsert;
image.png
Was this page helpful?