Skip to content

Project Table

Overview

Table for managing project information

Table Definition

Logical Name Physical Name Column Name Data Type Primary Key Relation Unique Nullable Default Value Remarks
Project Information project id serial โ—ฏ
name string
organization_id number organization:id
created_at datetime
updated_at datetime
deleted_at datetime โ—ฏ
created_by string user:cognito_sub
updated_by string user:cognito_sub
deleted_by string user:cognito_sub โ—ฏ
component_count number 0
design_count number 0

Relations

  • organization_id โ†’ organization.id
  • created_by โ†’ user.cognito_sub
  • updated_by โ†’ user.cognito_sub
  • deleted_by โ†’ user.cognito_sub
  • codebase_index.project_id โ†’ project.id
  • codebase_rule.project_id โ†’ project.id
  • code.project_id โ†’ project.id

Indexes

  • PRIMARY KEY (id)
  • INDEX project_organization_id_deleted_at_idx (organization_id, deleted_at)

Notes

  • Logical deletion support (deleted_at column)
  • Audit log support (created_by, updated_by, deleted_by)
  • component_count and design_count default to 0
  • Feature-specific state is not stored on project. Des2Code codebase state is stored in the one-to-one codebase_index table, and user-authored codebase context is stored in codebase_rule.