fp/scripts/data-migrations/scratch.sql

14 lines
383 B
SQL

SELECT
gen_random_uuid() AS id,
vods.id AS id_old,
links.vod_id AS vod_id_old,
links.vtuber_id AS vtuber,
stream_links.stream_id AS stream
FROM public_strapi_old.vods AS vods
LEFT JOIN public_strapi_old.vods_vtuber_links AS links
ON vods.id = links.vod_id
LEFT JOIN public_strapi_old.vods_stream_links AS stream_links
ON vods.id = stream_links.vod_id