PostgresError: relation "Session" does not exist

I'm getting this error, but in my schema and my database, the table name is lower case.

export const sessions = pgTable(
    "session",
    {
        sessionToken: varchar("sessionToken").primaryKey().notNull(),
        userId: varchar("userId")
            .notNull()
            .references(() => users.id, { onUpdate: "cascade", onDelete: "cascade" }),
        expires: timestamp("expires", { mode: "date" }).notNull()
    },
    (table) => {
        return {
            userIdIdx: index("Session_userId_idx").on(table.userId)
        };
    }
);
CleanShot_2024-03-11_at_20.33.072x.png
Was this page helpful?