-- Create user_ebook_folders table for multiple folders per user
CREATE TABLE user_ebook_folders (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
    folder_path VARCHAR(500) NOT NULL,
    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
    UNIQUE(user_id, folder_path)
);

-- Create index for faster lookups
CREATE INDEX idx_user_ebook_folders_user_id ON user_ebook_folders(user_id);