Shubham-Sinha
Shubham-Sinha
DTDrizzle Team
Created by lexixon on 1/14/2024 in #help
Common ways to reference and work with the `user_id` when managed by Supabase
@francis How does the drizzle schema look like when generating this migration ?
create table public.profile (
-- UUID from auth.users
id uuid primary key references auth.users on delete cascade,
created_at timestamp not null default now(),
updated_at timestamp not null default now(),
terms_accepted_at timestamp,
email varchar(255),
full_name text,
avatar_url text
);
create table public.profile (
-- UUID from auth.users
id uuid primary key references auth.users on delete cascade,
created_at timestamp not null default now(),
updated_at timestamp not null default now(),
terms_accepted_at timestamp,
email varchar(255),
full_name text,
avatar_url text
);
16 replies
DTDrizzle Team
Created by Shubham-Sinha on 6/2/2023 in #help
Implement full text search in postgres
@Valentin Galfre You may want to use it like this
sql` ${users.vec} @@ to_tsquery(${"'" + searchTerm + "'"}) `
sql` ${users.vec} @@ to_tsquery(${"'" + searchTerm + "'"}) `
3 replies
DTDrizzle Team
Created by Shubham-Sinha on 8/14/2023 in #help
How to dynamically select columns in relation query with proper type inference ?
Will give it a try and let you guys know
7 replies
DTDrizzle Team
Created by Shubham-Sinha on 6/3/2023 in #help
How to type results that includes relations ?
Thanks a lot @mcgrealife
3 replies
DTDrizzle Team
Created by Shubham-Sinha on 6/1/2023 in #help
How to implement triggers or db hooks ?
I feel there should be hooks like before insert, after inserts. This will make some of things easier and secure. Like hashing a password. Right now I have to make sure that password I’m inserting is hashed, so every function that uses user insert I’ve to do that. Instead if this can be done at every insert / update, as a developer I’ll feel more confident using user.insert wherever I want
6 replies
DTDrizzle Team
Created by Shubham-Sinha on 6/1/2023 in #help
How to implement triggers or db hooks ?
Yup. I want to run a code after any insert / delete
6 replies
DTDrizzle Team
Created by BracketJohn on 5/20/2023 in #help
Prisma Studio style db explorer
17 replies