-- Rollback for 985_tracks_storage_backend.sql
-- WARNING: destroys storage_backend + storage_key data. Only safe if no
-- track has been migrated to s3 (i.e. all rows still storage_backend='local'
-- which is the default). Run a sanity query before rollback in prod:
--   SELECT COUNT(*) FROM public.tracks WHERE storage_backend = 's3';
-- Must return 0.

DROP INDEX IF EXISTS public.idx_tracks_storage_backend_s3;

ALTER TABLE public.tracks
    DROP COLUMN IF EXISTS storage_key,
    DROP COLUMN IF EXISTS storage_backend;
