lemmy/migrations/2022-04-11-210137_fix_uniqu.../down.sql

7 lines
277 B
PL/PgSQL

create or replace function generate_unique_changeme()
returns text language sql
as $$
select 'http://changeme_' || string_agg (substr('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789', ceil (random() * 62)::integer, 1), '')
from generate_series(1, 20)
$$;