is there a way to generate shorter uuids? rn im us...
# help
p
is there a way to generate shorter uuids? rn im using uuid_generate_v4() but id like something thats preferably 5 symbols long
n
Hello @poutingemoji! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
f
n
poutingemoji (2022-04-09)
p
how do i use it for my supabase db?
f
p
ok
done
how do i set the type to trigger
im trying to look for it in the dropdown
f
on the repo u can find other example
p
ah i see
ok so i got the trigger working but
what i dont get is
can i not make the trigger field my primary key?
because primary keys require a value before and triggers only run after i insert
im trying to insert through the interactive editor on supabase
f
@User the repo has an example, if u ran the script then u can use de new domain created as a new type in your Columns
Copy code
CREATE TABLE test (id SHORTKEY PRIMARY KEY, name TEXT);
SHORTKEY
to generate a new value run
select shortkey_generate()