INSERT INTO stor.t_storage_work_schedule (
    storageworkscheduleid,
    storage,
    datebegin,
    dateend,
    "user",
    createdate
)
SELECT
    gen_random_uuid(),
    s.storageid,
    '01.01.2000'::timestamp,
    null,
    (SELECT u.userid FROM vclib.t_users u LIMIT 1),
    current_date
FROM stor.t_storage s
WHERE s.locked = FALSE;
