lemmy/migrations/2021-01-26-173850_default_actor_id/down.sql

11 lines
300 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE FUNCTION generate_unique_changeme ()
RETURNS text
LANGUAGE sql
AS $$
SELECT
'changeme_' || string_agg(substr('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789', ceil(random() * 62)::integer, 1), '')
FROM
generate_series(1, 20)
$$;