© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago
HotBBQSauce

Cant insert integer into column of type json number array

export const platform = pgTable("platform", {
  id: integer("id").unique().primaryKey(),
  name: text("name"),
  slug: text("slug"),
  symbol: text("symbol"),
  tokens: json("tokens").$type<number[]>(),
});
export const platform = pgTable("platform", {
  id: integer("id").unique().primaryKey(),
  name: text("name"),
  slug: text("slug"),
  symbol: text("symbol"),
  tokens: json("tokens").$type<number[]>(),
});



      const platformUpdateResult = await db
        .update(platformSchema)
        .set({ tokens: sql`${platform.tokens} || ${token.id}` })
        .where(eq(platformSchema.id, token.platform))
        .returning();
      const platformUpdateResult = await db
        .update(platformSchema)
        .set({ tokens: sql`${platform.tokens} || ${token.id}` })
        .where(eq(platformSchema.id, token.platform))
        .returning();

this is not working
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

json_arrayagg(json_array ...
Drizzle TeamDTDrizzle Team / help
2y ago
column "roles" is of type integer[] but default expression is of type integer
Drizzle TeamDTDrizzle Team / help
2y ago
cannot insert into column "id"
Drizzle TeamDTDrizzle Team / help
11mo ago