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

9 lines
189 B
PL/PgSQL

CREATE OR REPLACE FUNCTION generate_unique_changeme ()
RETURNS text
LANGUAGE sql
AS $$
SELECT
'http://changeme.invalid/' || substr(md5(random()::text), 0, 25);
$$;