{"-- Drop existing policies for model-files bucket if they exist
DROP POLICY IF EXISTS \"Allow authenticated users to upload model files\" ON storage.objects","DROP POLICY IF EXISTS \"Allow public access to model files\" ON storage.objects","DROP POLICY IF EXISTS \"Allow authenticated users to update their model files\" ON storage.objects","DROP POLICY IF EXISTS \"Allow authenticated users to delete their model files\" ON storage.objects","-- Create new storage policies for the model-files bucket
CREATE POLICY \"Enable upload for authenticated users on model files\" 
ON storage.objects 
FOR INSERT 
TO authenticated
WITH CHECK (bucket_id = 'model-files')","CREATE POLICY \"Enable read for all users on model files\" 
ON storage.objects 
FOR SELECT 
TO public
USING (bucket_id = 'model-files')","CREATE POLICY \"Enable update for authenticated users on model files\" 
ON storage.objects 
FOR UPDATE 
TO authenticated
USING (bucket_id = 'model-files')
WITH CHECK (bucket_id = 'model-files')","CREATE POLICY \"Enable delete for authenticated users on model files\" 
ON storage.objects 
FOR DELETE 
TO authenticated
USING (bucket_id = 'model-files')"}