lemmy/migrations/2021-01-26-173850_default_a.../up.sql

6 lines
276 B
MySQL
Raw Normal View History

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)
$$;