Files
neta/docs/database/0003-project-planning-assets.md
T
Poyraz Avsever 35dd88b5af feat: implement project management features with cover images and planning sections
- Add ProjectsClient component for managing projects with a grid and list view.
- Introduce project cover image functionality and related fields in the database.
- Create a new table for project planning sections with RLS policies for user access.
- Update global styles for scrollbar customization.
- Enhance Next.js configuration for server actions with increased body size limit.
- Document new database migration for project planning assets.
2026-06-04 15:45:51 +03:00

1.8 KiB

0003 - Project Planning Assets

SQL file: supabase/migrations/0003_add_project_planning_assets.sql

Purpose

This migration extends project management beyond task tracking.

It adds:

  • Project cover image fields on projects
  • A private Supabase Storage bucket for uploaded project images
  • A structured project_planning_sections table for project planning categories

Project Image Fields

The projects table receives:

  • cover_image_path: path of the uploaded file in the project-assets bucket
  • cover_image_alt: optional alt text for the cover image

Images are uploaded from the user's computer, not saved as external image links.

Storage Bucket

Bucket:

  • project-assets

Configuration:

  • Private bucket
  • Max file size: 5 MB
  • Allowed MIME types:
    • image/jpeg
    • image/png
    • image/webp
    • image/gif

Storage object paths must start with the authenticated user id:

<user_id>/projects/<project_id>/<file_name>

This keeps Storage RLS simple and user-scoped.

Planning Sections

Table:

  • project_planning_sections

Core fields:

  • user_id
  • project_id
  • category
  • title
  • content
  • metadata
  • sort_order

Allowed categories:

  • overview
  • problem
  • goal
  • audience
  • scope
  • design_system
  • color_palette
  • typography
  • assets
  • notes

RLS

RLS is enabled for project_planning_sections.

Users can only select, insert, update, and delete their own planning sections.

Storage policies allow users to select, upload, update, and delete only files under their own user id folder inside project-assets.

Execution

Run after:

  1. supabase/schema.sql
  2. supabase/migrations/0002_add_freelancer_os_core_tables.sql

After running this SQL in Supabase, add an execution record to docs/database/query-log.md.