-- Drop foreign key constraints first
ALTER TABLE files DROP CONSTRAINT IF EXISTS fk_files_organization_id;
ALTER TABLE files DROP CONSTRAINT IF EXISTS fk_files_user_id;

-- Drop indexes
DROP INDEX IF EXISTS idx_files_organization_id;
DROP INDEX IF EXISTS idx_files_user_id;
DROP INDEX IF EXISTS idx_files_file_type;
DROP INDEX IF EXISTS idx_files_created_at;

-- Drop the table
DROP TABLE IF EXISTS files;
