feat(ST-507): add optional code fields to Product, Pbi and Story

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-26 20:36:26 +02:00
parent c45ba1d0c2
commit 33d66bc7c4
3 changed files with 16 additions and 1 deletions

View file

@ -95,6 +95,7 @@ model Product {
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
user_id String
name String
code String? @db.VarChar(30)
description String?
repo_url String?
definition_of_done String
@ -108,6 +109,7 @@ model Product {
members ProductMember[]
@@unique([user_id, name])
@@unique([user_id, code])
@@index([user_id, archived])
@@map("products")
}
@ -116,6 +118,7 @@ model Pbi {
id String @id @default(cuid())
product Product @relation(fields: [product_id], references: [id], onDelete: Cascade)
product_id String
code String? @db.VarChar(30)
title String
description String?
priority Int
@ -124,6 +127,7 @@ model Pbi {
updated_at DateTime @updatedAt
stories Story[]
@@unique([product_id, code])
@@index([product_id, priority, sort_order])
@@map("pbis")
}
@ -138,6 +142,7 @@ model Story {
sprint_id String?
assignee User? @relation("StoryAssignee", fields: [assignee_id], references: [id], onDelete: SetNull)
assignee_id String?
code String? @db.VarChar(30)
title String
description String?
acceptance_criteria String?
@ -149,6 +154,7 @@ model Story {
logs StoryLog[]
tasks Task[]
@@unique([product_id, code])
@@index([pbi_id, priority, sort_order])
@@index([sprint_id, sort_order])
@@index([product_id, status])