© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
1 reply
Helix

Data Retrieved As Same Data

I am retrieving some data using an api, and I'm only getting the same number in one column even though the data is different in the database. My database has a column that is default uuid_short(), is this the correct way to do the schema?
export const auditsTable = mysqlTable("audits", {
  AUDIT_ID: varchar("AUDIT_ID", { length: 255 })
    .primaryKey()
    .$default(() => sql`(uuid_short())`),
  DATE: date("DATE").notNull(),
  user: varchar("user", { length: 255 }).notNull(),
  upc: varchar("upc", { length: 255 }).notNull(),
  epc: varchar("epc", { length: 255 }).notNull(),
  ex_upc: varchar("ex_upc", { length: 255 }).notNull(),
  status: tinyint("status").notNull(),
});
export const auditsTable = mysqlTable("audits", {
  AUDIT_ID: varchar("AUDIT_ID", { length: 255 })
    .primaryKey()
    .$default(() => sql`(uuid_short())`),
  DATE: date("DATE").notNull(),
  user: varchar("user", { length: 255 }).notNull(),
  upc: varchar("upc", { length: 255 }).notNull(),
  epc: varchar("epc", { length: 255 }).notNull(),
  ex_upc: varchar("ex_upc", { length: 255 }).notNull(),
  status: tinyint("status").notNull(),
});
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

Checking Joined Data Directly from Type Recommendation and Retrieved Data in Dynamic findMany
Drizzle TeamDTDrizzle Team / help
3y ago
Same API for multiple databases
Drizzle TeamDTDrizzle Team / help
2y ago
Subquery within same table not working as expected
Drizzle TeamDTDrizzle Team / help
12mo ago
Same data is returned if I change the data without using Drizzle.
Drizzle TeamDTDrizzle Team / help
3y ago