© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
49 replies
Vision2023

An issue when creating string[] elements

I'm getting an error:

DatabaseErrorException: ERROR: column "images" is of type text[] but expression is of type text; Hint: You will need to rewrite or cast the expression.

For the following code:
const newListings = []
const newListing = {
  images: [...Array(8)].map(() => faker.image.url()),
  ...others
};
newListings.push(newListing)
await db.insert(listings).values(newListings)
const newListings = []
const newListing = {
  images: [...Array(8)].map(() => faker.image.url()),
  ...others
};
newListings.push(newListing)
await db.insert(listings).values(newListings)


I'm using aws rds data api
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

Type issue when creating self join
Drizzle TeamDTDrizzle Team / help
3y ago
Error when creating migration
Drizzle TeamDTDrizzle Team / help
2y ago
Creating an abstract base repository
Drizzle TeamDTDrizzle Team / help
3y ago
Issue when inserting
Drizzle TeamDTDrizzle Team / help
3y ago