© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•17mo ago•
1 reply
attano

Drizzle types error

Hello, I have this schema:

export const applications = pgTable('applications', {
    id: uuid('id').primaryKey().defaultRandom(),
    status: applicationStatus('status').notNull().default('pending'),
    type: applicationType('type').notNull(),
    createdAt: timestamp('created_at').defaultNow().notNull(),
    updatedAt: timestamp('updated_at').defaultNow().notNull(),
    userId: uuid('user_id').references(() => users.id).notNull(),
    details: jsonb('details').notNull(),
    reviewerId: uuid('reviewer_id').references(() => admins.id),
});
export const applications = pgTable('applications', {
    id: uuid('id').primaryKey().defaultRandom(),
    status: applicationStatus('status').notNull().default('pending'),
    type: applicationType('type').notNull(),
    createdAt: timestamp('created_at').defaultNow().notNull(),
    updatedAt: timestamp('updated_at').defaultNow().notNull(),
    userId: uuid('user_id').references(() => users.id).notNull(),
    details: jsonb('details').notNull(),
    reviewerId: uuid('reviewer_id').references(() => admins.id),
});


I'm trying to update it here:
const [application] = await this.db.update(schema.applications)
    .set({
        status,
        updatedAt: new Date()
    })
    .where(eq(schema.applications.id, id))
    .returning();
const [application] = await this.db.update(schema.applications)
    .set({
        status,
        updatedAt: new Date()
    })
    .where(eq(schema.applications.id, id))
    .returning();


However, I get this error for both status and updatedAt:
Object literal may only specify known properties, and 'status' does not exist in type '{ type?: SQL<unknown> |....
Object literal may only specify known properties, and 'status' does not exist in type '{ type?: SQL<unknown> |....


In fact, the only known properties seem to be details, type, and userId. also all fields are there in the database
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Error With types from Drizzle
Drizzle TeamDTDrizzle Team / help
15mo ago
Drizzle-zod createInsertSchema types
Drizzle TeamDTDrizzle Team / help
3y ago
creating external types based on drizzle types
Drizzle TeamDTDrizzle Team / help
3y ago
Monorepo drizzle-zod types problem
Drizzle TeamDTDrizzle Team / help
9mo ago