Files
bookhoard/database/schema/005_create_user_ebook_folders.up.sql
T
john-okeefe 08e80ae84b refactor: reorganize project structure and update configurations
- Move migrations/ to database/schema/ for clarity on database schema definitions
- Move sqlc.yaml to internal/database/ to group with database code
- Move static/ to cmd/server/static/ to co-locate with server
- Update all configuration files and documentation
- Follow Go project conventions for better organization
2026-01-24 23:40:31 -05:00

11 lines
457 B
SQL

-- 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);