© 2026 Hedgehog Software, LLC

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

Making a key in a object with jsonb unique

type Wallets = {
    wallet_address: string;
    blockchain: string;
};

export const user = pgTable(
    'user',
    {
        id: serial('id').primaryKey(),
        wallets: jsonb('wallets').$type<Wallets[]>(),
);
type Wallets = {
    wallet_address: string;
    blockchain: string;
};

export const user = pgTable(
    'user',
    {
        id: serial('id').primaryKey(),
        wallets: jsonb('wallets').$type<Wallets[]>(),
);


how would i make wallet_address unique?
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

Unique key in PG
Drizzle TeamDTDrizzle Team / help
2y ago
Unique Key Schema
Drizzle TeamDTDrizzle Team / help
3y ago
Drizzle Studio jsonb column showing [object Object]
Drizzle TeamDTDrizzle Team / help
7mo ago
Infer date values in jsonb column as Date object
Drizzle TeamDTDrizzle Team / help
2y ago