File: /volume1/@appstore/SynologyPhotos/etc/sql/44.sql
CREATE OR REPLACE VIEW public.album_with_share_info_view
AS
SELECT
album.id as id,
album.id_user as id_user,
album.name as name,
album.type as type,
album.create_time as create_time,
album.start_time as start_time,
share.privacy_type as privacy_type,
share.enable as enable,
album.passphrase_share as passphrase_share,
normal_album.status as status
FROM
album LEFT JOIN share
ON album.passphrase_share = share.passphrase
LEFT JOIN normal_album
ON album.passphrase_share = normal_album.passphrase_share;