Photo Order

Drag photos into the order you want them to appear in the slideshow. Order saves automatically.

← Back to memorial
Loading photos…

Music Order

Drag tracks into the order you want them to play.

First-time setup: create music_tracks table

Run this once in your Supabase SQL editor to enable music ordering:

-- 1. Create the music_tracks table
CREATE TABLE IF NOT EXISTS music_tracks (
  id          uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  file_name   text NOT NULL UNIQUE,
  display_name text NOT NULL,
  sort_order  integer,
  added_at    timestamptz NOT NULL DEFAULT now()
);

-- 2. Allow public reads (so the memorial page can fetch the list)
ALTER TABLE music_tracks ENABLE ROW LEVEL SECURITY;

CREATE POLICY "Public can read music_tracks"
  ON music_tracks FOR SELECT
  USING (true);

CREATE POLICY "Service role can write music_tracks"
  ON music_tracks FOR ALL
  USING (true);

-- 3. Optional: seed from your existing storage bucket names
--    (replace 'song-one.mp3', etc. with your actual file names)
-- INSERT INTO music_tracks (file_name, display_name, sort_order)
-- VALUES
--   ('song-one.mp3',   'Song One',   1),
--   ('song-two.mp3',   'Song Two',   2),
--   ('song-three.mp3', 'Song Three', 3)
-- ON CONFLICT (file_name) DO NOTHING;

After running the SQL, click Sync from storage above to automatically import all tracks from your music bucket.

Loading tracks…